forked from doorstop-dev/doorstop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate requirements markdown with inclusion in docs
- Loading branch information
Showing
4 changed files
with
32 additions
and
6 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 |
---|---|---|
@@ -1,13 +1,20 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.9" | ||
jobs: | ||
post_create_environment: | ||
# Install poetry | ||
# https://python-poetry.org/docs/#installing-manually | ||
- pip install poetry | ||
post_install: | ||
# Install dependencies with 'docs' dependency group | ||
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups | ||
# VIRTUAL_ENV needs to be set manually for now. | ||
# See https://github.com/readthedocs/readthedocs.org/pull/11152/ | ||
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install | ||
|
||
mkdocs: | ||
configuration: mkdocs.yml | ||
|
||
python: | ||
install: | ||
- requirements: docs/requirements.txt |
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
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,15 @@ | ||
import os | ||
|
||
from doorstop.core import publisher, builder | ||
from doorstop.cli import utilities | ||
|
||
|
||
def on_pre_build(config): | ||
cwd = os.getcwd() | ||
path = os.path.abspath(os.path.join(cwd, "docs/gen")) | ||
tree = builder.build(cwd=cwd) | ||
|
||
published_path = publisher.publish(tree, path, ".md", index=True) | ||
|
||
if published_path: | ||
utilities.show("published: {}".format(published_path)) |
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