fedora-kde / fedoraloveskde.org

Created 2 years ago
Maintained by ngompa
Sources for fedoraloveskde.org  |  https://fedoraloveskde.org
Members 4
Ettore Atalan committed 3 months ago

Fedora Loves KDE website

This is source repo for the website available at https://fedoraloveskde.org/. The staging deployment is available at https://stg.fedoraloveskde.org/.


Install the extended version of Hugo from https://gohugo.io/.



hugo serve

And point your browser to: http://localhost:1313/

Build and deploy (staging & production branches)

We currently do not have support for Hugo built websites in Fedora. Thus we temporarily manually build the website and push it to the stading and production branches.

All the commands needed to do so are stored in the justfile in the repo that you can use with https://github.com/casey/just.

The details of each steps follow:

  • Install hugo-i18n for translation support:
sudo dnf install python3-pip gettext
git clone https://invent.kde.org/websites/hugo-i18n.git
cd hugo-i18n
pip install -r requirements.txt
pip install .
  • Checkout staging branch in a distinct folder as a git worktree:
git worktree add ../fedoraloveskde.org-staging staging
  • Update the translations:
export PACKAGE="websites-fedoraloveskde-org"
export FILENAME="fedoraloveskde-org"
hugoi18n extract po/fedoraloveskde-org.pot
hugoi18n compile po
hugoi18n generate
  • Build the staging website:
hugo --minify --config config.yaml,config_staging.yaml
  • Copy the result to the staging directory
rsync --archive --human-readable --delete-after --verbose public/ ../fedoraloveskde.org-staging/public/
  • Commit & push the result
git -C ../fedoraloveskde.org-staging add public
git -C ../fedoraloveskde.org-staging commit "Update ($(date --utc --iso-8601=min))"
git -C ../fedoraloveskde.org-staging push
  • Wait for https://stg.fedoraloveskde.org/ to be updated (happens every hour).

  • Once satisfied with the result, repeat (without the staging config) to push to production:

git worktree add ../fedoraloveskde.org-production production
hugo --minify
rsync --archive --human-readable --delete-after --verbose public/ ../fedoraloveskde.org-production/public/
git -C ../fedoraloveskde.org-production add public
git -C ../fedoraloveskde.org-production commit "Update ($(date --utc --iso-8601=min))"
git -C ../fedoraloveskde.org-production push

Working on the website

This is using hugo. layouts/index.html contains the homepage, i18n/en.yaml contains the strings and assets/sass/bulma.scss contains the style.