<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Hugo on Ryan P. Meyer</title><link>https://ryanpmeyer.eu/tags/hugo/</link><description>Something my own.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@ryanpmeyer.eu (Ryan P. Meyer)</managingEditor><webMaster>hello@ryanpmeyer.eu (Ryan P. Meyer)</webMaster><copyright>© 2026 Ryan P. Meyer</copyright><lastBuildDate>Mon, 18 Mar 2024 13:23:47 +0100</lastBuildDate><atom:link href="https://ryanpmeyer.eu/tags/hugo/index.xml" rel="self" type="application/rss+xml"/><item><title>Building My Site</title><link>https://ryanpmeyer.eu/posts/building-my-site/</link><pubDate>Mon, 18 Mar 2024 13:23:47 +0100</pubDate><atom:updated>2024-03-18T13:23:47+01:00</atom:updated><author>hello@ryanpmeyer.eu (Ryan P. Meyer)</author><guid isPermaLink="true">https://ryanpmeyer.eu/posts/building-my-site/</guid><category>posts</category><category>blog</category><category>hugo</category><category>website</category><category>guide</category><description>A scalable site.</description><content:encoded><![CDATA[<h2 id="introduction">Introduction</h2>
<aside class="alert alert--info" role="note">
  <strong>Info:</strong> This is not a full step by step guide, but one that can be used in combination with the standard guides available! Also I plan to update this after some time, so it will get better. 🙈
</aside>

<p>For those curious this guide is how I got this site up and running using a combination of Github, as the deployment automation and hosting of the site, and Hugo, a static website generator tool, using the Congo theme. This is all better documented on all the referenced sites, but this might help with bridging any gaps, or maybe provide a more concentrated interpretation of the above guides.</p>
<p>The assumptions are that you know your way around the terminal and know how to use tools like <code>git</code>, <code>brew</code> (for macs) and modify your domain&rsquo;s DNS.</p>
<p>All references can be found at the following sites:</p>
<p><a href="https://gohugo.io/getting-started/quick-start/">https://gohugo.io/getting-started/quick-start/</a> - Hugo quickstart guide. I would start here if you have no idea what is going on.
<a href="https://jpanther.github.io/congo/docs/installation/">https://jpanther.github.io/congo/docs/installation/</a> - An end to end guide from the theme&rsquo;s creator. Really this should cover most everything.
<a href="https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages">https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages</a> - Important information using GitHub Pages (which is what we will be doing)
<a href="https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site">https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site</a> - Important information on DNS for your domain to point it to GitHub Pages.
<a href="https://github.com/CodeOnRye/codeonrye.github.io">https://github.com/CodeOnRye/codeonrye.github.io</a> - Lastly, here is all the code running this site, so you could always start from there!</p>
<h3 id="schema">Schema</h3>
<p>First let&rsquo;s lay out all the pieces to best understand how this will work.</p>
<div class="mermaid">
graph TD
A[Repository Markdown Files] -->|Git Commit| B(GitHub)
B --> C{GitHub Actions}
C -->|Watches Main Branch| B
C --> F(Runs Hugo)
F -->|Processes MD to HTML| G(Pushed to gh_pages Branch)
D[Domain Registrar] -->|A Record| E(github.io)
G --> B
E --> G
subgraph Local
A
end
subgraph GitHub
B
C
F
G
end
subgraph DNS
D
E
end
</div>

