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/.
Run:
hugo serve
And point your browser to: http://localhost:1313/
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:
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 .
git worktree add ../fedoraloveskde.org-staging staging
export PACKAGE="websites-fedoraloveskde-org" export FILENAME="fedoraloveskde-org" hugoi18n extract po/fedoraloveskde-org.pot hugoi18n compile po hugoi18n generate
hugo --minify --config config.yaml,config_staging.yaml
rsync --archive --human-readable --delete-after --verbose public/ ../fedoraloveskde.org-staging/public/
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
This is using hugo. layouts/index.html
contains the
homepage, i18n/en.yaml
contains the strings and assets/sass/bulma.scss
contains the style.