alamb commented on code in PR #161:
URL: https://github.com/apache/parquet-site/pull/161#discussion_r2793554368


##########
layouts/partials/head.html:
##########
@@ -0,0 +1,61 @@
+{{/* cSpell:ignore docsearch opengraph outputformat */ -}}

Review Comment:
   This looks like a huge diff, but the diff from the actual template is quite 
small. I explained how to compute the difference in `README.md`. You can see it 
here:
   
   
   ```diff
   andrewlamb@Andrews-MacBook-Pro-3:~/Software/parquet-site$ diff -du 
~/go/pkg/mod/github.com/google/docsy\@v0.12.0/layouts/_partials/head.html 
layouts/partials/head.html
   --- 
/Users/andrewlamb/go/pkg/mod/github.com/google/[email protected]/layouts/_partials/head.html
 2026-02-11 07:27:43
   +++ layouts/partials/head.html       2026-02-11 09:32:08
   @@ -27,9 +27,9 @@
    {{ partial "twitter_cards.html" . -}}
    {{ partialCached "head-css.html" . "head-css-cache-key" -}}
    <script
   -  src="https://code.jquery.com/jquery-3.7.1.min.js";
   +  src='{{ "vendor/jquery/jquery-3.7.1.min.js" | relURL }}'
      
integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="
   -  crossorigin="anonymous"></script>
   +></script>
    {{ if .Site.Params.offlineSearch -}}
    <script defer
      src="https://unpkg.com/[email protected]/lunr.min.js";
   @@ -53,9 +53,9 @@
    {{ define "algolia/head" -}}
   
    {{ if and .Site.Params.search (isset .Site.Params.search "algolia") -}}
   -<link rel="stylesheet" 
href="https://cdn.jsdelivr.net/npm/@docsearch/[email protected]";
   +<link rel="stylesheet" href='{{ "vendor/docsearch/docsearch-3.8.2.css" | 
relURL }}'
      
integrity="sha512-l7pkV1dOURFyHCeH8I4fK9lCkQKuqhlsTCqRl3zktifDlB8oTUJ+mJPgYkK9kHpUut8j1iPquTv32t6hvTPv3g=="
   -  crossorigin="anonymous" />
   +/>
    {{ end -}}
   
    {{ if ne .Site.Params.algolia_docsearch nil -}}
   ```
   
   Note the integrity hash is still the same  (e.g. 
`integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g=="`)



##########
layouts/partials/scripts.html:
##########
@@ -0,0 +1,92 @@
+{{ $needKaTeX  := or .Params.math .Site.Params.katex.enable .Params.chem 
.Site.Params.chem (.Page.Store.Get "hasKaTeX") (.Page.Store.Get "hasmhchem") -}}

Review Comment:
   Likewise here is the actual diff of this file compared to the template base
   
   ```diff
   andrewlamb@Andrews-MacBook-Pro-3:~/Software/parquet-site$ diff -du 
~/go/pkg/mod/github.com/google/docsy\@v0.12.0/layouts/_partials/scripts.html 
layouts/partials/scripts.html
   --- 
/Users/andrewlamb/go/pkg/mod/github.com/google/[email protected]/layouts/_partials/scripts.html
      2026-02-11 07:27:43
   +++ layouts/partials/scripts.html    2026-02-11 09:32:58
   @@ -77,9 +77,8 @@
    {{ partial "hooks/body-end.html" . -}}
   
    {{ define "algolia/scripts" -}}
   -<script src="https://cdn.jsdelivr.net/npm/@docsearch/[email protected]";
   -  
integrity="sha512-lsD+XVzdBI6ZquXc8gqbw0/bgrfIsMJwY/8xvmvbN+U3gZSeG7BXQoCq4zv/yCmntR2GLHtgB+bD4ESPsKIbIA=="
   -  crossorigin="anonymous" ></script>
   +<script src='{{ "vendor/docsearch/docsearch-3.8.2.min.js" | relURL }}'
   +  
integrity="sha512-lsD+XVzdBI6ZquXc8gqbw0/bgrfIsMJwY/8xvmvbN+U3gZSeG7BXQoCq4zv/yCmntR2GLHtgB+bD4ESPsKIbIA=="></script>
    <script type="text/javascript">
    const containers = ['#docsearch-0', '#docsearch-1'];
    for (let c of containers) {
   ```
   
   Again note integrity is the same



##########
layouts/partials/hooks/body-end.html:
##########
@@ -1,10 +0,0 @@
-{{ with .Site.Params.algolia_docsearch }}

Review Comment:
   this is already included in the body and head templates, so there is no need 
to add a second override



##########
layouts/partials/head.html:
##########
@@ -0,0 +1,61 @@
+{{/* cSpell:ignore docsearch opengraph outputformat */ -}}

Review Comment:
   I have another proposal here to vendor the entire docsy template so it is 
easier to find / understand
   - https://github.com/apache/parquet-site/pull/160
   



##########
README.md:
##########
@@ -77,6 +77,27 @@ hugo server --bind 0.0.0.0 # run the server
 
 You can now preview the site locally on http://localhost:1313/
 
+# Changing the docsy templates

Review Comment:
   This explains how to compare the template overrides to the originals



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to