Build your own theme
Build your own theme by changing the templates or CSS.
Prepare Python environment
The Awesome Theme uses these Python tools:
Poetry to manage the Python dependencies and building the package
Nox to test and lint the Python code, and to build the docs
Pipx to install Python applications in isolated environments and making them available globally
If you want to use the same versions of the Python tools, you can provide a requirements.txt to the install commands.
To prepare the Python environment, run these commands:
pip install --user pipx [--requirement=requirements.txt] pipx install poetry [--pip-args=--requirement=requirements.txt] pipx install nox [--pip-args=--requirement=requirements.txt]
Install the Python dependencies
Install the Python dependencies:
Optional: install and test the pre-commit hooks:
poetry run pre-commit install
If you don’t plan on committing any changes to the repository, you can skip this step. You can see the active pre-commit hooks in the file .pre-commit-config.yaml.
To test pre-commit with Poetry, run:
poetry run pre-commit run --all
Test your Nox environment.
You can run any Nox session to confirm that the environment is working. To list the available sessions, run:
For example, run all default sessions:
Confirm that Node.js is installed:
$ node --version v20.00.0
If the preceding command fails, make sure that you installed Node.js. If you installed Node.js, make sure that the path to the
nodeexecutable is in your
npm install --global pnpm
Go to the
./sphinxawesome-theme/ ├── src/ │ ├── sphinxawesome_theme/ │ └── theme-src/ ├── docs/ ├── tests/ └── ...
Build the theme:
pnpm run build