Skip to content

Commit

Permalink
add bin/ entrypoint for building PDF
Browse files Browse the repository at this point in the history
To export the docs as a PDF
  • Loading branch information
vdloo committed Jan 14, 2024
1 parent f0ea468 commit 2793a4e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ pub
*.css.map
deployment-report.json
build/
venv/
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,12 @@ To inspect the contents of the deb archive you can run:
/usr/share/doc/hndocsnext/README.md
/usr/share/doc/hndocsnext/changelog.gz
```

## Build as PDF

To build the documentation as a single PDF file, run the following command:
```
bin/build_pdf
```

The built PDF will then be in `docs/_build/pdf/`.
8 changes: 8 additions & 0 deletions bin/build_pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

set -e

pushd docs
make pdf
echo "pdf located at $(realpath _build/pdf/Python.pdf)"
popd
4 changes: 3 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
# -- Project information -----------------------------------------------------

project = "Docs"
copyright = "2023, Hypernode"
copyright = "2024, Hypernode"
author = "Hypernode"
version = "https://docs.hypernode.com/"

# The full version, including alpha/beta/rc tags
release = "dev"
Expand All @@ -47,6 +48,7 @@
"hypernode.sphinx.extensions.meta_robots",
"hypernode.sphinx.extensions.github_actions_logging",
"sphinxcontrib.mermaid",
"rst2pdf.pdfbuilder",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
1 change: 1 addition & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ sphinx-notfound-page==0.8.3
sphinx-sitemap==2.4.0
GitPython==3.1.30
sphinxcontrib-mermaid==0.7.1
rst2pdf==0.99

# hypernode/ requirements
beautifulsoup4==4.11.1
Expand Down

0 comments on commit 2793a4e

Please sign in to comment.