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


##########
layouts/partials/scripts.html:
##########
@@ -0,0 +1,66 @@
+{{/*

Review Comment:
   Here is the diff compared to the template
   
   Run this command to compute the diff
   
   ```shell
   diff -du  
~/go/pkg/mod/github.com/google/docsy\@v0.12.0/layouts/_partials/scripts.html 
layouts/partials/scripts.html
   ```
   
   Here is the actual diff:
   
   ```diff
   --- 
/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-21 15:07:02
   @@ -1,26 +1,18 @@
   +{{/*
   +  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") -}}
   
   -{{ if .Site.Params.markmap.enable -}}
   -<style>
   -.markmap > svg {
   -  width: 100%;
   -  height: 300px;
   -}
   -</style>
   -<script>
   -window.markmap = {
   -  autoLoader: {
   -      manual: true,
   -      onReady() {
   -        const { autoLoader, builtInPlugins } = window.markmap;
   -        autoLoader.transformPlugins = builtInPlugins.filter(plugin => 
plugin.name !== 'prism');
   -      },
   -  },
   -};
   -</script>
   -<script src="https://cdn.jsdelivr.net/npm/markmap-autoloader";></script>
   -{{ end -}}
   +{{/* 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 -}}
      <script src='{{ "js/deflate.js" | relURL }}'></script>
   @@ -70,25 +62,5 @@
        crossorigin="anonymous"></script>
    {{ end -}}
   
   -{{ if and .Site.Params.search (isset .Site.Params.search "algolia") -}}
   -  {{ template "algolia/scripts" .Site.Params.search.algolia -}}
   -{{ end -}}
    <script src='{{ "js/tabpane-persist.js" | relURL }}'></script>
    {{ 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 type="text/javascript">
   -const containers = ['#docsearch-0', '#docsearch-1'];
   -for (let c of containers) {
   -  docsearch({
   -    container: c,
   -    appId: {{ .appId | default "R2IYF7ETH7" }},
   -    apiKey: {{ .apiKey | default "599cec31baffa4868cae4e79f180729b" }},
   -    indexName: {{ .indexName | default "docsearch" }},
   -  });
   -}
   -</script>
   -{{ end -}}
   ```



-- 
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