This repository contains the code of the GRASS GIS project website: https://grass.osgeo.org/
Mailing list for discussions: https://lists.osgeo.org/mailman/listinfo/grass-web
Below some instructions how to contribute by running a local instance for testing prior to commit changes as pull requests.
Currently, the website is built with hugo version 0.113.0.
git clone https://github.com/OSGeo/grass-website.git
apt-get update
apt install hugo
cd grass-website
hugo
Output HTML generated in the /public directory at the root of the grass-website
directory
Run hugo development server from the grass-website
root directory:
cd grass-website
hugo server
View the website running at http://localhost:1313
Content must be created in .md files using markdown syntax. HTML markup can also be mixed with markdown for more advanced content presentation.
Useful resources:
-
Head to the news directory cd /grass-website/content/news
-
Create new md file sudo nano mynewsitem.md
-
Add the basic header information for Hugo, at least title, date, layout
-
Write content in mardown bellow
-
Rebuild if needed
cd ../../ hugo
-
Check result at http://localhost:1313/news/
-
Head to a content subdirectory, for example the one used for the About section cd /grass-website/content/about
-
Create a new md file using the basic hugo header and markdown syntax (more info coming soon)
-
Create a specific template if advance page presentation is needed (see /themes/grass/layouts/) (more info coming soon)
-
Edit config.toml and add the new page as a new menu item as a children of the About section, as follows
[[Languages.en.menu.main]] parent = "About" name = "My new page" URL = "/about/mypage" weight = 1
-
Rebuild if needed
cd ../../ hugo
-
Check result at http://localhost:1313/about/mypage
Search engine optimization works like this:
If the md file used for generating the page has a summary, its value is used as page meta description, otherwise the general description defined in config.toml
is used by default.
-
Head to the news directory cd /grass-website/content/events
-
Create new md file sudo nano EVENT_NAME.md
-
Use the following header information template for Hugo
title: "CONFERENCE NAME" event: start: YYYY-MM-DD end: YYYY-MM-DD where: CITY, COUNTRY website: URL layout: "event" logo: images/conferences_logos/CONF_LOGO_YEAR.png
-
Add your logo to
/grass-website/images/conferences_logos
folder -
Rebuild if needed
cd ../../ hugo
-
Check result at http://localhost:1313/news/ in the
Next Events
section in the right sidebar. Your event will show up only if it is one in the top three from today.
Like it? Then please submit your improvements as a new pull request.