-
Notifications
You must be signed in to change notification settings - Fork 54
feat: replace pdoc with MkDocs #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
23a11a3
feat: support mkdocs and add automatic docs deployment for GitHub Pages
SimonJasansky d63c316
feat: address PR comments
SimonJasansky 5e8a41e
Update README.md
SimonJasansky a632e45
Update template/README.md.jinja
SimonJasansky ff90ea0
Update uv version
SimonJasansky 517b056
Update mkdocs.yml
SimonJasansky a697fba
update index.md
SimonJasansky c4d2932
feat: remove documentation_tool from copier questions and always supp…
SimonJasansky a17abf1
fix: rename docs folder
SimonJasansky a9ea4b1
fix: update README
SimonJasansky ab9cdce
Apply suggestion from @lsorber
SimonJasansky 02765c3
feat: address PR comments
SimonJasansky c88f0f0
Update template/{% if ci == 'github' %}.github{% endif %}/workflows/d…
SimonJasansky bbdcf7c
Update template/mkdocs.yml.jinja
SimonJasansky c1d23c8
Update template/mkdocs.yml.jinja
SimonJasansky bcf2e54
Update template/mkdocs.yml.jinja
SimonJasansky c36a018
Update template/pyproject.toml.jinja
SimonJasansky 5c3ecb8
Update README.md
SimonJasansky 27b4e64
fix(docs.yml): yaml syntax error
SimonJasansky ca92a3c
feat(mkdocs.yml): strip trailing slashes when parsing project_url
SimonJasansky 61a41a3
feat: move API reference from dedicated folder /reference to file ref…
SimonJasansky 8130999
Update template/pyproject.toml.jinja
SimonJasansky f84eae7
Update template/{% if ci == 'github' %}.github{% endif %}/workflows/d…
SimonJasansky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -33,6 +33,9 @@ notebooks/ | |
| # mise | ||
| mise.local.toml | ||
|
|
||
| # MkDocs | ||
| site/ | ||
|
|
||
| # mypy | ||
| .dmypy.json | ||
| .mypy_cache/ | ||
|
|
||
This file contains hidden or 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 hidden or 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,3 @@ | ||
| # {{ project_name }} | ||
|
|
||
| {{ project_description }} |
3 changes: 3 additions & 0 deletions
3
template/docs/{% if project_type == 'package' %}reference.md{% endif %}.jinja
This file contains hidden or 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,3 @@ | ||
| # Reference | ||
|
|
||
| ::: {{ project_name_snake_case }} |
This file contains hidden or 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,41 @@ | ||
| site_name: {{ project_name }} | ||
| site_description: {{ project_description }} | ||
| site_url: {{ documentation_url }} | ||
| repo_url: {{ project_url }} | ||
| repo_name: {{ project_url.rstrip('/').split('/')[-2:] | join('/') }} | ||
| {%- if typing == 'strict' %} | ||
|
|
||
| strict: true | ||
|
|
||
| validation: | ||
| omitted_files: warn | ||
| absolute_links: warn | ||
| unrecognized_links: warn | ||
| anchors: warn | ||
| {%- endif %} | ||
|
|
||
| theme: | ||
| name: material | ||
|
|
||
| nav: | ||
| - Home: index.md | ||
| {%- if project_type == 'package' %} | ||
| - Reference: reference.md | ||
|
|
||
| watch: | ||
| - src | ||
| {%- endif %} | ||
|
|
||
| plugins: | ||
| - search | ||
| {%- if project_type == 'package' %} | ||
| - mkdocstrings: | ||
| handlers: | ||
| python: | ||
| options: | ||
| docstring_style: numpy | ||
| {%- endif %} | ||
|
|
||
| markdown_extensions: | ||
| - pymdownx.highlight | ||
| - pymdownx.superfences |
This file contains hidden or 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
44 changes: 44 additions & 0 deletions
44
template/{% if ci == 'github' %}.github{% endif %}/workflows/docs.yml.jinja
This file contains hidden or 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,44 @@ | ||
| name: Documentation | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| concurrency: | ||
| group: "pages" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| environment: | ||
| name: github-pages | ||
| url: ${{ "{{" }} steps.deployment.outputs.page_url {{ "}}" }} | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v6 | ||
|
|
||
| - name: Build docs | ||
| run: uv run mkdocs build | ||
|
|
||
| - name: Configure GitHub Pages | ||
| uses: actions/configure-pages@v5 | ||
|
|
||
| - name: Upload GitHub Pages artifact | ||
| uses: actions/upload-pages-artifact@v4 | ||
| with: | ||
| path: site | ||
|
|
||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
lsorber marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| uses: actions/deploy-pages@v4 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.