Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
epinzur committed Oct 8, 2023
1 parent bda6fb8 commit c3fe78c
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 5 deletions.
12 changes: 11 additions & 1 deletion python/docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# quarto build cache
.quarto/

# quartodoc interlink artifacts
_inv/
objects.json

# generated API docs
reference/
objects.json

# files that might remain if a quarto build is interrupted
*.html
index-listing.json
data_types-listing.json
site_libs/
1 change: 0 additions & 1 deletion python/docs/_quarto.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
project:
type: website
output-dir: .quarto/_site
#lib-dir: _static
preview:
port: 4200
browser: true # Open a web browser to view the preview
Expand Down
5 changes: 5 additions & 0 deletions python/docs/guide/_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ execute:
daemon: false
warning: false

format:
html:
link-external-icon: true
link-external-newwindow: true

jupyter: python3
4 changes: 3 additions & 1 deletion python/docs/index.qmd
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
format:
html:
toc: false
css:
- _static/css/design-style.css
- _static/css/root.css
link-external-icon: true
link-external-newwindow: true
toc: false

listing:
- id: cards
Expand Down
16 changes: 14 additions & 2 deletions python/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,28 @@ def docs_gen(session: nox.Session) -> None:
"""Generate API reference docs"""
install(session, groups=["docs"])

reference_dir = Path("docs", "reference")
if reference_dir.exists():
shutil.rmtree(reference_dir)

interlinks_dir = Path("docs", "_inv")
if interlinks_dir.exists():
shutil.rmtree(interlinks_dir)

objects_file = Path("docs", "objects.json")
if objects_file.exists():
objects_file.unlink()

with session.chdir("docs"):
session.run("python", "-m", "_scripts/gen_reference.py")
session.run("python", "_scripts/gen_reference.py")
session.run("python", "-m", "quartodoc", "interlinks")


@nox.session(python=python_versions[0])
def docs(session: nox.Session) -> None:
"""Build and serve the documentation with live reloading on file changes."""

install(session, groups=["typecheck", "docs"])
install(session, groups=["docs"])

build_dir = Path("docs", ".quarto", "_site")
if build_dir.exists():
Expand Down

0 comments on commit c3fe78c

Please sign in to comment.