Skip to content

Commit b8094cf

Browse files
committed
move from sphinx to quartodoc
1 parent 7815f3d commit b8094cf

36 files changed

Lines changed: 560 additions & 306 deletions

.github/workflows/docs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,30 @@ jobs:
2121
run: |
2222
python -m pip install --upgrade pip
2323
python -m pip install -e .[dev]
24+
- name: Set up Quarto
25+
uses: quarto-dev/quarto-actions/setup@v2
2426
- name: build docs
2527
run: |
2628
make docs
2729
- name: save docs
2830
uses: actions/upload-artifact@v3
2931
with:
3032
name: docs-html
31-
path: docs/_build/html/
33+
path: docs/_site/
3234
- name: publish dev docs
3335
if: github.ref_name == 'main' && github.ref_type == 'branch'
3436
uses: peaceiris/actions-gh-pages@v3
3537
with:
3638
github_token: ${{ secrets.GITHUB_TOKEN }}
37-
publish_dir: docs/_build/*
39+
publish_dir: docs/_site/*
3840
publish_branch: gh-pages
3941
destination_dir: main
4042
- name: publish stable docs
4143
if: github.ref_type == 'tag' && startswith(github.ref, 'refs/tags/v')
4244
uses: peaceiris/actions-gh-pages@v3
4345
with:
4446
github_token: ${{ secrets.GITHUB_TOKEN }}
45-
publish_dir: docs/_build/*
47+
publish_dir: docs/_site/*
4648
publish_branch: gh-pages
4749
destination_dir: ${{ github.ref_name }}
4850
- name: create symlink stable to new version

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,5 @@ NOTES.md
142142
## RStudio
143143
*.Rproj
144144
.Rproj.user
145+
146+
/.quarto/

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
exclude: "(.*\\.csv)|(^examples/)|(^vetiver/tests/snapshots/)"
3+
exclude: "(.*\\.csv)|(^examples/)|(^vetiver/tests/snapshots/)|(^docs/_extensions/*)"
44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
66
rev: v2.4.0

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ docs-clean:
7171
$(MAKE) -C docs clean
7272

7373
docs doc documentation:
74-
$(MAKE) -C docs html
75-
$(BROWSER) docs/_build/html/index.html
74+
python -m quartodoc build
75+
python -m quartodoc interlinks
76+
quarto render
7677

7778
release: dist
7879
twine upload dist/*

docs/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/.quarto/
2+
/_site/
3+
objects.json
4+
/_sidebar.yml
5+
/reference
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.html
2+
*.pdf
3+
*_files/
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Interlinks Extension For Quarto
2+
3+
_TODO_: Add a short description of your extension.
4+
5+
## Installing
6+
7+
_TODO_: Replace the `<github-organization>` with your GitHub organization.
8+
9+
```bash
10+
quarto add <github-organization>/interlinks
11+
```
12+
13+
This will install the extension under the `_extensions` subdirectory.
14+
If you're using version control, you will want to check in this directory.
15+
16+
## Using
17+
18+
_TODO_: Describe how to use your extension.
19+
20+
## Example
21+
22+
Here is the source code for a minimal example: [example.qmd](example.qmd).
23+
24+
## Developing
25+
26+
To see the AST the filter operates on, use this command:
27+
28+
```
29+
quarto render example.qmd --to native --output -
30+
```
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
title: Interlinks
2+
author: Michael Chow
3+
version: 1.0.0
4+
quarto-required: ">=1.2.0"
5+
contributes:
6+
filters:
7+
- interlinks.py
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: "Interlinks Example"
3+
filters:
4+
- interlinks.py
5+
interlinks:
6+
sources:
7+
siuba:
8+
url: https://siuba.org/
9+
inv: null
10+
fallback: objects_siuba.json
11+
vetiver:
12+
url: https://vetiver.rstudio.com/
13+
inv: null
14+
fallback: objects_vetiver.json
15+
---
16+
17+
## Heading {#sec-hello}
18+
19+
## Testing
20+
21+
22+
| style | syntax | output |
23+
| ----- | ------ | ------ |
24+
| md custom text | `[some explanation](`vetiver.SKLearnHandler`)` | [some explanation](`vetiver.SKLearnHandler`) |
25+
| md blank text | `[](`vetiver.SKLearnHandler`)` | [](`vetiver.SKLearnHandler`) |
26+
| md blank text (~shortened)| `[](`~vetiver.SKLearnHandler`)` | [](`~vetiver.SKLearnHandler`) |
27+
| rst custom text | `` :ref:`some explanation <vetiver.SKLearnHandler>` `` | :ref:`some explanation <vetiver.SKLearnHandler>` |
28+
| rst blank text | `` :ref:`vetiver.SKLearnHandler` `` | :ref:`vetiver.SKLearnHandler` |
29+
| rst blank text (~shortened) | `` :ref:`~vetiver.SKLearnHandler` `` | :ref:`~vetiver.SKLearnHandler` |

0 commit comments

Comments
 (0)