JoinJabber website
Based on Compose theme. Find the documentation here.
All text in the content folder is Creative Commons CC-by-SA licensed.
Contributions
Contributions, especially tutorials and translations, are highly appreciated. This website uses plain-text files with simple Markdown formatting. Ready-made PRs or patch files for this repository are perfect and can be made quite easily on the Codeberg web-interface. But if you send us a simple markdown formatted text file with your changes that is also fine.
Everytime you add english content in the website please also run make clean && make locale-update. This is done to sync translation files on weblate with new (english) content, so that translations can be done.
For committers
When commiting new English content make sure to:
- Lock weblate here.
- Ensure every change in weblate is commited and pushed, by:
- clicking the
commitbutton, if any pending changes (the button says:This will commit any pending changes present in Weblate and not in the repository.) - and then the
pushbutton in the above page (the button says:This will push changes to the upstream Git repository.)
- clicking the
git pull --rebaselocally from the joinjabber repository so you have all the latest commits from weblate, and resolve any conflict locally.make clean && make locale-update, this is done to double check everything is in sync still.git commitall changes.git pushto the joinjabber repository.- Pull all latest changes in Weblate by clicking the
updatebutton. (the button says:This will update the Weblate repository with the upstream changes.) - Unlock weblate from the same page.
You can join our project channel via a Jabber client to discuss any contributions with us: project@joinjabber.org or you can also use our simple webclient; no registration required.
Please note that all contributions should be licensed under the Creative Commons CC-by-SA license or a license compatible to it.
Running a local copy of the site for editing
After cloning or downloading the git repository (and ensuring you have the Hugo static site builder installed) open a terminal and change to the website directory. Run make init to pull the submodule for the theme. Then you can start an interactive version of the site by running make server. The terminal output will show a link you can open with any web-browser. Changes to the files will be automatically reflected on this live-updating local version of the website.
Deploying the website on the server
To deploy the website on the server, ssh into the server and do:
cd website/
git pull
website_container
make
This will pull latest changes (any other branch than main can also be deployed). Create a container with the command specified in the website_build alias and finally run the makefile to deploy the website.
Helping with translations
We are comitted to providing our website in multiple languages, however keeping up with changes and adding additional languages is quite a challenge for our small team of voluteers. So please consider helping out!
Translating online
Translations are made available on Codeberg's Weblate instance.
All strings are being served from the same template that contains the whole website. You may want to filter based on language and location of the file (article) you want to translate using the following weblate search query: language:fr location:content/_index.en.md.
It is possible to add a new language directly from Weblate but please contact us (web) (xmpp) when doing so.
Adding a language
New languages being translated won't be visible on the website by default. Please contact us (web) (xmpp)!
Guide for committers to enable a language
If a language is managed by our scripts, it will have a content.*.po file in the po folder, but unless it is listed in the enabled-languages file, it will not be added to the page. Pages are only going to be generated if translations for them are done at least at 80%. When enabling a language please don't forget to manually add it to the menu and language switcher in the config folder, which is not managed by our scripts.
Translating locally
Translations are available in the po folder at the root of the repository. Look for .<lang>.po files.
To add a new language, cp po/content.pot po/content.<lang>.po, and please contact us if you do.
To update the content folder that will be served on the website with new translations, run make locale-build (this is usually only done on our server).
Translating links with hugo ref/relref
Usage of {{< ref "link" >}} or {{< relref "link" >}} in translations may
fail if the linked page doesn't exist yet (or not translated enough). In this
case, remove the link. Periodic checks that links are properly translated
should happen.
When translating from weblate, add a "missing-link" label. When translating
locally, leave a #. Missing link comment. Unfortunately it doesn't seem like
weblate provides a way to leave comments in PO files.