Python web book docgen for Patchouli and Hex Casting.
Project description
hexdoc
A Jinja-based documentation generator for Patchouli books.
This is the library that powers Hex Casting's web book.
IMPORTANT: Version incompatibilities
There are issues related to installing hexdoc with the following dependency versions:
- Python 3.12+ on Windows: https://github.com/aio-libs/multidict/issues/887
- Node.js 20+: https://github.com/stackgl/headless-gl/issues/268
hexdoc is known to work with Python 3.11 and Node.js 18.
Plugins
See hexdoc-hexcasting-template for instructions to set up a hexdoc plugin for a pre-existing Hex Casting addon.
Contributing
Setup
git submodule update --init
python3.11 -m venv venv
.\venv\Scripts\activate # Windows
. venv/bin/activate.fish # fish
source venv/bin/activate # everything else
pip install -e .[dev]
pre-commit install
Usage
For local testing, create a file called .env
in the repo root following this template:
GITHUB_SHA=main
GITHUB_REPOSITORY=hexdoc-dev/hexdoc
GITHUB_PAGES_URL=https://hexdoc.hexxy.media
Useful commands:
# show help
hexdoc -h
# serve hexdoc resources locally
# this is useful if serving other books locally that depend on hexdoc resources
nodemon --exec "hexdoc serve --port 8001 --no-merge"
# render and serve the Hex Casting web book in watch mode
nodemon
# start the Python interpreter with some extra local variables
hexdoc repl
# run tests
pytest # fast, skips Cookiecutter
nox # slow, full test suite in an isolated venv
nox --no-install # after the first Nox run, use this to skip reinstalling everything
# update test snapshots (only running sessions with the tag "test")
nox -t test -- --snapshot-update
# run hexdoc commands in an isolated environment to ensure it works on its own
nox -s hexdoc -- build
nox -s hexdoc -- repl
# set up a dummy book for local testing
nox -s dummy_setup
nox -s dummy_serve
nox -s dummy_hexdoc -- build
nox -s dummy_clean
Badges
Markdown
[![hexdoc](https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc)](https://github.com/hexdoc-dev/hexdoc)
[![powered by hexdoc](https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc?label=1)](https://github.com/hexdoc-dev/hexdoc)
HTML
<a href="https://github.com/hexdoc-dev/hexdoc"><img src="https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc" alt="hexdoc" style="max-width:100%;"></a>
<a href="https://github.com/hexdoc-dev/hexdoc"><img src="https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc?label=1" alt="powered by hexdoc" style="max-width:100%;"></a>
reStructuredText
.. image:: https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc
:target: https://github.com/hexdoc-dev/hexdoc
:alt: hexdoc
.. image:: https://img.shields.io/endpoint?url=https://hexxy.media/api/v0/badge/hexdoc?label=1
:target: https://github.com/hexdoc-dev/hexdoc
:alt: powered by hexdoc
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hexdoc-1!0.1.0a9.tar.gz
(125.3 kB
view details)
Built Distribution
hexdoc-1!0.1.0a9-py3-none-any.whl
(181.3 kB
view details)
File details
Details for the file hexdoc-1!0.1.0a9.tar.gz
.
File metadata
- Download URL: hexdoc-1!0.1.0a9.tar.gz
- Upload date:
- Size: 125.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a61c82cb7a92aa9482847089237655d3580f3aad57f57810f2de29531d50c483 |
|
MD5 | db8c0949fc5455628d66677f107803df |
|
BLAKE2b-256 | cdf877bb4fb48d1590fa4afd9345e60063d3975f2401318af826181c3435d518 |
File details
Details for the file hexdoc-1!0.1.0a9-py3-none-any.whl
.
File metadata
- Download URL: hexdoc-1!0.1.0a9-py3-none-any.whl
- Upload date:
- Size: 181.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59200a366cc6fe6da21b3099ba0769dc63299f922d69a558bec9c0290c27a78d |
|
MD5 | c2df50dff17ae1f3f994f1c00c68bc8a |
|
BLAKE2b-256 | b094ec7d350c3ee24a804fa1452658a64e7f78bed878f2003ee395adc6174e5b |