🩹 — Fix mermaid.min.js download

This commit is contained in:
Luc Didry 2024-04-10 17:49:54 +02:00
parent 013ee48cf5
commit 0cef533a8b
No known key found for this signature in database
GPG key ID: EA868E12D0257E3C
2 changed files with 3 additions and 3 deletions

View file

@ -11,12 +11,11 @@ venv: ## Create the venv
python3 -m venv venv python3 -m venv venv
develop: venv ## Install the dev dependencies develop: venv ## Install the dev dependencies
venv/bin/pip install -e ".[dev,docs]" venv/bin/pip install -e ".[dev,docs]"
docs: cog public/mermaid.min.js ## Build the docs docs: cog ## Build the docs
venv/bin/sphinx-build docs public venv/bin/sphinx-build docs public
if [[ ! -e public/mermaid.min.js ]]; then curl -sL $$(grep mermaid.min.js public/search.html | cut -f 2 -d '"') --output public/mermaid.min.js; fi
sed -e 's@https://unpkg.com/mermaid[^"]*"@mermaid.min.js"@' -i public/search.html public/genindex.html sed -e 's@https://unpkg.com/mermaid[^"]*"@mermaid.min.js"@' -i public/search.html public/genindex.html
sed -e 's@https://unpkg.com/mermaid[^"]*"@../mermaid.min.js"@' -i public/developer/models.html public/developer/overview.html sed -e 's@https://unpkg.com/mermaid[^"]*"@../mermaid.min.js"@' -i public/developer/models.html public/developer/overview.html
public/mermaid.min.js:
curl -sL $$(grep mermaid.min.js public/search.html | cut -f 2 -d '"') --output public/mermaid.min.js
cog: ## Run cog, to integrate the CLI options to the docs. cog: ## Run cog, to integrate the CLI options to the docs.
venv/bin/cog -r docs/*.md venv/bin/cog -r docs/*.md
test: venv ## Run the tests test: venv ## Run the tests

View file

@ -64,5 +64,6 @@ developer/new-check
developer/models developer/models
developer/migrations developer/migrations
developer/tests developer/tests
developer/release
``` ```