Skip to content

Commit

Permalink
Upgrade mkdocs and mkdocs-material (#471)
Browse files Browse the repository at this point in the history
* Open tab when running `serve` command
* Warn on invalid anchor references
  • Loading branch information
Blacksmoke16 authored Nov 29, 2024
1 parent f852159 commit 7ec28ec
Show file tree
Hide file tree
Showing 17 changed files with 61 additions and 61 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ build: ## Build website into build directory
build: $(OUTPUT_DIR)

$(OUTPUT_DIR): $(MKDOCS)
$(MKDOCS) build -d $(OUTPUT_DIR)
CRYSTAL_PATH="$$(pwd)/lib:$$(crystal env CRYSTAL_PATH)" $(MKDOCS) build -d $(OUTPUT_DIR)

.PHONY: serve
serve: ## Run live-preview server
serve: $(MKDOCS)
$(MKDOCS) serve
CRYSTAL_PATH="$$(pwd)/lib:$$(crystal env CRYSTAL_PATH)" $(MKDOCS) serve --open

deps: $(MKDOCS)

Expand Down
1 change: 1 addition & 0 deletions mkdocs-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ validation:
absolute_links: ignore
unrecognized_links: warn
not_found: warn
anchors: warn

extra_css:
- ../../../css/index.css
Expand Down
7 changes: 3 additions & 4 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# TODO: Remove once mkdocs 1.6 is released
mkdocs@git+https://github.com/mkdocs/mkdocs.git@e755aaed7ea47348a60495ab364d5483ab90a4a6
mkdocs ~= 1.6.1

# 4.53.2 / 9.5.14
mkdocs-material@git+ssh://[email protected]/squidfunk/mkdocs-material-insiders.git@caf2c0d696346347745872544a0ef556785ac8a1
# 4.53.14 / 9.5.46
mkdocs-material@git+ssh://[email protected]/squidfunk/mkdocs-material-insiders.git@115e3b4466c02a93775ab8febe747f10569f2231

mkdocstrings-crystal ~= 0.3.5
mkdocs-gen-files ~= 0.5.0
Expand Down
46 changes: 23 additions & 23 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile requirements.in
#
babel==2.14.0
babel==2.16.0
# via mkdocs-material
certifi==2024.2.2
certifi==2024.8.30
# via requests
charset-normalizer==3.3.2
charset-normalizer==3.4.0
# via requests
click==8.1.7
# via
Expand All @@ -18,15 +18,15 @@ colorama==0.4.6
# via mkdocs-material
ghp-import==2.1.0
# via mkdocs
idna==3.6
idna==3.10
# via requests
jinja2==3.1.3
jinja2==3.1.4
# via
# mkdocs
# mkdocs-material
# mkdocstrings
# mkdocstrings-crystal
markdown==3.6
markdown==3.7
# via
# markdown-callouts
# mkdocs
Expand All @@ -36,7 +36,7 @@ markdown==3.6
# pymdown-extensions
markdown-callouts==0.4.0
# via mkdocstrings-crystal
markupsafe==2.1.5
markupsafe==3.0.2
# via
# jinja2
# mkdocs
Expand All @@ -48,7 +48,7 @@ mergedeep==1.3.4
# mkdocs
# mkdocs-get-deps
# mkdocs-material
mkdocs @ git+https://github.com/mkdocs/mkdocs.git@e755aaed7ea47348a60495ab364d5483ab90a4a6
mkdocs==1.6.1
# via
# -r requirements.in
# mkdocs-autorefs
Expand All @@ -57,7 +57,7 @@ mkdocs @ git+https://github.com/mkdocs/mkdocs.git@e755aaed7ea47348a60495ab364d54
# mkdocs-material
# mkdocs-section-index
# mkdocstrings
mkdocs-autorefs==1.0.1
mkdocs-autorefs==1.2.0
# via
# mkdocstrings
# mkdocstrings-crystal
Expand All @@ -67,49 +67,49 @@ mkdocs-get-deps==0.2.0
# via mkdocs
mkdocs-literate-nav==0.6.1
# via -r requirements.in
mkdocs-material @ git+ssh://[email protected]/squidfunk/mkdocs-material-insiders.git@caf2c0d696346347745872544a0ef556785ac8a1
mkdocs-material @ git+ssh://[email protected]/squidfunk/mkdocs-material-insiders.git@115e3b4466c02a93775ab8febe747f10569f2231
# via -r requirements.in
mkdocs-material-extensions==1.3.1
# via mkdocs-material
mkdocs-section-index==0.3.8
mkdocs-section-index==0.3.9
# via -r requirements.in
mkdocstrings==0.24.1
mkdocstrings==0.27.0
# via mkdocstrings-crystal
mkdocstrings-crystal==0.3.7
# via -r requirements.in
packaging==24.0
packaging==24.2
# via mkdocs
paginate==0.5.6
paginate==0.5.7
# via mkdocs-material
pathspec==0.12.1
# via mkdocs
platformdirs==4.2.0
platformdirs==4.3.6
# via
# mkdocs-get-deps
# mkdocstrings
pygments==2.17.2
pygments==2.18.0
# via mkdocs-material
pymdown-extensions==10.7.1
pymdown-extensions==10.12
# via
# mkdocs-material
# mkdocstrings
python-dateutil==2.9.0.post0
# via ghp-import
pyyaml==6.0.1
pyyaml==6.0.2
# via
# mkdocs
# mkdocs-get-deps
# pymdown-extensions
# pyyaml-env-tag
pyyaml-env-tag==0.1
# via mkdocs
regex==2023.12.25
regex==2024.11.6
# via mkdocs-material
requests==2.31.0
requests==2.32.3
# via mkdocs-material
six==1.16.0
# via python-dateutil
urllib3==2.2.1
urllib3==2.2.3
# via requests
watchdog==4.0.0
watchdog==6.0.0
# via mkdocs
6 changes: 3 additions & 3 deletions src/components/clock/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena-clock/src/athena-clock.cr
- ./lib/athena-clock/src/spec.cr
- ../../../docs/index.cr
- ../../../lib/athena-clock/src/athena-clock.cr
- ../../../lib/athena-clock/src/spec.cr
source_locations:
lib/athena-clock: https://github.com/athena-framework/clock/blob/v{shard_version}/{file}#L{line}
6 changes: 3 additions & 3 deletions src/components/console/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena-console/src/athena-console.cr
- ./lib/athena-console/src/spec.cr
- ../../../docs/index.cr
- ../../../lib/athena-console/src/athena-console.cr
- ../../../lib/athena-console/src/spec.cr
source_locations:
lib/athena-console: https://github.com/athena-framework/console/blob/v{shard_version}/{file}#L{line}
4 changes: 2 additions & 2 deletions src/components/dependency_injection/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena-dependency_injection/src/athena-dependency_injection.cr
- ../../../docs/index.cr
- ../../../lib/athena-dependency_injection/src/athena-dependency_injection.cr
source_locations:
lib/athena-dependency_injection: https://github.com/athena-framework/dependency-injection/blob/v{shard_version}/{file}#L{line}
4 changes: 2 additions & 2 deletions src/components/dotenv/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena-dotenv/src/athena-dotenv.cr
- ../../../docs/index.cr
- ../../../lib/athena-dotenv/src/athena-dotenv.cr
source_locations:
lib/athena-dotenv: https://github.com/athena-framework/dotenv/blob/v{shard_version}/{file}#L{line}
6 changes: 3 additions & 3 deletions src/components/event_dispatcher/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena-event_dispatcher/src/athena-event_dispatcher.cr
- ./lib/athena-event_dispatcher/src/spec.cr
- ../../../docs/index.cr
- ../../../lib/athena-event_dispatcher/src/athena-event_dispatcher.cr
- ../../../lib/athena-event_dispatcher/src/spec.cr
source_locations:
lib/athena-event_dispatcher: https://github.com/athena-framework/event-dispatcher/blob/v{shard_version}/{file}#L{line}
6 changes: 3 additions & 3 deletions src/components/framework/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena/src/athena.cr
- ./lib/athena/src/spec.cr
- ../../../docs/index.cr
- ../../../lib/athena/src/athena.cr
- ../../../lib/athena/src/spec.cr
source_locations:
lib/athena: https://github.com/athena-framework/framework/blob/v{shard_version}/{file}#L{line}
4 changes: 2 additions & 2 deletions src/components/image_size/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena-image_size/src/athena-image_size.cr
- ../../../docs/index.cr
- ../../../lib/athena-image_size/src/athena-image_size.cr
source_locations:
lib/athena-image_size: https://github.com/athena-framework/image-size/blob/v{shard_version}/{file}#L{line}
6 changes: 3 additions & 3 deletions src/components/mercure/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena-mercure/src/athena-mercure.cr
- ./lib/athena-mercure/src/spec.cr
- ../../../docs/index.cr
- ../../../lib/athena-mercure/src/athena-mercure.cr
- ../../../lib/athena-mercure/src/spec.cr
source_locations:
lib/athena-mercure: https://github.com/athena-framework/mercure/blob/v{shard_version}/{file}#L{line}
4 changes: 2 additions & 2 deletions src/components/negotiation/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena-negotiation/src/athena-negotiation.cr
- ../../../docs/index.cr
- ../../../lib/athena-negotiation/src/athena-negotiation.cr
source_locations:
lib/athena-negotiation: https://github.com/athena-framework/negotiation/blob/v{shard_version}/{file}#L{line}
4 changes: 2 additions & 2 deletions src/components/routing/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena-routing/src/athena-routing.cr
- ../../../docs/index.cr
- ../../../lib/athena-routing/src/athena-routing.cr
source_locations:
lib/athena-routing: https://github.com/athena-framework/routing/blob/v{shard_version}/{file}#L{line}
4 changes: 2 additions & 2 deletions src/components/serializer/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena-serializer/src/athena-serializer.cr
- ../../../docs/index.cr
- ../../../lib/athena-serializer/src/athena-serializer.cr
source_locations:
lib/athena-serializer: https://github.com/athena-framework/serializer/blob/v{shard_version}/{file}#L{line}
4 changes: 2 additions & 2 deletions src/components/spec/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena-spec/src/athena-spec.cr
- ../../../docs/index.cr
- ../../../lib/athena-spec/src/athena-spec.cr
source_locations:
lib/athena-spec: https://github.com/athena-framework/spec/blob/v{shard_version}/{file}#L{line}
6 changes: 3 additions & 3 deletions src/components/validator/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ plugins:
handlers:
crystal:
crystal_docs_flags:
- ./docs/index.cr
- ./lib/athena-validator/src/athena-validator.cr
- ./lib/athena-validator/src/spec.cr
- ../../../docs/index.cr
- ../../../lib/athena-validator/src/athena-validator.cr
- ../../../lib/athena-validator/src/spec.cr
source_locations:
lib/athena-validator: https://github.com/athena-framework/validator/blob/v{shard_version}/{file}#L{line}

0 comments on commit 7ec28ec

Please sign in to comment.