Funkwhale project website
This is the repository for the Funkwhale project website, https://funkwhale.audio. The site is written in Pelican with CSS from the Funkwhale design component library.
Local development
To work on the website locally, you need to install the following on your system:
- Poetry: a Python dependency manager
-
make
: a tool for automating build processes
This repository uses a Makefile to automate development and deployment tasks. make
comes preinstalled on most Unix-like systems.
Run the following from the root of the repository to install all dependencies:
$ poetry install
This command sets up a virtual environment which is then used in all Makefile commands.
Run a local development server
To run a local development server that reloads when you make changes, run the following command from the root of the repository:
$ make devserver
Open http://127.0.0.1:8161/
in a browser to see the site preview. You can select a custom port by passing a PORT
variable:
$ PORT=8000 make devserver
Lint your files
This repository uses djlint to check all HTML templates for syntax issues. Run the following command from the root of the repository to run djlint against your changes to make sure they don't introduce errors:
$ make lint
Update translations
To update translations for the site, you first need to extract all translatable strings from the source files. To do this, run the following command from the root of the repository:
$ make i18n_extract
Once you've extracted all translatable strings, run the following command from the root of the repository to update the translation files.
$ make i18n_compile
Build the site for production
To build the site with minified assets, run the following command from the root of the repository:
$ make publish
Test Funkwhale namespaces
This repository contains the definitions of Funkwhale's custom namespaces in the public/ns
file. These namespaces define Funkwhale's custom ActivityStreams objects. To test these namespaces, run the tests in the test_ns.py
file by running the following command in the root of the repository:
$ make test