-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation: Add initial docs setup (#31)
Co-authored-by: Storm B. Heg <[email protected]>
- Loading branch information
Showing
11 changed files
with
570 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Build Documentation | ||
|
||
on: | ||
push: | ||
paths: | ||
- "docs/**" # Only trigger when files in docs folder change | ||
branches: | ||
- "**" | ||
pull_request: | ||
paths: | ||
- "docs/**" # Only trigger when files in docs folder change | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
cache: "pip" | ||
|
||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -e '.[docs]' | ||
- name: Build Documentation | ||
working-directory: ./docs | ||
run: | | ||
make html | ||
- name: Upload documentation artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sphinx-docs | ||
path: docs/_build/html/ | ||
retention-days: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ A sandbox project is included in this repository to aid in development. | |
- [Yarn](https://yarnpkg.com/) | ||
- [Pre-commit](https://pre-commit.com/) | ||
- [Caddy](https://caddyserver.com/) (optional, but recommended for https testing) | ||
- [GNU](https://www.gnu.org) | ||
|
||
## Installation (sandbox) | ||
|
||
|
@@ -82,6 +83,36 @@ The pre-commit hooks will now run automatically when you try to commit changes. | |
|
||
pre-commit run --all-files | ||
|
||
## Documentation | ||
|
||
This project's documentation uses the [Sphinx](https://www.sphinx-doc.org) [Alabaster](https://alabaster.readthedocs.io/) theme. | ||
|
||
To build the documentation, follow these steps: | ||
|
||
1. Clone the repository: | ||
|
||
``` | ||
git clone [email protected]:Stormbase/django-otp-webauthn.git | ||
``` | ||
|
||
2. Navigate to the docs folder: | ||
|
||
``` | ||
cd docs | ||
``` | ||
|
||
3. Build the documentation: | ||
|
||
``` | ||
make html | ||
``` | ||
|
||
4. Serve it, and watch for changes: | ||
|
||
``` | ||
make run | ||
``` | ||
|
||
## Releasing | ||
|
||
Releasing a new version is semi-automated. The following steps should be taken: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
# Start a local development server to automatically rebuild and serve the HTML documentation | ||
# whenever changes are made to the source files. | ||
run: | ||
sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = "Django OTP WebAuthn" | ||
copyright = "2024" | ||
author = "Stormbase and individual contributors" | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [] | ||
|
||
templates_path = ["_templates"] | ||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "venv"] | ||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = "alabaster" | ||
html_static_path = ["_static"] | ||
|
||
# -- Customize Alabaster theme ----------------------------------------------- | ||
# https://alabaster.readthedocs.io/en/latest/index.html | ||
|
||
html_theme_options = { | ||
"description": "An implementation of WebAuthn Passkeys for Django", | ||
"logo": "", | ||
"github_banner": True, | ||
"github_button": True, | ||
"github_type": "star", | ||
"github_user": "Stormbase", | ||
"github_repo": "django-otp-webauthn", | ||
"page_width": "97%", | ||
} |
Oops, something went wrong.