OSGeo / grass-website

Web site of GRASS GIS project (deployed from this repo twice a day)
https://grass.osgeo.org
GNU General Public License v3.0
17 stars 47 forks source link

How to use the grass version number variables in HTML? #351

Closed neteler closed 1 year ago

neteler commented 1 year ago

(this related to "fix/grass version numbers #318")

While I know how to use the variables in .md files, how to use it in .html?

Specifically, I want to add a line with the current version number to themes/grass/layouts/404.html since I see from our Matomo statistics that ppl try to find very old versions (they go to old news for whatever reason, then fail to find very old binaries) and need a hint about the current version on the "404" page:

            <br><br>
            Current version: GRASS GIS {{< grassVersion version="current" >}}

Now, hugo server dislikes this addition (as it is likely in markdown-only style).

Any pointer on usage of the variables in HTML files would be welcome.

veroandreo commented 1 year ago

This worked: GRASS version: GRASS GIS {{ .Site.Data.grass.current_version }}. I found it here: https://github.com/OSGeo/grass-website/blob/master/themes/grass/layouts/shortcodes/grassVersion.html and the local build seems ok:

image

Was that what you wanted to get?

neteler commented 1 year ago

Cool, this helped. PR created: #353