Skip to content

Commit

Permalink
fix: mkdocs nox commands and refine conf file (#18)
Browse files Browse the repository at this point in the history
Signed-off-by: l.feng <[email protected]>
  • Loading branch information
msclock authored Dec 1, 2024
1 parent 929c461 commit 116028a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[% from pathjoin("includes", "variable.jinja") import repo_url with context -%]
[% from pathjoin("includes", "variable.jinja") import page_url with context -%]
[%- from pathjoin("includes", "utilities.jinja") import first_letters with context -%]

site_name: {{ project_name }}
site_description: {{ project_description }}
Expand All @@ -12,13 +13,15 @@ docs_dir: .

exclude_docs: |
out
build
docs/includes
[%- if repo_name == 'ss-pybind11' %]
template
[%- endif %]

theme:
name: material
favicon: "https://img.shields.io/badge/{{ first_letters(project_name) }}-blue"

features:
- content.action.edit
Expand Down Expand Up @@ -103,8 +106,6 @@ plugins:
enable_creation_date: true
fallback_to_build_date: true
type: datetime
exclude:
- out/*
- minify:
minify_html: true
minify_js: true
Expand Down
4 changes: 2 additions & 2 deletions template/noxfile.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def docs(session: nox.Session) -> None:
shared_args.append("--strict")

if args.serve:
session.run("mkdocs", "--serve")
session.run("mkdocs", "serve", *posargs)
else:
session.run("mkdocs", "build", "-d", "docs/_build/html")
session.run("mkdocs", *shared_args)
[% endif %]

@nox.session
Expand Down

0 comments on commit 116028a

Please sign in to comment.