mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
Merge pull request #3502 from mkdocs/hatchdoc
Use hatch-mkdocs and hatch-pip-compile for docs deps
This commit is contained in:
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -1,7 +1,9 @@
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 6 * * 6'
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
|
||||
20
.github/workflows/docs.yml
vendored
Normal file
20
.github/workflows/docs.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: Docs
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 6 * * 6'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download source
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install dependencies
|
||||
run: pip install --no-deps -r requirements/requirements-docs.txt
|
||||
- name: Build site
|
||||
run: mkdocs build --strict
|
||||
@@ -102,6 +102,9 @@ dependencies = [
|
||||
"setuptools; python_version >= '3.12'" # Workaround: babel doesn't declare its dependency
|
||||
]
|
||||
|
||||
[tool.hatch.env]
|
||||
requires = ["hatch-mkdocs", "hatch-pip-compile"]
|
||||
|
||||
[tool.hatch.envs.default.scripts]
|
||||
all = [
|
||||
"hatch run style:fix",
|
||||
@@ -135,8 +138,8 @@ matrix.type.scripts = [
|
||||
{ key = "with-coverage", value = "_coverage", if = ["default"] },
|
||||
]
|
||||
|
||||
[tool.hatch.envs.integration]
|
||||
template = "docs"
|
||||
[tool.hatch.env.collectors.mkdocs.integration]
|
||||
path = "mkdocs.yml"
|
||||
[tool.hatch.envs.integration.scripts]
|
||||
test = "python -m mkdocs.tests.integration"
|
||||
[[tool.hatch.envs.integration.matrix]]
|
||||
@@ -197,17 +200,11 @@ js = "npm exec --yes -- jshint mkdocs/"
|
||||
css = "npm exec --yes -- csslint --quiet mkdocs/"
|
||||
check = ["markdown", "js", "css", "spelling"]
|
||||
|
||||
[tool.hatch.env.collectors.mkdocs.docs]
|
||||
path = "mkdocs.yml"
|
||||
[tool.hatch.envs.docs]
|
||||
dependencies = [
|
||||
"Markdown >=3.3.3",
|
||||
"mdx_gh_links >=0.2",
|
||||
"markdown-callouts >=0.3.0",
|
||||
"mkdocs-literate-nav >=0.5.0",
|
||||
"mkdocs-redirects >=1.0.1",
|
||||
"pymdown-extensions >=8.0.1",
|
||||
"mkdocstrings-python >=0.7.1",
|
||||
"mkdocs-click >=0.8.0",
|
||||
]
|
||||
type = "pip-compile"
|
||||
pip-compile-hashes = false
|
||||
|
||||
[tool.black]
|
||||
line-length = 100
|
||||
|
||||
98
requirements/requirements-docs.txt
Normal file
98
requirements/requirements-docs.txt
Normal file
@@ -0,0 +1,98 @@
|
||||
#
|
||||
# This file is autogenerated by hatch-pip-compile with Python 3.11
|
||||
#
|
||||
# - markdown-callouts
|
||||
# - mdx-gh-links
|
||||
# - mkdocs
|
||||
# - mkdocs-autorefs
|
||||
# - mkdocs-click
|
||||
# - mkdocs-literate-nav
|
||||
# - mkdocs-redirects
|
||||
# - mkdocstrings
|
||||
# - mkdocstrings-python
|
||||
# - pymdown-extensions
|
||||
#
|
||||
|
||||
click==8.1.7
|
||||
# via
|
||||
# mkdocs
|
||||
# mkdocs-click
|
||||
# mkdocstrings
|
||||
colorama==0.4.6
|
||||
# via griffe
|
||||
ghp-import==2.1.0
|
||||
# via mkdocs
|
||||
griffe==0.38.0
|
||||
# via mkdocstrings-python
|
||||
jinja2==3.1.2
|
||||
# via
|
||||
# mkdocs
|
||||
# mkdocstrings
|
||||
markdown==3.5.1
|
||||
# via
|
||||
# markdown-callouts
|
||||
# mdx-gh-links
|
||||
# mkdocs
|
||||
# mkdocs-autorefs
|
||||
# mkdocs-click
|
||||
# mkdocstrings
|
||||
# pymdown-extensions
|
||||
markdown-callouts==0.3.0
|
||||
# via hatch.envs.docs
|
||||
markupsafe==2.1.3
|
||||
# via
|
||||
# jinja2
|
||||
# mkdocs
|
||||
# mkdocstrings
|
||||
mdx-gh-links==0.3.1
|
||||
# via hatch.envs.docs
|
||||
mergedeep==1.3.4
|
||||
# via mkdocs
|
||||
mkdocs==1.5.3
|
||||
# via
|
||||
# hatch.envs.docs
|
||||
# mkdocs-autorefs
|
||||
# mkdocs-literate-nav
|
||||
# mkdocs-redirects
|
||||
# mkdocstrings
|
||||
mkdocs-autorefs==0.5.0
|
||||
# via
|
||||
# hatch.envs.docs
|
||||
# mkdocstrings
|
||||
mkdocs-click==0.8.1
|
||||
# via hatch.envs.docs
|
||||
mkdocs-literate-nav==0.6.1
|
||||
# via hatch.envs.docs
|
||||
mkdocs-redirects==1.2.1
|
||||
# via hatch.envs.docs
|
||||
mkdocstrings==0.24.0
|
||||
# via
|
||||
# hatch.envs.docs
|
||||
# mkdocstrings-python
|
||||
mkdocstrings-python==1.7.5
|
||||
# via hatch.envs.docs
|
||||
packaging==23.2
|
||||
# via mkdocs
|
||||
pathspec==0.11.2
|
||||
# via mkdocs
|
||||
platformdirs==4.0.0
|
||||
# via
|
||||
# mkdocs
|
||||
# mkdocstrings
|
||||
pymdown-extensions==10.4
|
||||
# via
|
||||
# hatch.envs.docs
|
||||
# mkdocstrings
|
||||
python-dateutil==2.8.2
|
||||
# via ghp-import
|
||||
pyyaml==6.0.1
|
||||
# via
|
||||
# mkdocs
|
||||
# pymdown-extensions
|
||||
# pyyaml-env-tag
|
||||
pyyaml-env-tag==0.1
|
||||
# via mkdocs
|
||||
six==1.16.0
|
||||
# via python-dateutil
|
||||
watchdog==3.0.0
|
||||
# via mkdocs
|
||||
Reference in New Issue
Block a user