diff --git a/content/en/docs/File Format/Data Pages/compression.md b/content/en/docs/File Format/Data Pages/compression.md index 7210d167..1a205dc9 100644 --- a/content/en/docs/File Format/Data Pages/compression.md +++ b/content/en/docs/File Format/Data Pages/compression.md @@ -1,4 +1,5 @@ --- +title: "Compression" linkTitle: "Compression" weight: 1 --- diff --git a/content/en/docs/File Format/Data Pages/encodings.md b/content/en/docs/File Format/Data Pages/encodings.md index 7bba6f96..5b4d35cb 100644 --- a/content/en/docs/File Format/Data Pages/encodings.md +++ b/content/en/docs/File Format/Data Pages/encodings.md @@ -1,4 +1,5 @@ --- +title: "Encodings" linkTitle: "Encodings" weight: 1 --- diff --git a/content/en/docs/File Format/Data Pages/encryption.md b/content/en/docs/File Format/Data Pages/encryption.md index 4cee0ed4..1b890738 100644 --- a/content/en/docs/File Format/Data Pages/encryption.md +++ b/content/en/docs/File Format/Data Pages/encryption.md @@ -1,4 +1,5 @@ --- +title: "Encryption" linkTitle: "Encryption" weight: 1 --- diff --git a/content/en/docs/File Format/Types/Geospatial.md b/content/en/docs/File Format/Types/Geospatial.md index 9b348b49..5570fda4 100644 --- a/content/en/docs/File Format/Types/Geospatial.md +++ b/content/en/docs/File Format/Types/Geospatial.md @@ -1,4 +1,5 @@ --- +title: "Geospatial Type" linkTitle: "Geospatial Type" weight: 5 --- diff --git a/content/en/docs/File Format/Types/VariantEncoding.md b/content/en/docs/File Format/Types/VariantEncoding.md index c3491d66..e3e66af7 100644 --- a/content/en/docs/File Format/Types/VariantEncoding.md +++ b/content/en/docs/File Format/Types/VariantEncoding.md @@ -1,4 +1,5 @@ --- +title: "Variant Type" linkTitle: "Variant Type" weight: 5 --- diff --git a/content/en/docs/File Format/Types/VariantShredding.md b/content/en/docs/File Format/Types/VariantShredding.md index ce476b0b..ba6069ac 100644 --- a/content/en/docs/File Format/Types/VariantShredding.md +++ b/content/en/docs/File Format/Types/VariantShredding.md @@ -1,4 +1,5 @@ --- +title: "Variant Shredding" linkTitle: "Variant Shredding" weight: 5 --- diff --git a/content/en/docs/File Format/Types/logicaltypes.md b/content/en/docs/File Format/Types/logicaltypes.md index 3153b68d..c57a7be7 100644 --- a/content/en/docs/File Format/Types/logicaltypes.md +++ b/content/en/docs/File Format/Types/logicaltypes.md @@ -1,4 +1,5 @@ --- +title: "Logical Types" linkTitle: "Logical Types" weight: 5 --- diff --git a/content/en/docs/File Format/binaryprotocolextensions.md b/content/en/docs/File Format/binaryprotocolextensions.md index 21da480e..ee5408fd 100644 --- a/content/en/docs/File Format/binaryprotocolextensions.md +++ b/content/en/docs/File Format/binaryprotocolextensions.md @@ -1,4 +1,5 @@ --- +title: "Binary Protocol Extensions" linkTitle: "Binary Protocol Extensions" weight: 1 --- diff --git a/content/en/docs/File Format/bloomfilter.md b/content/en/docs/File Format/bloomfilter.md index 97443c12..28e625d9 100644 --- a/content/en/docs/File Format/bloomfilter.md +++ b/content/en/docs/File Format/bloomfilter.md @@ -1,4 +1,5 @@ --- +title: "Bloom Filter" linkTitle: "Bloom Filter" weight: 7 --- diff --git a/content/en/docs/File Format/pageindex.md b/content/en/docs/File Format/pageindex.md index ecd8a9ad..1161f6b0 100644 --- a/content/en/docs/File Format/pageindex.md +++ b/content/en/docs/File Format/pageindex.md @@ -1,4 +1,5 @@ --- +title: "Page Index" linkTitle: "Page Index" weight: 7 --- diff --git a/hugo.toml b/hugo.toml index 347fb930..99383135 100644 --- a/hugo.toml +++ b/hugo.toml @@ -103,7 +103,9 @@ github_branch = "production" # gcs_engine_id = "7e3f91e3eadecceaa" # Enable Lunr.js offline search -offlineSearch = false +offlineSearch = true +offlineSearchMaxResults = 25 +offlineSearchSummaryLength = 200 # Enable syntax highlighting and copy buttons on code blocks with Prism prism_syntax_highlighting = false diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html new file mode 100644 index 00000000..15add9ed --- /dev/null +++ b/layouts/partials/scripts.html @@ -0,0 +1,66 @@ +{{/* + Project-level override of Docsy's layouts/_partials/scripts.html + + Why this file exists: + Removes the Algolia DocSearch JS block (cdn.jsdelivr.net) which is blocked + by Apache's CSP. Also removes the markmap-autoloader CDN reference since + markmap is not enabled on this site. + + See: https://github.com/apache/parquet-site/issues/163 +*/ -}} +{{ $needKaTeX := or .Params.math .Site.Params.katex.enable .Params.chem .Site.Params.chem (.Page.Store.Get "hasKaTeX") (.Page.Store.Get "hasmhchem") -}} +{{ $needmhchem := or .Params.chem .Site.Params.katex.mhchem.enable (.Page.Store.Get "hasmhchem") -}} + +{{/* markmap block removed — it loads from cdn.jsdelivr.net which is blocked + by Apache's CSP, and markmap is not enabled on this site anyway. */ -}} + +{{ if .Site.Params.plantuml.enable -}} + +{{ end -}} + +{{ if $needKaTeX -}} + {{ partial "scripts/katex.html" (dict "mhchem" $needmhchem) -}} +{{ end -}} + +{{ $jsBs := resources.Get "vendor/bootstrap/dist/js/bootstrap.bundle.js" -}} +{{ $jsBase := resources.Get "js/base.js" -}} +{{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home -}} +{{ $jsMarkmap := resources.Get "js/markmap.js" | resources.ExecuteAsTemplate "js/markmap.js" . -}} +{{ $jsPlantuml := resources.Get "js/plantuml.js" | resources.ExecuteAsTemplate "js/plantuml.js" . -}} +{{ $jsDrawio := resources.Get "js/drawio.js" | resources.ExecuteAsTemplate "js/drawio.js" . -}} +{{ if .Site.Params.offlineSearch -}} + {{ $jsSearch = resources.Get "js/offline-search.js" -}} +{{ end -}} + +{{ $jsArray := slice $jsBs $jsBase $jsSearch $jsPlantuml $jsMarkmap $jsDrawio -}} + +{{ if .Page.Store.Get "hasmermaid" -}} +{{- partial "scripts/mermaid.html" . -}} +{{ end -}} + +{{ if .Site.Params.ui.showLightDarkModeMenu -}} + {{ $jsArray = $jsArray | append (resources.Get "js/dark-mode.js") -}} +{{ end -}} + +{{ $js := $jsArray | resources.Concat "js/main.js" -}} +{{ if hugo.IsProduction -}} + {{ $js := $js | minify | fingerprint -}} + +{{ else -}} + +{{ end -}} + +{{ if .Site.Params.prism_syntax_highlighting -}} + +{{ else if ( not .Site.Params.disable_click2copy_chroma ) -}} + {{ $c2cJS := resources.Get "js/click-to-copy.js" -}} + {{ if hugo.IsProduction -}} + {{ $c2cJS = $c2cJS | minify | fingerprint -}} + {{ end -}} + +{{ end -}} + + +{{ partial "hooks/body-end.html" . -}}