Hugo source of https://chatrix.one (English and Bulgarian).
hugo server
Then open http://localhost:1313. This preview is for your PC only: its output contains a livereload script and localhost links, so never upload it.
| What you want to change | File to open |
|---|---|
| English page text (headlines, features, downloads) | content/en/_index.md |
| Bulgarian page text | content/bg/_index.md |
| English nav, footer, labels | i18n/en.toml |
| Bulgarian nav, footer, labels | i18n/bg.toml |
| Colors, fonts, spacing | static/styles.css |
| Page structure | layouts/ |
| Site settings | config/_default/hugo.toml |
Push to main. That's all.
- GitHub Actions (
.github/workflows/deploy.yml) builds the site withhugo --minifyand checks it (deploy/check-public.sh). - If the check passes, the output is pushed to the
sitebranch. - chatrix.one checks the
sitebranch every 5 minutes and copies what changed into/var/www/chatrix.one/site/(deploy/chatrix-site-sync).
A failed build never reaches the server. Don't edit files on the server:
the next push overwrites them. Folders the build doesn't have (rules/,
.well-known/, webchat/ and others made by the server) are never touched.
install -m 755 deploy/chatrix-site-sync /usr/local/sbin/
install -m 644 deploy/chatrix-site-sync.service deploy/chatrix-site-sync.timer /etc/systemd/system/
systemctl daemon-reload
chatrix-site-sync --dry-run
systemctl enable --now chatrix-site-sync.timer
Log: journalctl -u chatrix-site-sync. Sync now: systemctl start chatrix-site-sync.