migrate to decoupled Blowfish layout, fix TOC scrollspy, and update docs
- Theme Decoupling & Cleanup:
- Fully decoupled and vendored the Blowfish theme directly into root directories (layouts/,
assets/, static/, data/, i18n/).
- De-registered and cleaned up legacy Git submodules (themes/blowfish, themes/hugo-admonitions)
from the Git index to protect the build from upstream breakages.
- Configured .gitignore to ignore development preview symlinks (content, static,
config/_default/menus.en.toml), build folders (public/, resources/), and locks.
- TOC & Layout Fixes:
- Replaced the custom layouts/_default/single.html template with the Blowfish default to restore
native container widths and the side-by-side flex layout.
- Restored TOC to float on the right sidebar on desktop viewports and render inline on mobile
viewports.
- Fixed a parameter resolution bug in layouts/partials/toc.html by checking both .Site.Params.
smartTOC and .Site.Params.article.smartTOC (where it is defined in params.toml).
- Upgraded the TOC scrollspy JavaScript to target all '#TableOfContents' containers on the page,
enabling highlight tracking on both desktop and mobile layouts.
- Documentation Updates (README.md):
- Restored YAML front matter metadata block at the top.
- Added detailed notes on the CI/CD build process and Gitea runner deployment targets
(/srv/www/docs-public and /srv/www/docs-private).
- Added a categorized and sorted "Shortcodes Quick Reference" table at the top of the shortcodes
section (ordered by Custom, Hugo Default, and Blowfish).
- Documented custom shortcodes (Include, Screenshot, Raw HTML) and missing Hugo default
shortcodes (Highlight, Instagram, Param, Ref, Relref, Twitter, Vimeo, Youtube).
- Restructured headings to ensure all sub-shortcodes are H3, removed block break tags (<br/>),
and appended horizontal separators (---) after H2 sections.
This commit is contained in:
73
layouts/partials/schema.html
Normal file
73
layouts/partials/schema.html
Normal file
@@ -0,0 +1,73 @@
|
||||
{{ if .IsHome -}}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebSite",
|
||||
"@id": {{ site.Home.Permalink | safeURL }},
|
||||
"name": "{{ .Site.Title | safeJS }}",
|
||||
{{ with .Site.Params.description }}"description": "{{ . | safeJS }}",{{ end }}
|
||||
{{ with .Site.Language.Locale }}"inLanguage": "{{ . }}",{{ end }}
|
||||
"url": {{ site.Home.Permalink | safeURL }},
|
||||
{{ with .Site.Params.keywords }}"keywords": {{ . }},{{ end }}
|
||||
"publisher" : {
|
||||
"@type": "Person",
|
||||
"name": "{{ .Site.Params.Author.name | safeJS }}"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{{ else }}
|
||||
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
|
||||
<script type="application/ld+json">
|
||||
[{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "Article",
|
||||
"articleSection": "{{ (site.GetPage .Section).Title | safeJS }}",
|
||||
"name": "{{ .Title | safeJS }}",
|
||||
"headline": "{{ .Title | safeJS }}",
|
||||
{{ with .Description }}"description": "{{ . | safeJS }}",{{ end }}
|
||||
{{ with .Site.Language.Locale }}"inLanguage": "{{ . }}",{{ end }}
|
||||
"url" : {{ .Permalink }},
|
||||
"author" : {
|
||||
"@type": "Person",
|
||||
"name": "{{ .Site.Params.Author.name | safeJS }}"
|
||||
},
|
||||
{{ with .PublishDate }}"copyrightYear": "{{ .Format "2006" }}",{{ end }}
|
||||
{{ with .Date }}"dateCreated": "{{ .Format $iso8601 }}",{{ end }}
|
||||
{{ with .PublishDate }}"datePublished": "{{ .Format $iso8601 }}",{{ end }}
|
||||
{{ with .ExpiryDate }}"expires": "{{ .Format $iso8601 }}",{{ end }}
|
||||
{{ with .Lastmod }}"dateModified": "{{ .Format $iso8601 }}",{{ end }}
|
||||
{{ if .Keywords }}
|
||||
{{ with .Keywords }}"keywords": {{ . }},{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Params.tags }}"keywords": {{ . }},{{ end }}
|
||||
{{ end }}
|
||||
"mainEntityOfPage": "true",
|
||||
"wordCount": "{{ .WordCount }}"
|
||||
}{{ if site.Params.enableStructuredBreadcrumbs | default false }},
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
"itemListElement": [
|
||||
{{- $position := 0 -}}
|
||||
{{- range .Ancestors -}}
|
||||
{{- if not .IsHome -}}
|
||||
{{- $position = add $position 1 -}}
|
||||
{
|
||||
"@type": "ListItem",
|
||||
"position": {{ $position }},
|
||||
"name": "{{ .Title }}",
|
||||
"item": {{ .Permalink }}
|
||||
},
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $position = add $position 1 -}}
|
||||
{
|
||||
"@type": "ListItem",
|
||||
"position": {{ $position }},
|
||||
"name": "{{ .Title }}",
|
||||
"item": {{ .Permalink }}
|
||||
}
|
||||
]
|
||||
}{{ end }}]
|
||||
</script>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user