Skip to main content

Python web book docgen for Patchouli and Hex Casting.

Project description

hexdoc logo

Docs - hexdoc.hexxy.media PyPI - Version PyPI - Python Version GitHub Workflow Status (with event) hexdoc

hexdoc

A Jinja-based documentation generator for Patchouli books.

This is the library that powers Hex Casting's web book.

Check out the docs at https://hexdoc.hexxy.media!

IMPORTANT: Version incompatibilities

There are issues related to installing hexdoc with the following dependency versions:

hexdoc is known to work with Python 3.11.

Plugins

hexdoc has a few Copier templates that you can use to set up a hexdoc plugin for your mod:

Support

hexdoc does not currently have a dedicated support server. If you have any questions, please feel free to join the Hex Casting Discord server and ask in the #hexdoc channel, or open an issue/discussion on GitHub.

Contributing

Setup

Automatically set up a development environment with Nox:

pipx install nox  # pipx (recommended)
python3 -m pip install nox  # pip

nox -s setup
# next, run the venv activation command printed by uv

Manual 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

# generate and run the full docs website locally, or just run Docusaurus
nox -t docs
nox -s docusaurus

Badges

Shields.io

hexdoc powered by hexdoc

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

Devin's Badges

A badge for hexdoc in the style of Devins Badges A badge for addons.hexxy.media in the style of Devins Badges

Thanks to Sam for making these!

HTML

<a target="_blank" href="INSERT_YOUR_BOOK_LINK_HERE"><img src="https://github.com/SamsTheNerd/HexGloop/blob/73ea39b3becd/externalassets/hexdoc-badgecozy.svg?raw=true" alt="A badge for hexdoc in the style of Devins Badges" width=225></a>

<a target="_blank" href="https://addons.hexxy.media" height=75><img src="https://github.com/SamsTheNerd/HexGloop/blob/73ea39b3becd/externalassets/addon-badge-cozy.svg?raw=true" alt="A badge for addons.hexxy.media in the style of Devins Badges" width=200></a>

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.0a18.tar.gz (148.9 kB view details)

Uploaded Source

Built Distribution

hexdoc-1!0.1.0a18-py3-none-any.whl (215.6 kB view details)

Uploaded Python 3

File details

Details for the file hexdoc-1!0.1.0a18.tar.gz.

File metadata

  • Download URL: hexdoc-1!0.1.0a18.tar.gz
  • Upload date:
  • Size: 148.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for hexdoc-1!0.1.0a18.tar.gz
Algorithm Hash digest
SHA256 87a648c6335c9036019264a396510e484545cea96b55167c163ceffa3be85ee9
MD5 36694bb75aea43a801e4fc591bbb169e
BLAKE2b-256 6e848b7fe5e951d98715b37e642a1084f63eec95a1ba307021a5f6f4cf2de1ac

See more details on using hashes here.

File details

Details for the file hexdoc-1!0.1.0a18-py3-none-any.whl.

File metadata

  • Download URL: hexdoc-1!0.1.0a18-py3-none-any.whl
  • Upload date:
  • Size: 215.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for hexdoc-1!0.1.0a18-py3-none-any.whl
Algorithm Hash digest
SHA256 f2ce7aaf555587b93c2b88049473e30f1e3265c63f3ad5e41493404f8522804c
MD5 3829ce6aa1481e13b38d52cbf4c4a522
BLAKE2b-256 030d30143579d8f1ad8e85f79c0750be9c4b26d2f6a43d2d9484f971da4cd107

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page