Add installpackage shortcode for a table of distro install commands
This creates a table of install commands for each distro. There's CSS to make it rows on mobile. It's based on the shortcode on my blog (Example).
I'm not sure why I can't use chroma highlighting shortcode {{< highlight bash >}}
in a shortcode but it's not that necessary.
Let me know if I should move the distro svg images somewhere else. Right now they are at /distro/kubuntu.svg
.
Where should the CSS go? It's currently in the shortcode under a <style>
tag.
Eg:
{{< installpackage
ubuntu="kdesdk-scripts"
arch="kde-dev-scripts"
opensuse="kdesdk-scripts"
fedora="kde-dev-scripts"
gentoo="kde-apps/kde-dev-scripts"
>}}
Screenshots (ignore that I forgot kde-apps/ in the gentoo commands)
Mobile width < 800px
Links in Distro Names:
- Kubuntu: https://packages.ubuntu.com/search?keywords=kdesdk-scripts
- KDE Neon: https://build.neon.kde.org/search/?q=kdesdk-scripts
- Manjaro: https://software.manjaro.org/package/kde-dev-scripts
- Arch: https://archlinux.org/packages/?q=kde-dev-scripts
- OpenSUSE: https://software.opensuse.org/package/kdesdk-scripts
- Fedora: https://packages.fedoraproject.org/pkgs/kde-dev-scripts/kde-dev-scripts/
- Gentoo: https://packages.gentoo.org/packages/kde-apps/kde-dev-scripts
I'm not sure if I'll keep my changes to ubuntuCommand=""
yet. Previously I had it in as a 2nd if ubuntuCommand
after the sudo apt install
. When writing it for hugo, I made it if + elseif
. Now you only have one line since I don't think you can pass a newline as an argument value.
{{< installpackage
gentooCommand="sudo emerge --ask dev-qt/qtdeclarative ; /usr/lib64/qt5/bin/qmlprofiler"
>}}