]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commitdiff
🔧 Show line numbers in docs during local development (#714)
authorSebastián Ramírez <tiangolo@gmail.com>
Tue, 28 Nov 2023 22:41:03 +0000 (23:41 +0100)
committerGitHub <noreply@github.com>
Tue, 28 Nov 2023 22:41:03 +0000 (23:41 +0100)
🔧 Show line numbers during local development

mkdocs.yml
scripts/docs-live.sh

index 385738823b891dc8de0488192758fc2ba0e9ecac..a41839c12fc78329a907e6d1a375993320ed0f5f 100644 (file)
@@ -109,7 +109,8 @@ markdown_extensions:
       class: mermaid
       format: !!python/name:pymdownx.superfences.fence_code_format ''
 - pymdownx.betterem
-- pymdownx.highlight
+- pymdownx.highlight:
+    linenums: !ENV [LINENUMS, false]
 - pymdownx.blocks.details
 - pymdownx.blocks.admonition:
     types:
index f9d31ba3618c5b9c11c15c56b308d0ba148a2493..b6071fdb972e65b160e45b9cf7631aaa8de74875 100755 (executable)
@@ -4,4 +4,4 @@ set -e
 
 export DYLD_FALLBACK_LIBRARY_PATH="/opt/homebrew/lib"
 
-mkdocs serve --dev-addr 127.0.0.1:8008
+LINENUMS="true" mkdocs serve --dev-addr 127.0.0.1:8008