Skip to content

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)

2022-12-14___16-09-15

2022-12-14___16-09-04

Mobile width < 800px

2022-12-14___16-09-44

2022-12-14___16-09-53

Links in Distro Names:

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"
>}}

Merge request reports