mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-17 16:38:54 +00:00
* Publish an epub of the docs on Read the Docs (#1835) Read the Docs' built-in formats support (the existing formats: all in .readthedocs.yaml) only produces epub/PDF for Sphinx projects, and is a silent no-op for MkDocs ones. Instead, per RTD's documented build-customization path, generate the epub ourselves in a post_build job and place it in $READTHEDOCS_OUTPUT/epub/, which RTD then publishes on the project Downloads page and in the docs flyout menu. The epub itself is built by the new docs/build-epub.sh: it takes the committed, generated Markdown pages in docs/src in mkdocs.yml nav order, strips the HTML-only quicklinks header from each page, and runs pandoc (installed on RTD via build.apt_packages). Locally, `make -C docs epub` does the same for anyone with pandoc installed; nothing here is part of `make dev` or any default build path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix misrender --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
32 lines
896 B
YAML
32 lines
896 B
YAML
# .readthedocs.yaml
|
|
# Read the Docs configuration file
|
|
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
|
|
# Required
|
|
version: 2
|
|
|
|
# Set the version of Python and other tools you might need
|
|
build:
|
|
os: ubuntu-24.04
|
|
tools:
|
|
python: "3.12"
|
|
apt_packages:
|
|
- pandoc
|
|
jobs:
|
|
# Read the Docs' built-in `formats:` support (below) only produces
|
|
# epub/PDF/htmlzip for Sphinx projects, not MkDocs ones. So for issue
|
|
# #1835 we build the epub ourselves after the MkDocs HTML build; anything
|
|
# placed in $READTHEDOCS_OUTPUT/epub/ is published on the project's
|
|
# Downloads page and in the docs' flyout menu.
|
|
post_build:
|
|
- mkdir -p $READTHEDOCS_OUTPUT/epub
|
|
- bash docs/build-epub.sh $READTHEDOCS_OUTPUT/epub/miller.epub
|
|
|
|
python:
|
|
install:
|
|
- requirements: docs/requirements.txt
|
|
|
|
mkdocs:
|
|
configuration: docs/mkdocs.yml
|
|
|
|
formats: all
|