Bump docsy to v0.13.0 (#2287)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>pull/2273/merge
parent
fa78688f57
commit
c47fa4d093
@ -0,0 +1 @@
|
||||
Upgrade to docsy v0.13.0.
|
||||
@ -1,4 +1,4 @@
|
||||
github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
|
||||
github.com/matrix-org/docsy v0.0.0-20250722140156-5df72519f5af h1:XghgUC0H5BoGrvtT9/oWBUi+5Zux875qRHhpAZ0RURI=
|
||||
github.com/matrix-org/docsy v0.0.0-20250722140156-5df72519f5af/go.mod h1:4/t21g/nPraob/DVMm3jrk26k0CDL5I7Mxf+ar0IAgs=
|
||||
github.com/twbs/bootstrap v5.3.6+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
|
||||
github.com/matrix-org/docsy v0.0.0-20260106184755-71d103ebb20a h1:WB3unuZJy7ewAf33sxbtEwYnC+i+Jt1sJpAR3BtzvEo=
|
||||
github.com/matrix-org/docsy v0.0.0-20260106184755-71d103ebb20a/go.mod h1:mdn1m5HJug6ZddQgrOyCrXNegbtdl5evHiqqbEQLzdI=
|
||||
github.com/twbs/bootstrap v5.3.8+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
|
||||
|
||||
@ -1,28 +1,35 @@
|
||||
{{/*
|
||||
|
||||
A copy of the breadcrumb.html partial in Docsy, modified
|
||||
to:
|
||||
A copy of the breadcrumb.html partial in Docsy, modified to:
|
||||
|
||||
* show the breadcrumbs by default by removing the `td-breadcrumbs__single`
|
||||
class
|
||||
* omit breadcrumbs when this is the homepage
|
||||
* otherwise, include the homepage in the breadcrumbs
|
||||
|
||||
*/}}
|
||||
|
||||
{{ if not .IsHome }}
|
||||
{{ if not .IsHome -}}
|
||||
<nav aria-label="breadcrumb" class="td-breadcrumbs">
|
||||
<ol class="breadcrumb">
|
||||
{{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
||||
</ol>
|
||||
</nav >
|
||||
{{ end }}
|
||||
<ol class="breadcrumb">
|
||||
{{- template "breadcrumbnav" (dict "p1" . "p2" .) }}
|
||||
</ol>
|
||||
</nav>
|
||||
{{ end -}}
|
||||
|
||||
{{ define "breadcrumbnav" }}
|
||||
{{ if .p1.Parent }}
|
||||
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) }}
|
||||
{{ else if not .p1.IsHome }}
|
||||
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) }}
|
||||
{{ end }}
|
||||
{{ $isActive := eq .p1 .p2 }}
|
||||
<li class="breadcrumb-item{{ if $isActive }} active{{ end }}" {{ if $isActive }}aria-current="page"{{ end }}>
|
||||
<a href="{{ .p1.RelPermalink }}">{{ .p1.LinkTitle }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{- define "breadcrumbnav" -}}
|
||||
{{ if .p1.Parent -}}
|
||||
{{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 ) -}}
|
||||
{{ else if not .p1.IsHome -}}
|
||||
{{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 ) -}}
|
||||
{{ end -}}
|
||||
{{ $isActive := eq .p1 .p2 }}
|
||||
<li class="breadcrumb-item{{ if $isActive }} active{{ end }}"
|
||||
{{- if $isActive }}aria-current="page"{{ end }}>
|
||||
{{ if $isActive -}}
|
||||
{{ .p1.LinkTitle -}}
|
||||
{{ else -}}
|
||||
<a href="{{ .p1.RelPermalink }}">{{ .p1.LinkTitle }}</a>
|
||||
{{- end -}}
|
||||
</li>
|
||||
{{- end -}}
|
||||
|
||||
@ -1,15 +1,29 @@
|
||||
{{/*
|
||||
|
||||
A modified version of the toc.html partial in Docsy.
|
||||
A copy of the toc.html partial in Docsy, modified to:
|
||||
|
||||
*/}}
|
||||
{{ $page := .Params }}
|
||||
* show the page's title instead of "on this page"
|
||||
|
||||
*/ -}}
|
||||
|
||||
{{/*
|
||||
|
||||
Always render the td-toc element. ScrollSpy is counting on it to exist,
|
||||
even if it's empty.
|
||||
|
||||
cSpell:ignore notoc
|
||||
*/ -}}
|
||||
|
||||
<div class="td-toc" data-proofer-ignore>
|
||||
{{ if not .Params.notoc -}}
|
||||
{{ with .TableOfContents -}}
|
||||
<hr>
|
||||
<div id="toc">
|
||||
<a id="toc-title" href="#">{{ $page.Title }}</a>
|
||||
{{ . }}
|
||||
{{ $toc := .TableOfContents -}}
|
||||
{{ if and $toc (ne $toc `<nav id="TableOfContents"></nav>`) -}}
|
||||
<div class="td-toc-title">
|
||||
<span class="td-toc-title__text">{{ .Params.Title }}</span>
|
||||
<a class="td-toc-title__link" title="{{ i18n "toc_top_of_page" }}" href="#"></a>
|
||||
</div>
|
||||
{{ $toc | safeHTML }}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
</div>
|
||||
{{/* */ -}}
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Download the KaTeX fonts and CSS, and copy them into `static`.
|
||||
set -e
|
||||
|
||||
root=$(dirname "$0")/..
|
||||
|
||||
# Check that the caller supplied a version.
|
||||
version=$1
|
||||
if [[ -z $1 || $1 = "-h" || $1 = "--help" ]]; then
|
||||
>&2 echo "Usage: download-katex-assets.sh VERSION (e.g. v0.16.23)"
|
||||
>&2 echo
|
||||
>&2 echo "Downloads KaTeX fonts and CSS from the specified release"
|
||||
>&2 echo "on GitHub and puts the files into static/."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Create a temporary directory and register a handler to clean it up on exit.
|
||||
tmp_dir=$(mktemp -d)
|
||||
clean_up () {
|
||||
rm -rf "$tmp_dir"
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Fetch the release archive.
|
||||
archive=$tmp_dir/katex.tar.gz
|
||||
url=https://github.com/KaTeX/KaTeX/releases/download/$version/katex.tar.gz
|
||||
echo "GET $url"
|
||||
curl -L --output "$archive" "$url"
|
||||
|
||||
# Unpack the archive.
|
||||
tar -xzvf "$archive" -C "$tmp_dir"
|
||||
|
||||
# Move the CSS file into place.
|
||||
install -vm644 "$tmp_dir/katex/katex.min.css" "$root/static/css/katex.min.css"
|
||||
|
||||
# Remove any existing fonts and move the new ones into place.
|
||||
rm -rvf "$root"/static/css/fonts/KaTeX*
|
||||
while IFS= read -r -d '' file; do
|
||||
install -vm644 "$file" "$root/static/css/fonts"
|
||||
done < <(find "$tmp_dir/katex/fonts" -maxdepth 1 -name "KaTeX*.woff2" -print0)
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue