Skip to content

About

GStreamer website

Resources

Contributing

Stars

8 stars

Watchers

4 watching

Forks

Latest commit

 

History

2,763 Commits

Folders and files

Repository files navigation

GStreamer website

Source of https://gstreamer.freedesktop.org/, built with Hugo (extended edition, version pinned in ci/docker/prepare.sh).

Layout:

  • content/ Markdown pages with front matter (news, releases, security, conference, modules, ...)
  • layouts/ Hugo templates and partials
  • assets/ CSS and other processed assets
  • site-data/ nav.yml, release.yml, conference schedules
  • src/ images, documents and Apache config of the legacy site, mounted into the build by hugo.toml
  • archetypes/ templates for hugo new
  • tools/ fetch-activity.py, lint-content.py, check-links.py, new-release.py
  • planet/ script used by the Planet cron job on the server

Local preview

hugo server          # http://localhost:1313/, rebuilds on every save
hugo --destination public   # one-off build
sh tools/post-build.sh public   # installs the .htaccess files

URLs are "ugly" (/security/sa-2024-0001.html) so that all legacy URLs keep working.

Checks

python3 tools/lint-content.py                 # front matter of every content file
hugo --destination public
python3 tools/check-links.py --public public  # broken internal links and anchors
python3 tools/fetch-activity.py               # write build/activity.json, the statistics of the home page (optional, offline safe)

Deploy

CI (.gitlab-ci.yml) lints the content, builds the site with Hugo and checks the internal links (build website, in the user's namespace and in merge requests).

In the gstreamer namespace, the website job builds the site on the main branch, after each merge and from a daily scheduled pipeline (which also refreshes the activity numbers on the home page), and keeps it as an artifact. The server runs ci/www_cron.py to deploy the artifacts of the CI jobs. Try it anywhere with ci/www_cron.py --www /tmp/www --dry-run, and test it with python3 -m unittest discover -s ci -p 'test_*.py'.

To update content, see CONTRIBUTING.md.

About

GStreamer website

Resources

Contributing

Stars

8 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages