Skip to content

Commit

Permalink
docs: starter pack (#417)
Browse files Browse the repository at this point in the history
Introducing Canonical starter pack into pebble docs.
  • Loading branch information
IronCore864 authored May 28, 2024
1 parent b45911a commit 20263d0
Show file tree
Hide file tree
Showing 32 changed files with 1,937 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ cmd/VERSION
.idea
.vscode
/pebble

.tox/
dist/
16 changes: 16 additions & 0 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,22 @@ ok github.com/canonical/pebble/cmd/pebble 0.165s
...
```

## Docs

We use [`sphinx`](https://www.sphinx-doc.org/en/master/) to build the docs with styles preconfigured by the [Canonical Documentation Starter Pack](https://github.com/canonical/sphinx-docs-starter-pack).

### Building the Docs

To build the docs, run `tox` under the `docs/` folder.

### Pulling in the Latest Style Changes and Dependencies

To pull in the latest style and dependencies from the starter pack, clone the [Canonical Documentation Starter Pack repository](https://github.com/canonical/sphinx-docs-starter-pack), and follow the README there. TL;DR:

- Copy the content into the `docs/` folder.
- Remove unnecessary files (like Makefile, cheat sheets, etc.)
- Under the `docs/` folder, run `python3 build_requirements.py`. This generates the latest `requirements.txt` under the `.sphinx/` folder.
- Under the `docs/` folder, run `tox -e docs-dep` to compile a pinned requirements file for tox environments.

## Creating a release

Expand Down
Empty file added docs/.custom_wordlist.txt
Empty file.
12 changes: 12 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*env*/
.sphinx/venv/
.sphinx/warnings.txt
.sphinx/.wordlist.dic
.sphinx/.doctrees/
.sphinx/node_modules/
package*.json
_build
.DS_Store
__pycache__
.idea/
.vscode/
32 changes: 32 additions & 0 deletions docs/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# .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-22.04
tools:
python: "3.11"
jobs:
post_checkout:
- cd docs && python3 .sphinx/build_requirements.py
apt_packages:
- distro-info

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: dirhtml
configuration: docs/conf.py
fail_on_warning: true

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
- pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/.sphinx/requirements.txt
13 changes: 13 additions & 0 deletions docs/.sphinx/_static/404.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 20263d0

Please sign in to comment.