<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hugo-only features on pydata-hugo-theme</title><link>https://saltstack.github.io/pydata-hugo-theme/hugo-only/</link><description>Recent content in Hugo-only features on pydata-hugo-theme</description><generator>Hugo</generator><language>en-US</language><atom:link href="https://saltstack.github.io/pydata-hugo-theme/hugo-only/index.xml" rel="self" type="application/rss+xml"/><item><title>Asset pipeline</title><link>https://saltstack.github.io/pydata-hugo-theme/hugo-only/asset-pipeline/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://saltstack.github.io/pydata-hugo-theme/hugo-only/asset-pipeline/</guid><description>&lt;p&gt;The FontAwesome and Bootstrap JS mounted via &lt;code&gt;[[module.mounts]]&lt;/code&gt; (see &lt;a href="https://saltstack.github.io/pydata-hugo-theme/hugo-only/hugo-modules/"&gt;Hugo Modules&lt;/a&gt;&#10;) are loaded through &lt;a href="https://gohugo.io/hugo-pipes/introduction/" target=&amp;#34;_blank&amp;#34; rel=&amp;#34;noopener noreferrer&amp;#34;&gt;Hugo Pipes&lt;/a&gt;&#10;, not referenced as plain static &lt;code&gt;&amp;lt;script src&amp;gt;&lt;/code&gt; tags:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-go-html-template" data-lang="go-html-template"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;{{-&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;with&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;resources&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;.Get&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;vendor/fontawesome/all.min.js&amp;#34;&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;{{-&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;hugo&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;.IsDevelopment&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;&lt;span style="color:#f92672"&gt;script&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;src&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#75715e"&gt;{{&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;.RelPermalink&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;defer&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style="color:#f92672"&gt;script&lt;/span&gt;&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;{{-&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;{{-&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;with&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;.&lt;/span&gt; &lt;span style="color:#f92672"&gt;|&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;fingerprint&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &amp;lt;&lt;span style="color:#f92672"&gt;script&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;src&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#75715e"&gt;{{&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;.RelPermalink&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;integrity&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#75715e"&gt;{{&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;.Data.Integrity&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;crossorigin&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;anonymous&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;defer&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style="color:#f92672"&gt;script&lt;/span&gt;&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;{{-&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;end&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;{{-&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;end&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;{{-&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;end&lt;/span&gt; &lt;span style="color:#75715e"&gt;}}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10; &lt;button class="copybtn" type="button" aria-label="Copy to clipboard"&gt;&#10; &lt;i class="fa-regular fa-copy copybtn-icon-default" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;i class="fa-solid fa-check copybtn-icon-copied" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/button&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;In development builds, the file is served as-is for fast rebuilds. In production builds (&lt;code&gt;hugo --minify&lt;/code&gt;, or whenever &lt;code&gt;hugo.IsDevelopment&lt;/code&gt; is false), it&amp;rsquo;s fingerprinted — Hugo computes a content hash, appends it to the URL for cache-busting, and adds a Subresource Integrity (&lt;code&gt;integrity&lt;/code&gt;) attribute the browser verifies before executing the script. Sphinx has no equivalent — static files there are referenced as-is, with no build-time hashing or integrity verification.&lt;/p&gt;</description></item><item><title>Content-Security-Policy</title><link>https://saltstack.github.io/pydata-hugo-theme/hugo-only/security-csp/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://saltstack.github.io/pydata-hugo-theme/hugo-only/security-csp/</guid><description>&lt;p&gt;&lt;code&gt;head.html&lt;/code&gt; emits a &lt;code&gt;&amp;lt;meta http-equiv=&amp;quot;Content-Security-Policy&amp;quot;&amp;gt;&lt;/code&gt; tag on every page, with &lt;code&gt;script-src&lt;/code&gt; already covering the CDNs the theme&amp;rsquo;s own search feature needs (cdnjs for FontAwesome, jsdelivr for Fuse.js). If your site embeds a third-party iframe (a calendar widget, a video embed, etc.), extend &lt;code&gt;frame-src&lt;/code&gt; via:&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-toml" data-lang="toml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[&lt;span style="color:#a6e22e"&gt;params&lt;/span&gt;]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;csp_frame_src&lt;/span&gt; = [&lt;span style="color:#e6db74"&gt;&amp;#39;https://calendar.google.com&amp;#39;&lt;/span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10; &lt;button class="copybtn" type="button" aria-label="Copy to clipboard"&gt;&#10; &lt;i class="fa-regular fa-copy copybtn-icon-default" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;i class="fa-solid fa-check copybtn-icon-copied" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/button&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&lt;code&gt;'self'&lt;/code&gt; is always included automatically — you only need to list additional origins. Upstream Sphinx docs don&amp;rsquo;t ship a CSP meta tag at all; this is engineering specific to this port.&lt;/p&gt;</description></item><item><title>Hugo Modules</title><link>https://saltstack.github.io/pydata-hugo-theme/hugo-only/hugo-modules/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://saltstack.github.io/pydata-hugo-theme/hugo-only/hugo-modules/</guid><description>&lt;p&gt;This is the mechanism the theme itself is distributed through — Sphinx has no equivalent concept (a Sphinx theme is just a Python package with a &lt;code&gt;theme.conf&lt;/code&gt;, not a versioned, mountable dependency graph).&lt;/p&gt;&#10;&lt;h2 id="explicit-mounts"&gt;Explicit mounts&lt;/h2&gt;&#10;&lt;p&gt;Adding any &lt;code&gt;[[module.mounts]]&lt;/code&gt; entry disables Hugo&amp;rsquo;s implicit default mounts, so this module&amp;rsquo;s &lt;code&gt;hugo.toml&lt;/code&gt; re-declares every standard component directory explicitly (&lt;code&gt;content&lt;/code&gt;, &lt;code&gt;static&lt;/code&gt;, &lt;code&gt;layouts&lt;/code&gt;, &lt;code&gt;data&lt;/code&gt;, &lt;code&gt;assets&lt;/code&gt;, &lt;code&gt;i18n&lt;/code&gt;, &lt;code&gt;archetypes&lt;/code&gt;), plus two npm-sourced mounts that pull prebuilt JS straight out of &lt;code&gt;node_modules&lt;/code&gt; into the asset pipeline:&lt;/p&gt;</description></item><item><title>Markdown render hooks</title><link>https://saltstack.github.io/pydata-hugo-theme/hugo-only/render-hooks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://saltstack.github.io/pydata-hugo-theme/hugo-only/render-hooks/</guid><description>&lt;p&gt;&lt;code&gt;layouts/_default/_markup/render-link.html&lt;/code&gt; is a Hugo &lt;a href="https://gohugo.io/render-hooks/links/" target=&amp;#34;_blank&amp;#34; rel=&amp;#34;noopener noreferrer&amp;#34;&gt;render hook&lt;/a&gt;&#10; — it intercepts every &lt;code&gt;[text](url)&lt;/code&gt; link Hugo renders from your Markdown content, site-wide, and applies the same &lt;code&gt;external_links&lt;/code&gt; new-tab/exceptions rules (see &lt;a href="https://saltstack.github.io/pydata-hugo-theme/navigation/header-links/"&gt;Header links&lt;/a&gt;&#10;) that the theme&amp;rsquo;s own hand-written partials use.&lt;/p&gt;&#10;&lt;p&gt;The practical effect: you never need to write &lt;code&gt;target=&amp;quot;_blank&amp;quot; rel=&amp;quot;noopener&amp;quot;&lt;/code&gt; by hand in a blog post or page — every content-authored link gets consistent external-link behavior automatically, driven by one site-wide config block.&lt;/p&gt;</description></item><item><title>Menus</title><link>https://saltstack.github.io/pydata-hugo-theme/hugo-only/menus/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://saltstack.github.io/pydata-hugo-theme/hugo-only/menus/</guid><description>&lt;p&gt;Sphinx derives navigation from the doc tree (&lt;code&gt;toctree&lt;/code&gt; directives) — there&amp;rsquo;s no separately configured menu structure. This port instead uses two independent Hugo menus:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;&lt;code&gt;site.Menus.main&lt;/code&gt;&lt;/strong&gt; — top navbar links (rendered by &lt;code&gt;navbar-nav.html&lt;/code&gt;), with automatic overflow into a &amp;ldquo;More&amp;rdquo; dropdown past &lt;code&gt;header_links_before_dropdown&lt;/code&gt; entries (see &lt;a href="https://saltstack.github.io/pydata-hugo-theme/navigation/header-links/"&gt;Header links&lt;/a&gt;&#10;).&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;&lt;code&gt;site.Menus.sidebar&lt;/code&gt;&lt;/strong&gt; — the left sidebar nav tree (rendered by &lt;code&gt;sidebar-nav.html&lt;/code&gt;, see &lt;a href="https://saltstack.github.io/pydata-hugo-theme/navigation/navigation/"&gt;Sidebar navigation&lt;/a&gt;&#10;), falling back to &lt;code&gt;site.Menus.main&lt;/code&gt; if you don&amp;rsquo;t define one.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Because they&amp;rsquo;re independent, your top nav and sidebar nav don&amp;rsquo;t have to mirror each other — a common pattern (used by this docs site itself) is a short &lt;code&gt;main&lt;/code&gt; menu (just &amp;ldquo;Docs&amp;rdquo; + &amp;ldquo;GitHub&amp;rdquo;) alongside a much deeper &lt;code&gt;sidebar&lt;/code&gt; menu for in-page navigation.&lt;/p&gt;</description></item><item><title>Per-page overrides</title><link>https://saltstack.github.io/pydata-hugo-theme/hugo-only/page-overrides/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://saltstack.github.io/pydata-hugo-theme/hugo-only/page-overrides/</guid><description>&lt;p&gt;Several slot/behavior params can be overridden on a single page via frontmatter, resolved through a page → site → hardcoded-default fallback chain (&lt;code&gt;.Params.x | default (site.Params.x | default fallback)&lt;/code&gt;):&lt;/p&gt;&#10;&lt;div class="highlight-wrapper"&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;---&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;title&lt;/span&gt;: &lt;span style="color:#ae81ff"&gt;A page with no right sidebar&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;show_toc&lt;/span&gt;: &lt;span style="color:#66d9ef"&gt;false&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;---&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10; &lt;button class="copybtn" type="button" aria-label="Copy to clipboard"&gt;&#10; &lt;i class="fa-regular fa-copy copybtn-icon-default" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;i class="fa-solid fa-check copybtn-icon-copied" aria-hidden="true"&gt;&lt;/i&gt;&#10; &lt;/button&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&lt;code&gt;show_toc&lt;/code&gt; (see &lt;a href="https://saltstack.github.io/pydata-hugo-theme/navigation/page-toc/"&gt;Page table of contents&lt;/a&gt;&#10;) overrides &lt;code&gt;secondary_sidebar_items&lt;/code&gt; for just that page, without touching the site-wide default. &lt;code&gt;show_prev_next&lt;/code&gt; works the same way, overriding the site-wide &lt;code&gt;show_prev_next&lt;/code&gt; param (default &lt;code&gt;true&lt;/code&gt;) to hide (or show) the prev/next footer links on a single page — useful for standalone pages like an event calendar or an RSS feed list, where &amp;ldquo;previous/next page in section&amp;rdquo; links don&amp;rsquo;t make sense:&lt;/p&gt;</description></item></channel></rss>