Updated Wiki content

OrcaSlicerBot
2026-01-18 17:49:06 +00:00
parent 503f53f77c
commit 05f458eb2a
4 changed files with 45 additions and 1 deletions

@@ -98,6 +98,10 @@ if (Test-Path "web_extras\icon-theme.js") {
Copy-Item "web_extras\icon-theme.js" "docs/assets/javascripts/icon-theme.js" -Force Copy-Item "web_extras\icon-theme.js" "docs/assets/javascripts/icon-theme.js" -Force
} }
if (Test-Path "web_extras\katex.js") {
Copy-Item "web_extras\katex.js" "docs/assets/javascripts/katex.js" -Force
}
Write-Host "Converting GitHub image URLs to local paths..." Write-Host "Converting GitHub image URLs to local paths..."
if ($DownloadSvg) { if ($DownloadSvg) {
@@ -256,6 +260,13 @@ if (Test-Path "web_extras\icon-theme.js") {
Write-Host "Warning: web_extras\icon-theme.js not found - skipping" -ForegroundColor Yellow Write-Host "Warning: web_extras\icon-theme.js not found - skipping" -ForegroundColor Yellow
} }
if (Test-Path "web_extras\katex.js") {
Copy-Item "web_extras\katex.js" "wiki\assets\javascripts\katex.js" -Force
Write-Host "Copied katex.js"
} else {
Write-Host "Warning: web_extras\katex.js not found - skipping" -ForegroundColor Yellow
}
if (Test-Path "web_extras") { if (Test-Path "web_extras") {
New-Item -ItemType Directory -Path "wiki\web_extras" -Force | Out-Null New-Item -ItemType Directory -Path "wiki\web_extras" -Force | Out-Null
Copy-Item -Path "web_extras\*" -Destination "wiki\web_extras" -Recurse -Force -ErrorAction SilentlyContinue Copy-Item -Path "web_extras\*" -Destination "wiki\web_extras" -Recurse -Force -ErrorAction SilentlyContinue

@@ -134,6 +134,7 @@ done
mkdir -p docs/assets/stylesheets docs/assets/javascripts mkdir -p docs/assets/stylesheets docs/assets/javascripts
[ -f "web_extras/extra.css" ] && cp "web_extras/extra.css" docs/assets/stylesheets/extra.css [ -f "web_extras/extra.css" ] && cp "web_extras/extra.css" docs/assets/stylesheets/extra.css
[ -f "web_extras/icon-theme.js" ] && cp "web_extras/icon-theme.js" docs/assets/javascripts/icon-theme.js [ -f "web_extras/icon-theme.js" ] && cp "web_extras/icon-theme.js" docs/assets/javascripts/icon-theme.js
[ -f "web_extras/katex.js" ] && cp "web_extras/katex.js" docs/assets/javascripts/katex.js
# Build mkdocs and output to wiki folder # Build mkdocs and output to wiki folder
mkdocs build --site-dir wiki mkdocs build --site-dir wiki
@@ -227,6 +228,12 @@ else
echo "Warning: web_extras/icon-theme.js not found - skipping" echo "Warning: web_extras/icon-theme.js not found - skipping"
fi fi
if [ -f "web_extras/katex.js" ]; then
cp "web_extras/katex.js" wiki/assets/javascripts/katex.js
else
echo "Warning: web_extras/katex.js not found - skipping"
fi
if [ -d "web_extras" ]; then if [ -d "web_extras" ]; then
mkdir -p wiki/web_extras mkdir -p wiki/web_extras
cp -r web_extras/* wiki/web_extras/ 2>/dev/null || true cp -r web_extras/* wiki/web_extras/ 2>/dev/null || true

@@ -37,8 +37,12 @@ theme:
extra_css: extra_css:
- assets/stylesheets/extra.css - assets/stylesheets/extra.css
- https://unpkg.com/katex@0/dist/katex.min.css
extra_javascript: extra_javascript:
- https://unpkg.com/katex@0/dist/katex.min.js
- https://unpkg.com/katex@0/dist/contrib/auto-render.min.js
- assets/javascripts/katex.js
- assets/javascripts/icon-theme.js - assets/javascripts/icon-theme.js
plugins: plugins:
@@ -61,7 +65,13 @@ markdown_extensions:
- md_in_html - md_in_html
- admonition - admonition
- pymdownx.details # For collapsible admonitions - pymdownx.details # For collapsible admonitions
- pymdownx.superfences - pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.arithmatex:
generic: true
extra: extra:
generator: false # hides "Made with Material for MkDocs" from footer generator: false # hides "Made with Material for MkDocs" from footer

16
web_extras/katex.js Normal file

@@ -0,0 +1,16 @@
if (typeof document$ !== 'undefined' && document$.subscribe) {
document$.subscribe(({ body }) => {
if (typeof renderMathInElement !== 'function') {
return;
}
renderMathInElement(body, {
delimiters: [
{ left: '$$', right: '$$', display: true },
{ left: '$', right: '$', display: false },
{ left: '\\(', right: '\\)', display: false },
{ left: '\\[', right: '\\]', display: true },
],
});
});
}