<p>As shown, wherever you may be sourcing your markdown files, once they are pushed to GitHub then the magic starts happening. A GitHub Action will run on commits, running a hugo service to generate the html files and pushing them back to a specific branch, <code>gh_pages</code>. This branch is configured in the repository to be the source for the github site. On the other end, the DNS registrar has an <code>A Record</code> set so that it redirects to the GitHub Provided site. Once it is all set up, then all you need to do is update your Hugo files and push!</p>
<h2 id="github">GitHub</h2>
<p>You should start by setting up your GitHub repository and various settings as needed. This will help prepare for the automations and configurations later.</p>
<h3 id="create-your-repo">Create Your Repo</h3>
<p>One thing that got me, was that since we want to point to use the GitHub Pages functionality, we have to name the repository <code>YOURUSERNAME.github.io</code>. There may be another way to do this, but this is what I did.</p>
<p>Once created, go ahead and clone it down to your local environment.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git clone git@github.com:YOURUSERNAME/YOURUSERNAME.github.io.git
</span></span></code></pre></div><h2 id="hugo">Hugo</h2>
<p>First things first. You need to get Hugo up and running and become familiar enough with it. Use the linked guide <a href="https://gohugo.io/getting-started/quick-start/">above</a> to just try setting up a quick one locally. Once you get a feel comfortable with how it works with markdown files, then we can initialize it in the repository file we created in previous step.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> /PATH/TO/YOURUSERNAME.github.io 
</span></span><span class="line"><span class="cl">hugo new site ./
</span></span></code></pre></div><h3 id="congo-theme">Congo Theme</h3>
<p>Next we will install and set up the theme. As all themes are different, this may not apply to others, so take that with a grain of salt if you are deviating here.</p>
<p>We need to first pull down the theme, to do this we will use the <code>git submodule</code> function. This keeps our tooling from becoming more complex.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="nb">cd</span> /PATH/TO/YOURUSERNAME.github.io
</span></span><span class="line"><span class="cl">git init
</span></span><span class="line"><span class="cl">git submodule add -b stable https://github.com/jpanther/congo.git themes/congo
</span></span></code></pre></div><p>Next we will need to configure Hugo to use this Theme. The <a href="https://jpanther.github.io/congo/docs/installation/">theme&rsquo;s guide</a> is best to follow, as it will be more up-to-date. But to boil it down you need to copy the <code>/PATH/TO/YOURUSERNAME.github.io/theme/congo/config/_default</code> folder to <code>/PATH/TO/YOURUSERNAME.github.io/</code>. Now we customize the files as needed.</p>
<ul>
<li><strong>config.toml</strong> - Your main config file for Hugo where you set your website name, theme (congo) and other settings</li>
<li><strong>languages.en.toml</strong> - Sets your defaults for the site when set in the <code>en</code> language.</li>
<li><strong>markup.toml</strong> - Used for the theme, I have not touched this.</li>
<li><strong>menus.en.toml</strong> - Like languages.en.toml, this is the configuration for the menus when set to the <code>en</code> language.</li>
<li><strong>module.toml</strong> - Used for the theme, I have not touched this.</li>
<li><strong>params.toml</strong> - Allows you to further configure the theme.</li>
</ul>
<h4 id="making-a-post">Making a Post</h4>
<p>With this theme, I&rsquo;ve decided to set up my posts within their own folders, rather than all under the <code>./content/</code> folder. This seems to work best for this theme. So a post will look roughly like this</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">content/posts/building-my-site
</span></span><span class="line"><span class="cl">├── img
</span></span><span class="line"><span class="cl">│   ├── gh_actions_permissions.png
</span></span><span class="line"><span class="cl">│   ├── gh_pages_config.png
</span></span><span class="line"><span class="cl">│   └── gh_workflow_permissions.png
</span></span><span class="line"><span class="cl">└── index.md
</span></span></code></pre></div><p>Notice that the markdown file is named <code>index.md</code> and not the name of the post, that is reserved for the folder name. More examples can be found <a href="https://jpanther.github.io/congo/docs/content-examples/">here</a></p>
<h2 id="github-actions">GitHub Actions</h2>
<p>Lastly, once you have a nice site configured, and you&rsquo;ve tested it out locally with the <code>hugo server -D</code> we can start working on getting the automations going to publish this online.</p>
<h4 id="github-actions-workflow-file">GitHub Actions Workflow File</h4>
<p>You can leverage the default one provided by the theme <a href="https://jpanther.github.io/congo/docs/hosting-deployment/#github-pages">here</a>. This should work out of the box for you. Once you add it to your <code>/PATH/TO/YOURUSERNAME.github.io/.github/workflows/</code> folder and push it to GitHub you will need to verify it runs successfully.</p>
<p>One thing to note here, if you are going to use a custom domain you will want to add a run command into your YAML file to recreate that file like below:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-YAML" data-lang="YAML"><span class="line"><span class="cl"><span class="nn">...</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">Build</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">run</span><span class="p">:</span><span class="w"> </span><span class="l">hugo --minify</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">GH CNAME</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span><span class="nt">run</span><span class="p">:</span><span class="w"> </span><span class="l">echo &#34;YOURDOMAIN.COM&#34; &gt; ./public/CNAME</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">Deploy</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nn">...</span><span class="w">
</span></span></span></code></pre></div><p>On GitHub you can navigate to your repository, and then the Actions Page to verify if it is running properly. If not you will want to check the follow settings.</p>
<h4 id="github-repository-settings">GitHub Repository Settings</h4>
<p>Make sure your settings are as follows:</p>
<p><img src="/posts/building-my-site/img/gh_actions_permissions.png" alt="GitHub Actions Permissions"></p>
<p><img src="/posts/building-my-site/img/gh_workflow_permissions.png" alt="GitHub Workflow Permissions"></p>
<p>Those should fix it to allow the actions to properly run. Once they do you will now have a <code>gh_pages</code> branch that mirror&rsquo;s the contents of the <code>public</code> folder that Hugo generates when running the hugo commands.</p>
<h2 id="dns">DNS</h2>
<p>Last but not least, we will now make the site available online! First we finish configuring GitHub, test and then point our domain to it.</p>
<h3 id="github-pages">GitHub Pages</h3>
<p>Under the repository&rsquo;s settings for Pages you will want to configure it as follows</p>
<p><img src="/posts/building-my-site/img/gh_pages_config.png" alt="GitHub Pages Configuration"></p>
<p>A few things to note, you can only enable SSL enforcement once your custom domain is configured (next step). But this will be fine for now to test. You should now be able to got to YOURUSERNAME.github.io and see your site! If you do then finish configurations on your domain registrar.</p>
<h3 id="domain-dns">Domain DNS</h3>
<p>First you should go to your account settings, then under the Pages option on the left sidebar, add your domain there. You will need to verify the domain with a <code>TXT Record </code>.</p>
<p>Per the <a href="https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site">details</a> from GitHub you will want to add the follow records to your Domain&rsquo;s DNS provider.</p>
<p><code>A Record</code></p>
<pre tabindex="0"><code>185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
</code></pre><p><code>AAAA Record</code></p>
<pre tabindex="0"><code>2606:50c0:8000::153
2606:50c0:8001::153
2606:50c0:8002::153
2606:50c0:8003::153
</code></pre><p><code>CNAME Record</code></p>
<pre tabindex="0"><code>www.YOURDOMAIN.com
</code></pre><p>I would avoid using the Alias, as that would block you from using DNSSEC.</p>
<p>At this point you should now be able to go to yourdomain.com and load your github site. If needed, go back to your settings and enable SSL.</p>
<h1 id="conclusion">Conclusion</h1>
<p>This rough guide is how I have mine set up with tips on how you can do it yourself. Again, it isn&rsquo;t meant to be an end-to-end guide. But over time I will probably update this guide to better clarify or expand items.</p>
]]></content:encoded></item><item><title>Hello World</title><link>https://ryanpmeyer.eu/posts/hello-world/</link><pubDate>Thu, 25 Jan 2024 13:23:47 +0100</pubDate><atom:updated>2024-01-25T13:23:47+01:00</atom:updated><author>hello@ryanpmeyer.eu (Ryan P. Meyer)</author><guid isPermaLink="true">https://ryanpmeyer.eu/posts/hello-world/</guid><category>posts</category><category>blog</category><category>hugo</category><category>website</category><description>Hello World.</description><content:encoded><![CDATA[<h2 id="introduction">Introduction</h2>
<p>The classic initialization of any project always ends up beginning with those words. I&rsquo;ve decided to take another shot at curating a digital space for myself. In the past I have tried to create websites using various frameworks and tools, but they always became more work than I felt they were worth. Looking back, I&rsquo;ve always tried to create something more complex than I needed. Hoping to grow into it, rather than grow with it. But I really hadn&rsquo;t hammered out the foundation of what I actually needed, and focused on what I wanted. Taking a step back I wanted to focus on what I needed from this projected. With hopes that the choices will be flexible enough to not require a lot of work to expand later or maintain.</p>
<p>Those needs have boiled down to the following.</p>
<h3 id="defining-my-goals">Defining My Goals</h3>
<p>In short, answering this was the hardest part. Simply &ldquo;a website&rdquo; is too broad of an answer; I needed to really think about what content I wanted, how I wanted to present it, how it should be maintained and what I wanted to get out of my time with the project. So lets start with defining the content.</p>
<p>The content will be my own musings, or ramblings for some. I don&rsquo;t want to lock myself into a certain type of topic or subject matter. So a semi-professional blog and portfolio I think will strike a balance. That means the site must be able to provide an easy way for me to both create that content and present it.</p>
<p>Presentation of the website should be clean and modern. Next I need to be able to customize it once I start having a more fully formed idea of the content. So again, it needs to be a flexible solution that can be changed without much headache.</p>
<p>And headaches is what I have gotten in the past with frameworks like wordpress or other blog focused solutions. They did so much more than I needed at the time, that I would get stuck in the weeds. I&rsquo;d enable features I didn&rsquo;t need, or maybe even fully understand. This solution needed to be simple, but extendable when I needed it to be.</p>
<p>Lastly, in the end what I want out of this project is a website I can call my own. A place that is easy for me to keep up to date both on content and patches. It had to work for me, rather than me work for it. Which has lead me to go with this set up.</p>
<h2 id="the-project">The Project</h2>
<p>This project is created with as minimal tools as possible; Hugo as the website generator and will be served by GitHub.</p>
<ul>
<li>Hugo - This is the website framework tooling solution, a static website generator</li>
<li>Github/Gitlab Pages Hosted - Since I am setting up a static website, that means no backends - and not servers - needed! So why not use Github or GitLab&rsquo;s pages and actions to handle the hosting and publishing?</li>
</ul>
<h3 id="openness">Openness</h3>
<p>I am always a big fan of Free and Open Source Software, FOSS for short. So where I can, I try my best to leverage systems and tools for that. Granted there comes a time where, well, time isn&rsquo;t as available. Its the well-known adage of FOSS not being free in the cost of time. However, if the system is simple enough and the data portable enough, then it might very well be worth that time and effort to setup and maintain.</p>
<h3 id="the-framework">The Framework</h3>
<p>Needing the site to be maintainable, is key to keeping the project, and thus the site, up and running. So, where I could, I would remove systems that needed my attention to work or stay in good working order. Too many website frameworks required lots of backends, databases and the like, as well as had features I simply didn&rsquo;t care for. I just needed something that was dead simple to set up, run and update with new content when I felt like it.</p>
<h3 id="the-platform">The Platform</h3>
<p>In the past I have always set up servers, installed the needed services and then install any applications to get a website up and running. But each of those items introduces complexity and friction. I need to make sure the services are up to date. The database needs to be backed up properly. How do I migrate to a new server if needed, and so on. With the static aspect of Hugo I can avoid this because, in the end, the website is just a bunch of files. And those files are already backed up in Github which is also &ldquo;publishing them.&rdquo; Overall reducing complexity to make it easier to maintain and use, which is exactly what I want.</p>
<h2 id="tldr">TL;DR</h2>
<p>In short, I have set up a Hugo based static website that I can use Github Pages and Actions to host and manage! I will probably also post a guide incase someone wants to try themselves!</p>
]]></content:encoded></item></channel></rss>