diff --git a/python/cpp/Makefile.jinja b/python/cpp/Makefile.jinja index 706008d..b515de3 100644 --- a/python/cpp/Makefile.jinja +++ b/python/cpp/Makefile.jinja @@ -30,8 +30,8 @@ lint-cpp: ## run cpp linter clang-format --dry-run -Werror -i -style=file `find ./cpp -name "*.*pp"` lint-docs: ## lint docs with mdformat and codespell - python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat --check README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} lint: lint-cpp lint-py ## run project linters @@ -47,8 +47,8 @@ fix-cpp: ## fix cpp formatting clang-format -i -style=file `find ./cpp -name "*.*pp"` fix-docs: ## autoformat docs with mdformat and codespell - python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib --write README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} fix: fix-cpp fix-py fix-docs ## run project autoformatters diff --git a/python/cpp/pyproject.toml.jinja b/python/cpp/pyproject.toml.jinja index cdbc0d5..3826a53 100644 --- a/python/cpp/pyproject.toml.jinja +++ b/python/cpp/pyproject.toml.jinja @@ -49,6 +49,7 @@ develop = [ "hatch-cpp{% if add_pyodide %}>=0.5.0{% endif %}", "hatchling", "mdformat", + "mdformat-frontmatter", "mdformat-tables>=1", "pybind11", "pytest", diff --git a/python/cppjswasm/Makefile.jinja b/python/cppjswasm/Makefile.jinja index c4231ec..e243c04 100644 --- a/python/cppjswasm/Makefile.jinja +++ b/python/cppjswasm/Makefile.jinja @@ -58,8 +58,8 @@ lint-cpp: ## run C++ linter make -C cpp lint lint-docs: ## lint docs with mdformat and codespell - python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat --check README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} lint: lint-cpp lint-js lint-py lint-docs ## run project linters @@ -78,8 +78,8 @@ fix-cpp: ## fix C++ formatting make -C cpp fix fix-docs: ## autoformat docs with mdformat and codespell - python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib --write README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} fix: fix-cpp fix-js fix-py fix-docs ## run project autoformatters diff --git a/python/cppjswasm/pyproject.toml.jinja b/python/cppjswasm/pyproject.toml.jinja index 1c7ba27..6425332 100644 --- a/python/cppjswasm/pyproject.toml.jinja +++ b/python/cppjswasm/pyproject.toml.jinja @@ -53,6 +53,7 @@ develop = [ "hatchling", "pybind11", "mdformat", + "mdformat-frontmatter", "mdformat-tables>=1", "pytest", "pytest-cov", diff --git a/python/cython/Makefile.jinja b/python/cython/Makefile.jinja index 31b538c..1842e9e 100644 --- a/python/cython/Makefile.jinja +++ b/python/cython/Makefile.jinja @@ -18,16 +18,16 @@ lint-py: ## lint Python with ruff python -m ruff format --check {{ module }} lint-docs: ## lint documentation - python -m mdformat --check README.md docs/development.md{% if add_wiki %} docs/wiki/{% endif %} - python -m codespell_lib README.md docs/development.md{% if add_wiki %} docs/wiki/{% endif %} + python -m mdformat --check README.md docs/development.md $(wildcard docs/src){% if add_wiki %} docs/wiki/{% endif %} + python -m codespell_lib README.md docs/development.md $(wildcard docs/src){% if add_wiki %} docs/wiki/{% endif %} fix-py: ## autoformat Python code python -m ruff check --fix {{ module }} python -m ruff format {{ module }} fix-docs: ## autoformat documentation - python -m mdformat README.md docs/development.md{% if add_wiki %} docs/wiki/{% endif %} - python -m codespell_lib --write README.md docs/development.md{% if add_wiki %} docs/wiki/{% endif %} + python -m mdformat README.md docs/development.md $(wildcard docs/src){% if add_wiki %} docs/wiki/{% endif %} + python -m codespell_lib --write README.md docs/development.md $(wildcard docs/src){% if add_wiki %} docs/wiki/{% endif %} lint: lint-py lint-docs ## run all linters lints: lint diff --git a/python/cython/pyproject.toml.jinja b/python/cython/pyproject.toml.jinja index 9f57da4..9d6043a 100644 --- a/python/cython/pyproject.toml.jinja +++ b/python/cython/pyproject.toml.jinja @@ -50,6 +50,7 @@ develop = [ "hatch-cython", "hatchling", "mdformat", + "mdformat-frontmatter", "mdformat-tables>=1", "pytest", "pytest-cov", diff --git a/python/js/Makefile.jinja b/python/js/Makefile.jinja index f7ba25b..b478d93 100644 --- a/python/js/Makefile.jinja +++ b/python/js/Makefile.jinja @@ -43,8 +43,8 @@ lint-js: ## run js linter cd js; pnpm lint lint-docs: ## lint docs with mdformat and codespell - python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat --check README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} lint: lint-js lint-py lint-docs ## run project linters @@ -60,8 +60,8 @@ fix-js: ## fix js formatting cd js; pnpm fix fix-docs: ## autoformat docs with mdformat and codespell - python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib --write README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} fix: fix-js fix-py fix-docs ## run project autoformatters diff --git a/python/js/pyproject.toml.jinja b/python/js/pyproject.toml.jinja index e228543..c187e98 100644 --- a/python/js/pyproject.toml.jinja +++ b/python/js/pyproject.toml.jinja @@ -47,6 +47,7 @@ develop = [ "hatch-js", "hatchling", "mdformat", + "mdformat-frontmatter", "mdformat-tables>=1", "pytest", "pytest-cov", diff --git a/python/jupyter/Makefile.jinja b/python/jupyter/Makefile.jinja index 6e6ff7a..ef081c7 100644 --- a/python/jupyter/Makefile.jinja +++ b/python/jupyter/Makefile.jinja @@ -45,8 +45,8 @@ lint-js: ## run js linter cd js; pnpm lint lint-docs: ## lint docs with mdformat and codespell - python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat --check README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} lint: lint-js lint-py lint-docs ## run project linters @@ -62,8 +62,8 @@ fix-js: ## fix js formatting cd js; pnpm fix fix-docs: ## autoformat docs with mdformat and codespell - python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib --write README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} fix: fix-js fix-py fix-docs ## run project autoformatters diff --git a/python/jupyter/pyproject.toml.jinja b/python/jupyter/pyproject.toml.jinja index ee13312..2545f30 100644 --- a/python/jupyter/pyproject.toml.jinja +++ b/python/jupyter/pyproject.toml.jinja @@ -54,6 +54,7 @@ develop = [ "hatchling", "jupyter-builder>=1.2.3,<2", "mdformat", + "mdformat-frontmatter", "mdformat-tables>=1", "jupyterlab>=4,<5", "pytest", diff --git a/python/pure/Makefile.jinja b/python/pure/Makefile.jinja index ee5abf7..1708a80 100644 --- a/python/pure/Makefile.jinja +++ b/python/pure/Makefile.jinja @@ -25,16 +25,16 @@ lint-py: ## lint python with ruff python -m ruff format --check {{ module }} lint-docs: ## lint docs with mdformat and codespell - python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat --check README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} fix-py: ## autoformat python code with ruff python -m ruff check --fix {{ module }} python -m ruff format {{ module }} fix-docs: ## autoformat docs with mdformat and codespell - python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib --write README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} lint: lint-py lint-docs ## run all linters lints: lint diff --git a/python/pure/pyproject.toml.jinja b/python/pure/pyproject.toml.jinja index 3c7ae3e..9c992d5 100644 --- a/python/pure/pyproject.toml.jinja +++ b/python/pure/pyproject.toml.jinja @@ -45,6 +45,7 @@ develop = [ "codespell", "hatchling", "mdformat", + "mdformat-frontmatter", "mdformat-tables>=1", "pytest", "pytest-cov", diff --git a/python/rust/Makefile.jinja b/python/rust/Makefile.jinja index 29f613f..c791320 100644 --- a/python/rust/Makefile.jinja +++ b/python/rust/Makefile.jinja @@ -44,8 +44,8 @@ lint-rs: ## run rust linter make -C rust lint lint-docs: ## lint docs with mdformat and codespell - python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat --check README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} lint: lint-rs lint-py lint-docs ## run project linters @@ -61,8 +61,8 @@ fix-rs: ## fix rust formatting make -C rust fix fix-docs: ## autoformat docs with mdformat and codespell - python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib --write README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} fix: fix-rs fix-py fix-docs ## run project autoformatters diff --git a/python/rust/pyproject.toml.jinja b/python/rust/pyproject.toml.jinja index 982d252..5a83144 100644 --- a/python/rust/pyproject.toml.jinja +++ b/python/rust/pyproject.toml.jinja @@ -49,6 +49,7 @@ develop = [ "hatch-rs{% if add_pyodide %}>=0.3.0{% endif %}", "hatchling", "mdformat", + "mdformat-frontmatter", "mdformat-tables>=1", "pytest", "pytest-cov", diff --git a/python/rustjswasm/Makefile.jinja b/python/rustjswasm/Makefile.jinja index ab83bb5..88d51f3 100644 --- a/python/rustjswasm/Makefile.jinja +++ b/python/rustjswasm/Makefile.jinja @@ -55,8 +55,8 @@ lint-rs: ## run rust linter make -C rust lint lint-docs: ## lint docs with mdformat and codespell - python -m mdformat --check README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat --check README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} lint: lint-rs lint-js lint-py lint-docs ## run project linters @@ -75,8 +75,8 @@ fix-rs: ## fix rust formatting make -C rust fix fix-docs: ## autoformat docs with mdformat and codespell - python -m mdformat README.md {% if add_wiki %}docs/wiki/{% endif %} - python -m codespell_lib --write README.md {% if add_wiki %}docs/wiki/{% endif %} + python -m mdformat README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} + python -m codespell_lib --write README.md $(wildcard docs/src) {% if add_wiki %}docs/wiki/{% endif %} fix: fix-rs fix-js fix-py fix-docs ## run project autoformatters diff --git a/python/rustjswasm/pyproject.toml.jinja b/python/rustjswasm/pyproject.toml.jinja index 0c802eb..5413f5f 100644 --- a/python/rustjswasm/pyproject.toml.jinja +++ b/python/rustjswasm/pyproject.toml.jinja @@ -51,6 +51,7 @@ develop = [ "hatch-rs{% if add_pyodide %}>=0.3.0{% endif %}", "hatchling", "mdformat", + "mdformat-frontmatter", "mdformat-tables>=1", "pytest", "pytest-cov",