<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.nixos.org/w/index.php?action=history&amp;feed=atom&amp;title=Hugo%2Fen</id>
	<title>Hugo/en - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nixos.org/w/index.php?action=history&amp;feed=atom&amp;title=Hugo%2Fen"/>
	<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=Hugo/en&amp;action=history"/>
	<updated>2026-05-09T22:46:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.0</generator>
	<entry>
		<id>https://wiki.nixos.org/w/index.php?title=Hugo/en&amp;diff=26974&amp;oldid=prev</id>
		<title>FuzzyBot: Updating to match new version of source page</title>
		<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=Hugo/en&amp;diff=26974&amp;oldid=prev"/>
		<updated>2025-10-07T20:52:22Z</updated>

		<summary type="html">&lt;p&gt;Updating to match new version of source page&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:52, 7 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l112&quot;&gt;Line 112:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 112:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Applications]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Applications]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Server]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Server]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Go]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff:1.41:old-21591:rev-26974:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>FuzzyBot</name></author>
	</entry>
	<entry>
		<id>https://wiki.nixos.org/w/index.php?title=Hugo/en&amp;diff=21591&amp;oldid=prev</id>
		<title>FuzzyBot: Updating to match new version of source page</title>
		<link rel="alternate" type="text/html" href="https://wiki.nixos.org/w/index.php?title=Hugo/en&amp;diff=21591&amp;oldid=prev"/>
		<updated>2025-05-19T06:59:40Z</updated>

		<summary type="html">&lt;p&gt;Updating to match new version of source page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Hugo&amp;#039;&amp;#039;&amp;#039; is a static site generator written in Go. It builds websites from content files and templates, supporting features such as Markdown content, themes, and flexible deployment options. Hugo is available in the NixOS ecosystem and can be used for a variety of web publishing tasks.&amp;lt;ref&amp;gt;https://gohugo.io/documentation/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Shell ====&lt;br /&gt;
&lt;br /&gt;
To temporarily use Hugo in a shell environment, you can run:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
nix-shell -p hugo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will provide a shell with Hugo available without adding it to your system configuration.&lt;br /&gt;
&lt;br /&gt;
==== System setup ====&lt;br /&gt;
&lt;br /&gt;
To install Hugo, add it to either the system-wide &amp;lt;code&amp;gt;environment.systemPackages&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;/etc/nixos/configuration.nix&amp;lt;/code&amp;gt; or to the user-specific &amp;lt;code&amp;gt;home.packages&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;~/.config/nixpkgs/home.nix&amp;lt;/code&amp;gt;.&amp;lt;ref&amp;gt;https://nixos.org/manual/nixos/stable/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;nix&amp;quot;&amp;gt;&lt;br /&gt;
# System-wide installation (in /etc/nixos/configuration.nix)&lt;br /&gt;
environment.systemPackages = with pkgs; [&lt;br /&gt;
  hugo&lt;br /&gt;
  git # Useful for managing Hugo themes and site repositories&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
# User-specific installation (in ~/.config/nixpkgs/home.nix)&lt;br /&gt;
home.packages = with pkgs; [&lt;br /&gt;
  hugo&lt;br /&gt;
  git&lt;br /&gt;
];&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, rebuild your system or apply your Home Manager configuration:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# For system-wide installation&lt;br /&gt;
sudo nixos-rebuild switch&lt;br /&gt;
&lt;br /&gt;
# For Home Manager&lt;br /&gt;
home-manager switch&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Basic ====&lt;br /&gt;
&lt;br /&gt;
Basic Hugo configuration involves creating a new site and choosing themes. Use the following command to create a new Hugo site:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
hugo new site my-site&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Navigate to the site directory and add a theme as a git submodule or download it directly. For detailed steps, refer to the official Hugo documentation.&lt;br /&gt;
&lt;br /&gt;
==== Advanced ====&lt;br /&gt;
&lt;br /&gt;
{{Expansion|reason=Section incomplete, needs detailed content on advanced configuration with NixOS}}&lt;br /&gt;
&lt;br /&gt;
== Tips and tricks ==&lt;br /&gt;
&lt;br /&gt;
=== Development Shell ===&lt;br /&gt;
&lt;br /&gt;
You may want to limit Hugo installation to your project only. This allows contributors to use the exact dependencies specified for the project:&lt;br /&gt;
{{file|shell.nix|nix|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{ pkgs ? import &amp;lt;nixpkgs&amp;gt; {} }:&lt;br /&gt;
  pkgs.mkShellNoCC {&lt;br /&gt;
    packages = [&lt;br /&gt;
      pkgs.hugo&lt;br /&gt;
      # Other dependencies for your project.&lt;br /&gt;
    ];&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To avoid typing &amp;lt;code&amp;gt;nix-shell&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;nix develop&amp;lt;/code&amp;gt; to access the dev shell, consider [[Direnv|enabling nix-direnv]].&lt;br /&gt;
&lt;br /&gt;
=== Theming ===&lt;br /&gt;
&lt;br /&gt;
Nix can be used to deterministically import Hugo themes by pinning them to a specific revision:&lt;br /&gt;
{{file|shell.nix|nix|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{ pkgs ? import &amp;lt;nixpkgs&amp;gt; {} }: let&lt;br /&gt;
  hugo-theme = pkgs.fetchFromGitHub {&lt;br /&gt;
    owner = &amp;quot;vaga&amp;quot;;&lt;br /&gt;
    repo = &amp;quot;hugo-theme-m10c&amp;quot;;&lt;br /&gt;
    rev = &amp;quot;862c6e941be9bc46ce8adc6a2fa9e984ba647d6f&amp;quot;;&lt;br /&gt;
    hash = &amp;quot;sha256-wcJSGjL/u43hPLblPmUhusqiMmadVBWJhihRinRXqzg=&amp;quot;;&lt;br /&gt;
  };&lt;br /&gt;
in&lt;br /&gt;
  pkgs.mkShellNoCC {&lt;br /&gt;
    packages = [&lt;br /&gt;
      pkgs.hugo&lt;br /&gt;
      # Other dependencies for your project.&lt;br /&gt;
    ];&lt;br /&gt;
    shellHook = &amp;#039;&amp;#039;&lt;br /&gt;
      mkdir -p themes&lt;br /&gt;
      ln -snf &amp;quot;${hugo-theme}&amp;quot; themes/m10c&lt;br /&gt;
    &amp;#039;&amp;#039;;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
After creating a &amp;lt;code&amp;gt;hugo.toml&amp;lt;/code&amp;gt; file like the following, activate the theme with &amp;lt;code&amp;gt;hugo new site . --force&amp;lt;/code&amp;gt;:&lt;br /&gt;
{{file|hugo.toml|toml|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
baseURL = &amp;#039;https://example.com/&amp;#039;&lt;br /&gt;
languageCode = &amp;#039;en-us&amp;#039;&lt;br /&gt;
title = &amp;#039;example-site&amp;#039;&lt;br /&gt;
theme = &amp;#039;m10c&amp;#039;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
{{Expansion|reason=Section incomplete, needs detailed troubleshooting steps}}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
[[Category:Applications]]&lt;br /&gt;
[[Category:Server]]&lt;/div&gt;</summary>
		<author><name>FuzzyBot</name></author>
	</entry>
</feed>