- HTML 79.4%
- Python 13.8%
- Makefile 5%
- Nix 1.8%
| content | added communication channels | |
| output @038d899f74 | Changes for Akademy 2026 | |
| pelican-plugins @216d1ddb5c | Added plugins as submodule (and .gitignore) | |
| themes | bump theme submodule | |
| .envrc | Add nix flake | |
| .gitignore | Add nix flake | |
| .gitmodules | Renamed the repos | |
| flake.lock | Add nix flake | |
| flake.nix | Add nix flake | |
| Makefile | Initial Pelican set-up | |
| pelicanconf.py | Put the map on the main website | |
| publishconf.py | Initial Pelican set-up | |
| README.markdown | Fixing typos | |
| tasks.py | Initial Pelican set-up | |
HackerTrain website sources
Source code and content for the https://Hackertrain.org website.
Set up environment
This page is built with Pelican – follow its official documentation to install it. Typically through pipx or the package manager of your choice (as long as it is shipping a fairly recent version).
Also make sure you have the following packages installed the same way as Pelican:
- beautifulsoup4 because of the extract_toc plugin
Then you can clone this repository and initialize its submodules to get to the latest:
git clone ssh://git@codeberg.org/HackerTrain/pages-sources.git www-hackertrain-sources
cd www-hackertrain-sources
git submodule init
git submodule update --recursive
Contributing
Articles and pages are stored in MarkDown format in the content/ folder – this is where you can add/edit yours. See Pelican documentation for details.
The category layout is as follows:
content/news/– news- (new category folders can be made as needed)
Special folders that are not categories:
content/pages/– static pagescontent/documents/– documents to be linked in the articles and pages themselvescontent/img/– images to be linked in the articles themselvescontent/extra/– special files likerobots.txt
Local testing
To test the website on your own machine, the following command is useful. It listens to the changes to the content, theme and settings, and automatically re-generates the output/ folder as well as serves it in a simple local web server.
pelican --listen --autoreload
That way you can check your progress live on http://localhost:8000.
If you are running into trouble with the theme or links not working, because you cannot access the domain, add the --relative-urls flag.
Committing and pushing
Remember that this repository includes submodules, so when you change something in the folders that are in fact submodules, you should commit and push first to the actual submodule.
Typical example: you write a new blog post and want to push that:
- you write a news item and save it e.g. to
content/news/good-news-everyone.markdown - you run
pelicanto generate the HTML (and check it works) - with
git add content/news/good-news-everyone.markdown,git commitandgit pushyou add this article’s source to this Git repository cd outputto enter thepagessubmodule- now
git add --all && git commit && git pushto update the actual HTML (etc.) website content to thepagesGit repository cd ..to get back to the main repository andgit add output && git commit && git pushto make make sure the main repository points to changes to thepagessubmodule- you should see the results reflect on https://hackertrain.org very shortly thereafter
Act in a similar vain when you edit the theme in themes/Peli-Kiera/ too.
Further reading:
Changes to the theme
The theme currently used is: https://codeberg.org/Cyberpipe/Peli-Kiera, which is located in this repository as a git submodule in themes/Peli-Keira.
The theme is a fork of Peli-Kiera.
License
Do note that the https://Hackertrain.org website is published under the CC-BY-4.0 license.