<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Theming and style on pydata-hugo-theme</title><link>https://saltstack.github.io/pydata-hugo-theme/theming/</link><description>Recent content in Theming and style on pydata-hugo-theme</description><generator>Hugo</generator><language>en-US</language><atom:link href="https://saltstack.github.io/pydata-hugo-theme/theming/index.xml" rel="self" type="application/rss+xml"/><item><title>Branding</title><link>https://saltstack.github.io/pydata-hugo-theme/theming/branding/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://saltstack.github.io/pydata-hugo-theme/theming/branding/</guid><description>&lt;h2 id="logo"&gt;Logo&lt;/h2&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;.&lt;span style="color:#a6e22e"&gt;logo&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;text&lt;/span&gt; = &lt;span style="color:#e6db74"&gt;&amp;#39;My Site&amp;#39;&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;link&lt;/span&gt; = &lt;span style="color:#e6db74"&gt;&amp;#39;/&amp;#39;&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;# image_light = &amp;#39;images/logo-light.png&amp;#39;&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;# image_dark = &amp;#39;images/logo-dark.png&amp;#39;&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;alt_text&lt;/span&gt; = &lt;span style="color:#e6db74"&gt;&amp;#39;My Site — Home&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;ul&gt;&#10;&lt;li&gt;With no &lt;code&gt;image_light&lt;/code&gt; set, &lt;code&gt;text&lt;/code&gt; renders as a plain text brand link (falls back to &lt;code&gt;site.Title&lt;/code&gt; if &lt;code&gt;text&lt;/code&gt; is unset).&lt;/li&gt;&#10;&lt;li&gt;With &lt;code&gt;image_light&lt;/code&gt; set, the image is used instead; &lt;code&gt;image_dark&lt;/code&gt; swaps in for dark mode (falls back to &lt;code&gt;image_light&lt;/code&gt; if &lt;code&gt;image_dark&lt;/code&gt; is unset). Text still renders alongside the image if &lt;code&gt;text&lt;/code&gt; is explicitly set.&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;alt_text&lt;/code&gt; sets the image&amp;rsquo;s &lt;code&gt;alt&lt;/code&gt; attribute (falls back to &lt;code&gt;&amp;quot;&amp;lt;site title&amp;gt; - Home&amp;quot;&lt;/code&gt;).&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;This documentation site intentionally only sets &lt;code&gt;logo.text&lt;/code&gt; and ships no sample logo image at all — this is an unofficial, unaffiliated port, so it deliberately avoids using (or even hotlinking) the original PyData Sphinx Theme&amp;rsquo;s branding.&lt;/p&gt;</description></item><item><title>Fonts</title><link>https://saltstack.github.io/pydata-hugo-theme/theming/fonts/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://saltstack.github.io/pydata-hugo-theme/theming/fonts/</guid><description>&lt;p&gt;FontAwesome and Bootstrap&amp;rsquo;s JS are pulled in as build-time npm dependencies and mounted into the asset pipeline via &lt;code&gt;[[module.mounts]]&lt;/code&gt; in this module&amp;rsquo;s own &lt;code&gt;hugo.toml&lt;/code&gt; — see &lt;a href="https://saltstack.github.io/pydata-hugo-theme/hugo-only/asset-pipeline/"&gt;Asset pipeline&lt;/a&gt;&#10; for how the mounting/fingerprinting works.&lt;/p&gt;&#10;&lt;h2 id="overriding-the-bundled-fontawesome-version"&gt;Overriding the bundled FontAwesome version&lt;/h2&gt;&#10;&lt;p&gt;The pinned version lives in this module&amp;rsquo;s own &lt;code&gt;package.json&lt;/code&gt;. A consuming site can override it without forking the theme by mounting its own copy at the same target path — Hugo resolves mounts from the site&amp;rsquo;s own &lt;code&gt;node_modules&lt;/code&gt; first:&lt;/p&gt;</description></item><item><title>Light / dark mode</title><link>https://saltstack.github.io/pydata-hugo-theme/theming/light-dark/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://saltstack.github.io/pydata-hugo-theme/theming/light-dark/</guid><description>&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;default_mode&lt;/span&gt; = &lt;span style="color:#e6db74"&gt;&amp;#39;auto&amp;#39;&lt;/span&gt; &lt;span style="color:#75715e"&gt;# &amp;#39;light&amp;#39; | &amp;#39;dark&amp;#39; | &amp;#39;auto&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;auto&lt;/code&gt; follows the visitor&amp;rsquo;s OS/browser color-scheme preference. The mode is read/written to &lt;code&gt;localStorage&lt;/code&gt; client-side, so a visitor&amp;rsquo;s explicit choice persists across pages and future visits.&lt;/p&gt;&#10;&lt;h2 id="the-theme-switcher"&gt;The theme switcher&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;theme-switcher.html&lt;/code&gt; renders a dropdown (light/dark/system) — it&amp;rsquo;s in &lt;code&gt;navbar_end&lt;/code&gt; by default. Remove it from your navbar slots to hide the control entirely (visitors then always get whatever &lt;code&gt;default_mode&lt;/code&gt; resolves to):&lt;/p&gt;</description></item><item><title>Styling</title><link>https://saltstack.github.io/pydata-hugo-theme/theming/styling/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://saltstack.github.io/pydata-hugo-theme/theming/styling/</guid><description>&lt;h2 id="css-custom-properties"&gt;CSS custom properties&lt;/h2&gt;&#10;&lt;p&gt;The vendored &lt;code&gt;static/styles/pydata-sphinx-theme.css&lt;/code&gt; exposes the same &lt;code&gt;--pst-*&lt;/code&gt; CSS custom properties as the upstream theme (colors, fonts, spacing, sidebar widths, etc.). Override them in your own stylesheet:&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-css" data-lang="css"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;:&lt;span style="color:#a6e22e"&gt;root&lt;/span&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; --pst-color-primary: &lt;span style="color:#ae81ff"&gt;#123456&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;h2 id="adding-your-own-stylesheet"&gt;Adding your own stylesheet&lt;/h2&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;extra_css&lt;/span&gt; = [&lt;span style="color:#e6db74"&gt;&amp;#39;/css/custom.css&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;extra_css&lt;/code&gt; is this theme&amp;rsquo;s equivalent of Sphinx&amp;rsquo;s &lt;code&gt;html_css_files&lt;/code&gt; — a list of stylesheet paths or full URLs, injected after the theme&amp;rsquo;s own CSS (so your rules can override theme defaults without &lt;code&gt;!important&lt;/code&gt;).&lt;/p&gt;</description></item></channel></rss>