Skip to content

Commit

Permalink
fixup! docs: Generate documentation with sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
Melkor333 committed Dec 18, 2024
1 parent 8728073 commit 3c08e40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ test: pytest mypy lint-code ## run all testing


.PHONY: docs
docs: poetry-install
docs: poetry-install ## generate documentation
rm -vrf docs/_build/* docs/cli/*
[[ -d docs/sphinx-template ]] || git clone https://github.com/adfinis-sygroup/adsy-sphinx-template docs/sphinx-template
@docker compose exec testing bash -c "poetry install --only docs"
Expand All @@ -76,13 +76,13 @@ docs: poetry-install

# Generate CLI docs
@docker compose exec testing bash -c "mkdir -p docs/_temp && poetry run mdclick dumps --baseModule=pyaptly.cli --baseCommand=pyaptly --docsPath=./docs/_temp"

@cat docs/_temp/pyaptly.md docs/_temp/pyaptly-*.md > docs/Command_Line_Reference.md
# mdclick has not enough indentation
@sed -i 's/^#/##/' docs/Command_Line_Reference.md
# Add title, must happen after the above sed command
@sed -i '1a<!-- This file is generated with mdclick -->\n# Command Line Reference' docs/Command_Line_Reference.md
@rm -r docs/_temp
@docker compose exec testing bash -c "rm -r docs/_temp"

# SPHINX Render
@docker compose exec testing bash -c 'cd docs/ && poetry run make html'
Expand Down

0 comments on commit 3c08e40

Please sign in to comment.