<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Submodules on homelab</title>
    <link>https://homelab.nbkelley.com/tags/submodules/</link>
    <description>Recent content in Submodules on homelab</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Fri, 01 May 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://homelab.nbkelley.com/tags/submodules/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Hugo Git Submodule Extraction Pattern</title>
      <link>https://homelab.nbkelley.com/docs/development/hugo-git-submodule-pattern/</link>
      <pubDate>Fri, 01 May 2026 00:00:00 +0000</pubDate>
      <guid>https://homelab.nbkelley.com/docs/development/hugo-git-submodule-pattern/</guid>
      <description>&lt;h1 id=&#34;hugo-git-submodule-extraction-pattern&#34;&gt;Hugo Git Submodule Extraction Pattern&lt;a class=&#34;anchor&#34; href=&#34;#hugo-git-submodule-extraction-pattern&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;what-was-established&#34;&gt;What Was Established&lt;a class=&#34;anchor&#34; href=&#34;#what-was-established&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Hugo themes installed as Git submodules (e.g., &lt;code&gt;git submodule add &amp;lt;url&amp;gt; themes/theme-name&lt;/code&gt;)&#xA;carry their own Git history. When you want to customize the theme beyond configuration,&#xA;extracting the submodule into the main repository gives you full control over theme files&#xA;without managing a separate submodule repository.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-pattern&#34;&gt;The Pattern&lt;a class=&#34;anchor&#34; href=&#34;#the-pattern&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Remove the submodule registration:&lt;/strong&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git submodule deinit themes/theme-name&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git rm themes/theme-name&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Re-add the theme as regular files:&lt;/strong&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone &amp;lt;theme-url&amp;gt; /tmp/theme-temp&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cp -r /tmp/theme-temp/* themes/theme-name/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git add themes/theme-name/&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git commit -m &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Extract theme-name from submodule into main repo&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Result:&lt;/strong&gt; Theme files are now tracked directly in the main repository.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;when-to-use&#34;&gt;When to Use&lt;a class=&#34;anchor&#34; href=&#34;#when-to-use&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You need to modify theme templates, layouts, or partials beyond what config allows&lt;/li&gt;&#xA;&lt;li&gt;The upstream theme is stable and you don&amp;rsquo;t need to pull updates&lt;/li&gt;&#xA;&lt;li&gt;You want simpler CI/CD without recursive submodule clones&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;when-not-to-use&#34;&gt;When Not to Use&lt;a class=&#34;anchor&#34; href=&#34;#when-not-to-use&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The theme receives frequent updates you want to track&lt;/li&gt;&#xA;&lt;li&gt;You only need CSS overrides (use &lt;code&gt;assets/&lt;/code&gt; or &lt;code&gt;static/&lt;/code&gt; instead)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;related-pages&#34;&gt;Related Pages&lt;a class=&#34;anchor&#34; href=&#34;#related-pages&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://homelab.nbkelley.com/docs/administration/git-push-authentication/&#34;&gt;Git Push Authentication&lt;/a&gt;, &lt;a href=&#34;https://homelab.nbkelley.com/docs/web/ilmare-website/&#34;&gt;Ilmarë Website&lt;/a&gt;, &lt;a href=&#34;https://homelab.nbkelley.com/docs/services/cms-options/&#34;&gt;Self-Hosted CMS Options &amp;amp; Landscape&lt;/a&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
