pidgin/nest

c3b3dcf494c8
Parents bd79d75e6db1
Children a1b9f42157ab
Add a bunch of shortcodes to make life easier.

These will need to be abstracted a bit to handle other stuff like libgnt,
gplugin, talkatu, etc, but this is way easier to deal with than it was.

Testing Done:
Ran locally and verified all of the Sourceforge links are working.

Reviewed at https://reviews.imfreedom.org/r/557/
--- a/hugo/config.toml Thu Mar 04 22:33:48 2021 -0600
+++ b/hugo/config.toml Thu Mar 04 22:33:57 2021 -0600
@@ -5,6 +5,8 @@
dataDir = "data"
[params]
+currentVersion = "2.14.1"
+
# Disable arrows
disableNextPrev = true
editURL = "https://keep.imfreedom.org/pidgin/nest/file/default/hugo/content/"
--- a/hugo/content/install/_index.md Thu Mar 04 22:33:48 2021 -0600
+++ b/hugo/content/install/_index.md Thu Mar 04 22:33:57 2021 -0600
@@ -23,17 +23,18 @@
## Windows
-[![](/images/download.png)](https://sourceforge.net/projects/pidgin/files/Pidgin/2.14.1/pidgin-2.14.1.exe/download)
+{{% sourceforge-download-logo ".exe" %}}
This version of Pidgin downloads an appropriate version of GTK. GTK is now
installed locally for Pidgin, and not system-wide, thus Pidgin will not
interfere with other GTK apps on your system.
If you would like to have GTK included in the installer, we have an [offline
-installer](https://sourceforge.net/projects/pidgin/files/Pidgin/2.14.1/pidgin-2.14.1-offline.exe/download)
+installer]({{% sourceforge-download "-offline.exe" %}})
that bundles everything except spell-checking dictionaries.
-If you're looking for a portable version that doesn't need installation, [we also have that available](https://sourceforge.net/projects/pidgin/files/Pidgin/2.14.1/pidgin-2.14.1-win32-bin.zip/download).
+If you're looking for a portable version that doesn't need installation, [we
+also have that available]({{% sourceforge-download "-win32-bin.zip" %}}).
## Linux
@@ -78,9 +79,9 @@
## Source
-[![](/images/download.png)](https://sourceforge.net/projects/pidgin/files/Pidgin/2.14.1/pidgin-2.14.1.tar.bz2/download)
+{{% sourceforge-download-logo ".tar.bz2" %}}
-This download is for the source code of Pidgin 2.14.1.
+This download is for the source code of Pidgin {{< current-version >}}.
If you want to **use** Pidgin, you should either download and use our Windows
installer or look for pre-built packages from your operating system
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/shortcodes/current-version.md Thu Mar 04 22:33:57 2021 -0600
@@ -0,0 +1,1 @@
+{{- .Site.Params.currentVersion -}}
--- a/hugo/layouts/shortcodes/download-now.html Thu Mar 04 22:33:48 2021 -0600
+++ b/hugo/layouts/shortcodes/download-now.html Thu Mar 04 22:33:57 2021 -0600
@@ -1,7 +1,7 @@
<div class="download-now">
<a class="download-btn" href="/install/">
<span style="vertical-align: middle;">
- <i class="fas fa-download dl-icon"></i> {{ T "Download" }}
+ <i class="fas fa-download dl-icon"></i> {{ T "Download" }} {{ .Site.Params.currentVersion | safeHTML }}
</span>
</a>
<b>Platforms:</b>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/shortcodes/sourceforge-download-logo.md Thu Mar 04 22:33:57 2021 -0600
@@ -0,0 +1,1 @@
+[![](/images/download.png)](https://sourceforge.net/projects/pidgin/files/Pidgin/{{ .Site.Params.currentVersion }}/pidgin-{{ .Site.Params.currentVersion}}{{ .Get 0 }})
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/shortcodes/sourceforge-download.md Thu Mar 04 22:33:57 2021 -0600
@@ -0,0 +1,1 @@
+https://sourceforge.net/projects/pidgin/files/Pidgin/{{ .Site.Params.currentVersion }}/pidgin-{{ .Site.Params.currentVersion}}{{ .Get 0 }}