Nico Rikken f49937c6cc Temporary fix for theme.json schema
The upstream schema doesn't yet have fontFaces attribute defined. This
is reported in issue: https://core.trac.wordpress.org/ticket/55963
This is a temporary fix to the specification so the validation is
working again.

Signed-off-by: Nico Rikken <nico.rikken@fsfe.org>
2022-06-11 21:06:52 +02:00
2022-06-11 20:34:52 +02:00
2022-06-11 20:34:52 +02:00
2022-06-09 20:07:59 +02:00
2022-06-09 19:55:38 +02:00
2022-06-09 20:07:59 +02:00
2022-06-09 20:07:59 +02:00
2022-06-09 20:07:59 +02:00
2022-06-09 20:07:59 +02:00

FSFE WordPress theme

This dedicated WordPress theme is supposed to become the default theme for the blogging platform offered to supporters More information about the blogging platform is available on the TechDocs/Blogs wiki page.

This project is still in early development.

Development environment

A basic Docker Compose configuration for running WordPress with a MySQL database is included in the repository. Docker has provided this configuration as a documented example of using Docker Compose.

There is official documentation by Docker on how to install Docker Compose.

On Debian you should be able to get a working setup with the following commands:

sudo apt install docker.io docker-compose
sudo docker-compose up

If you prefer Podman for running containers you can let Docker Compose use Podman as the backend. When using Podman together with Docker Compose on Debian, the basic setup can be obtained by running:

sudo apt install podman docker-compose
sudo systemctl start podman.socket
sudo docker-compose up

Now WordPress should be available on http://localhost:8000

Before you can use it, you should walk through the basic setup wizard to name your blog, choose and administrator password and provide an email address.

How it works

The theme in fsfe-blogs directory is mounted in the wordpress container at /var/www/html/wp-content/themes/fsfe-blogs-dev. This mount works in read-write mode so if you want you can also work on the theme from inside the WordPress container. If you make changes from inside the WordPress container, be aware that the file ownership might change, resulting in inaccessible files.

Pre-commit

To help maintain the quality of this codebase git commit hooks are provided to check and format files. The commit hooks in this project are provided by the community through the pre-commit project. Pre-commit is available for installation in many places including distribution repositories and Pip.

Run pre-commit install to set up the git hook scripts.

Optionally run the hooks against all files before git commit using the pre-commit run --all-files command.

Compiling style.css

The WordPress theme style is defined in style.css. Similar to the fsfe.org website the actual CSS is built up from the styles in the look/ directory. In fact because of the shared hertigage it should be able to keep these files synchronized. Less is used as the source to compile the source styles into the final CSS file.

Due to some issues in the underlying Bootstrap files, the stylesheet can not be compiled using the newer version 4.x.x release. Version 3.13.1 has to be used at time of writing. If you want you can install Less globally on your system, but this is not needed. Less is included in the package.json including a convenient wrapper based on onchange:

npm install
npm run build:css # build once
npm run watch:css # watch for changes and build if needed

Important! For completeness and ease of use the rendered style.css file should be committed to git.

Useful resources

WordPress theming

FSFE style and reference material

License

This work is licensed under multiple licences.

  • All original source code is licensed under GPL-2.0-or-later.
  • All documentation is licensed under CC-BY-SA-4.0.
  • Some configuration and data files are licensed under CC0-1.0.

For more accurate information, check the individual files.

The license of the WordPress software was considered in choosing these licenses.

Description
No description provided
Readme 2.3 MiB
Languages
CSS 32.5%
Less 30.7%
PHP 19.9%
HTML 16.9%