This repository contains the source files of fsfe.org, pdfreaders.org, freeyourandroid.org, ilovefs.org, drm.info, and test.fsfe.org.
Our web team has compiled some information about technology used for this website on the Information for Webmasters page. This is mainly focused on page content.
For information on how the build process works see docs subfolder. For more information on contributing to the buid process, please see the contributor docs for some useful tips.
Some tips for management can be found in the management docs
Most files are XHTML files organised in a rather logical folder structure.
Every website served using this repo has its own folder with the full domain name it is to be served from.
This repository also contains the source files of other websites the FSFE hosts:
fsfe.org
for fsfe.orgactivities/android
for freeyourandroid.orgactivities/ilovefs
for ilovefs.orgdrm.info
for drm.infopdfreaders.org
for pdfreaders.org- test.fsfe.org is fsfe.org built from the test branch of this repository
Notable top level directories are:
build
: Python build tooling.global
: Globally used data files, modules, XSl, also the static translated strings. Generally contains data used in multiple sites, but not suitable to place in build process.tools
: Contains miscellaneous scripts and tools, usually not used as part of the build process. Rather for contributor use.
And of course the different website folders.
And here are some notable directories inside the folder for the main webpage, fsfe.org.
about
: Information about the FSFE itself, its team members etcactivities
: All specific FSFE activitiesat
,de
,ee
etc: Folders used for the FSFE country teamscgi-bin
: Our very few CGI scriptserror
: Custom 4xx and 5xx error pagesevents
: Files for our events, ordered by yearfreesoftware
: More timeless pages explaining Free Software and related topicsgraphics
: Icons, pictures and logosinternal
: Forms used mostly by FSFE staff for internal processeslook
: CSS and other style filesnews
: Files for news articles, press releases, and newsletters ordered by yearorder
: Our web shopscripts
: JavaScript files used on our pagestags
: Files necessary to display used tags throughout the website. Mostly automatically generated
Become member of our awesome webmaster team and help to improve our online information platform!
We adore our voluntary translators who make information about Free Software available over 30 languages, from Arabic to Turkish!
Join them to spread the message of our community in all over Europe and beyond. The translators team page will introduce you to their amazing work.
You can see the current status of translation progress of fsfe.org at status.fsfe.org/translations
See the docs for more comprehesive and beginner-friendly documentation.
There are two ways to build and develop the directory locally. Initial builds of the webpages may take ~6 minutes, but subsequent builds should be much faster. Using the --languages
flag to avoid building all supported languages can make this much faster. The --sites
flag allows for building only some of the sites in this repo, which can also provide a speed boost to the developer experience. Run uv run build.py --help
for more information.
Alterations to build scripts or the files used site-wide will result in near full rebuilds.
We can either install the required dependencies manually using our preferred package manager. If you are a nix use one can run nix-shell
to enter a shell with the required build dependencies.
If installing manually, you need the python package uv
and the node package lessc
.
Also needed are the libraries
libxml2 libxslt
As we are using UV we can just run the build process directly, and let it handle deps.
The pages can be built and served by running uv run build
. Try --help
for more information. The simple web server used lacks the features of apache
which used on the FSFE web servers. This is why no index is automatically selected for each directory and other behaviours.
Docker is used on the build server, so you can use this to replicate the exact behavior Advantage: Reproducibility, no changes on the host system Disadvantage: Docker breaks sometimes, bigger install size, more network usage
The docker build process is in some ways designed for deployment. This means that it expects some environment variables to be set to function. Namely, it will try and load ssh credentials and git credentials, and docker does not support providing default values to these.
So, to stub out this functionality, please set the environment variables
FSFE_WEBSITE_KEY_PRIVATE FSFE_WEBSITE_KEY_PASSWORD FSFE_WEBSITE_GIT_TOKEN
to equal none
when running docker. One can set them for the shell session, an example in bash is seen below.
export FSFE_WEBSITE_KEY_PRIVATE=none;
export FSFE_WEBSITE_KEY_PASSWORD=none;
export FSFE_WEBSITE_GIT_TOKEN=none;
One can then run Docker commands like docker compose ...
.
Alternatively one can prefix the Docker commands with the required variables, like so
FSFE_WEBSITE_KEY_PRIVATE=none FSFE_WEBSITE_KEY_PASSWORD=none FSFE_WEBSITE_GIT_TOKEN=none docker compose
Once your preferred method has been chosen, simply running docker compose run --service-ports build --serve
should build the webpages and make them available over localhost.
Some more explanation: we are essentially just using docker as a way to provide dependencies and then running the build script. All flags after build
are passed to the build
cli. The service-ports
flag is required to open ports from the container for serving the output, not needed if not using the --serve
flag of the build script.
The repo contains some highly recommended githooks using lefthook that one should enable. They check for several kinds of common issues. They are also run in CI, so enabling them locally speeds the development feedback loop.
Lefthook is installed as part of the python virtual environment. If using the nix-shell
the hooks are automatically activated and all required dependencies installed. If not, one must install them using
lefthook install
The hooks have some extra dependencies, at time of writing:
ruff git xmllint sed file grep bash perl mediainfo curl mktemp
While most small changes can be tested adequately by building locally some larger changes, particularly ones relating to the order pages, event registration and other forms may require more integrated testing. This can be achieved using the test
branch. This branch is built and served in the same way as the main site, fsfe.org. The built version of the test
branch may be viewed at test.fsfe.org.
The status of builds of fsfe.org and test.fsfe.org can be viewed at status.fsfe.org