<?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 moddedbear.com</title>
    <link>https://moddedbear.com/blog/hugo/</link>
    <description>Recent content in Hugo on moddedbear.com</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <managingEditor>jp@moddedbear.com (JP)</managingEditor>
    <webMaster>jp@moddedbear.com (JP)</webMaster>
    <copyright>Copyright © 2026, moddedBear.</copyright>
    <lastBuildDate>Mon, 27 Jan 2025 16:18:47 -0700</lastBuildDate>
    <atom:link href="https://moddedbear.com/blog/hugo/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to Post to a Hugo Blog on Android</title>
      <link>https://moddedbear.com/how-to-post-to-a-hugo-blog-on-android/</link>
      <pubDate>Mon, 27 Jan 2025 16:18:47 -0700</pubDate><author>jp@moddedbear.com (JP)</author>
      <guid>https://moddedbear.com/how-to-post-to-a-hugo-blog-on-android/</guid>
      <description>&lt;p&gt;A few months back I went looking into whether it was possible to post to my Hugo blog here using only my Android phone.&lt;/p&gt;&#xA;&lt;p&gt;It turns out that it is! It may even be slightly more straightforward than you&amp;rsquo;d guess, but I still ran into enough snags during the setup that I figured it&amp;rsquo;d be useful to document.&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;what-youll-need&#34;&gt; &lt;a href=&#34;#what-youll-need&#34;&gt;&#xA;    What you&amp;rsquo;ll need&#xA;&lt;/a&gt; &lt;/h2&gt;&#xA;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://termux.dev/en/&#34;&gt;Termux&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/gsantner/markor&#34;&gt;Markor&lt;/a&gt; (or any other text editor that will let you easily edit markdown files)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&#xA;&lt;h2 id=&#34;setup-termux&#34;&gt; &lt;a href=&#34;#setup-termux&#34;&gt;&#xA;    Setup Termux&#xA;&lt;/a&gt; &lt;/h2&gt;&#xA;&#xA;&lt;p&gt;If you haven&amp;rsquo;t used Termux before, one of the first things you&amp;rsquo;ll want to do is run &lt;code&gt;termux-setup-storage&lt;/code&gt;. This will grant Termux access to your phone&amp;rsquo;s storage, which we&amp;rsquo;ll need later in order to clone our site somewhere where our text editor will be able to get to it.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>A few months back I went looking into whether it was possible to post to my Hugo blog here using only my Android phone.</p>
<p>It turns out that it is! It may even be slightly more straightforward than you&rsquo;d guess, but I still ran into enough snags during the setup that I figured it&rsquo;d be useful to document.</p>

<h2 id="what-youll-need"> <a href="#what-youll-need">
    What you&rsquo;ll need
</a> </h2>

<ul>
<li><a href="https://termux.dev/en/">Termux</a></li>
<li><a href="https://github.com/gsantner/markor">Markor</a> (or any other text editor that will let you easily edit markdown files)</li>
</ul>

<h2 id="setup-termux"> <a href="#setup-termux">
    Setup Termux
</a> </h2>

<p>If you haven&rsquo;t used Termux before, one of the first things you&rsquo;ll want to do is run <code>termux-setup-storage</code>. This will grant Termux access to your phone&rsquo;s storage, which we&rsquo;ll need later in order to clone our site somewhere where our text editor will be able to get to it.</p>
<p>You&rsquo;ll also need to install git with <code>pkg install git</code> and Hugo with <code>pkg install hugo</code>.</p>

<h2 id="setup-git"> <a href="#setup-git">
    Setup git
</a> </h2>

<p>There&rsquo;s one option that you&rsquo;ll need to add to your git config in Termux, otherwise you&rsquo;ll probably run into errors later on about an &ldquo;unsafe repository&rdquo;. From what I can tell, this has something to do with how Android or Termux is handling file ownership, though much more than that I don&rsquo;t know.</p>
<p>You can get around this error by running <code>git config --global --add safe.directory '*'</code>. If you want to read up on why this safe directory check is in place, you can check <a href="https://git-scm.com/docs/git-config/2.35.2#Documentation/git-config.txt-safedirectory">the git documentation</a> and <a href="https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9">this commit</a> for more information. As long as you trust the files on your phone&rsquo;s storage (I can&rsquo;t think of a good reason why you wouldn&rsquo;t), you should be safe adding this config option to bypass the safety check.</p>

<h2 id="clone-your-site"> <a href="#clone-your-site">
    Clone your site
</a> </h2>

<p>This step will obviously vary slightly depending on where you host your site&rsquo;s repository. In my case, the git repository for my site is hosted on GitHub, and my preferred way of accessing it is through GitHub&rsquo;s command line tool. Fortunately this is easy to install in Termux with <code>pkg install gh</code>. Once it&rsquo;s installed, you should be able to authenticate normally with <code>gh auth login</code>.</p>
<p>Termux normally starts in its own internal directory which other apps can&rsquo;t access, so you&rsquo;ll need to navigate to somewhere in Android&rsquo;s &ldquo;external&rdquo; storage where Markor or your chosen text editor will be able to make edits. On my Google Pixel, this is located at <code>/storage/emulated/0/</code>. Termux will only be able to access this if you&rsquo;ve run the <code>termux-setup-storage</code> command from earlier.</p>
<p>You can clone your site anywhere under that directory that makes sense to you. For me, that was in the Documents directory.</p>

<h2 id="get-ready-to-write"> <a href="#get-ready-to-write">
    Get ready to write
</a> </h2>

<p>If you&rsquo;re used to creating a new post with the <code>hugo new</code> command, you might notice that it fails with an error about being unable to obtain a build lock. This is because some commands cause Hugo to try to obtain an OS-level write lock on the <code>.hugo_build.lock</code> file, which here it&rsquo;s unable to do either because of Android or Termux. My workaround is to create the new file manually and copy the frontmatter metadata from an existing post.</p>
<p>The <code>hugo server</code> and <code>hugo build</code> commands will also fail for the same reason, but these allow the build lock to be skipped by adding the <code>--noBuildLock</code> flag.</p>
<p>There&rsquo;s <a href="https://discourse.gohugo.io/t/what-is-the-hugo-build-lock-file/35417">a decent explanation of why this build lock exists on the Hugo support forum</a> if you&rsquo;d like to learn more about it. As long as you&rsquo;re not running multiple instances of Hugo at the same time, I don&rsquo;t believe you&rsquo;ll run into issues disabling it.</p>

<h2 id="write-and-publish"> <a href="#write-and-publish">
    Write and publish
</a> </h2>

<p>Everything past this point should work as you&rsquo;d expect it to. Just edit your post in Markor or whichever text editor you&rsquo;ve chosen and publish it when you&rsquo;re ready. You can even preview your site with <code>hugo build</code> (you may need the <code>--noBuildLock</code> flag mentioned earlier) and it works just as you&rsquo;d expect it to.</p>
<p>My site gets built and deployed by Vercel automatically when I push to the main branch, so to publish all I have to do is create a new commit and push it. If your publishing process involves building locally then copying the files somewhere, I assume that would also work as expected since common tools like <code>scp</code> are available in Termux.</p>

<h2 id="final-thoughts"> <a href="#final-thoughts">
    Final thoughts
</a> </h2>

<p>Everything here is based on my experience with my Google Pixel running Android 15. The process should be identical or at least extremely similar on other Android phones. If you try this and find that it isn&rsquo;t, feel free to reach out to me with the details and I&rsquo;ll try to get them added!</p>
<p>— JP</p>

      
      <hr>
      
      
      <p><a href='mailto:jp@moddedbear.com'>Reply by email</a></p>
      
      
      ]]></content:encoded>
    </item>
    <item>
      <title>Blog Questions Challenge 2025</title>
      <link>https://moddedbear.com/blog-questions-challenge-2025/</link>
      <pubDate>Tue, 21 Jan 2025 18:10:55 -0700</pubDate><author>jp@moddedbear.com (JP)</author>
      <guid>https://moddedbear.com/blog-questions-challenge-2025/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://joelchrono.xyz/blog/blog-questions-challenge-2025/&#34;&gt;Joel nominated me&lt;/a&gt;, so why not?&lt;/p&gt;&#xA;&#xA;&lt;h2 id=&#34;why-did-you-start-blogging-in-the-first-place&#34;&gt; &lt;a href=&#34;#why-did-you-start-blogging-in-the-first-place&#34;&gt;&#xA;    Why Did You Start Blogging In The First Place?&#xA;&lt;/a&gt; &lt;/h2&gt;&#xA;&#xA;&lt;p&gt;It was February 2021 and remote university classes were still in full swing thanks to covid. I had just recently created my first Mastodon account and it was a time of discovering lots of different ways that people were keeping the internet fun.&lt;/p&gt;&#xA;&lt;p&gt;One of those ways was the &lt;a href=&#34;https://geminiprotocol.net/&#34;&gt;gemini protocol&lt;/a&gt;, which was seeing a rise in popularity at the time. It introduced me to the idea that having your own space on the internet can be really simple and doesn&amp;rsquo;t exactly need to be professional. In fact, it seemed you didn&amp;rsquo;t even need a good reason for it.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://joelchrono.xyz/blog/blog-questions-challenge-2025/">Joel nominated me</a>, so why not?</p>

<h2 id="why-did-you-start-blogging-in-the-first-place"> <a href="#why-did-you-start-blogging-in-the-first-place">
    Why Did You Start Blogging In The First Place?
</a> </h2>

<p>It was February 2021 and remote university classes were still in full swing thanks to covid. I had just recently created my first Mastodon account and it was a time of discovering lots of different ways that people were keeping the internet fun.</p>
<p>One of those ways was the <a href="https://geminiprotocol.net/">gemini protocol</a>, which was seeing a rise in popularity at the time. It introduced me to the idea that having your own space on the internet can be really simple and doesn&rsquo;t exactly need to be professional. In fact, it seemed you didn&rsquo;t even need a good reason for it.</p>
<p>I had gotten a small Digital Ocean VPS for a web development course the previous semester. I still had a lot of leftover student credit with them, so I hadn&rsquo;t shut it down but wasn&rsquo;t really using it for anything. I ended up turning it into a gemini server where I published posts about nothing much in particular. It was fun and I didn&rsquo;t have much more of a reason than that. Looking back, I think my own standards for my writing have gotten higher as my writing has slowly improved.</p>

<h2 id="have-you-blogged-on-other-platforms-before"> <a href="#have-you-blogged-on-other-platforms-before">
    Have You Blogged On Other Platforms Before?
</a> </h2>

<p>Gemini has always had a small, niche userbase. I think knowing that helped me avoid any anxiety I might have had about publishing posts to the internet, but there came a point when I didn&rsquo;t want the protocol getting in the way of someone wanting to read something of mine, so I started looking into easy ways to get a website up and running.</p>
<p>I went to Neocities mostly for how easy it was to setup and it being pretty low commitment. I was doing <em>everything</em> on that site by hand. Yes, that even includes the RSS feed. You totally can do everything by hand, but for me it got old right around the time I was ready to commit more fully to the web, leading to the creation of my blog in its current form.</p>

<h2 id="what-platform-are-you-using-to-manage-your-blog-and-why-did-you-choose-it"> <a href="#what-platform-are-you-using-to-manage-your-blog-and-why-did-you-choose-it">
    What Platform Are You Using To Manage Your Blog, and Why Did You Choose It?
</a> </h2>

<p>Nowadays my main platform is a static website built with Hugo, though I do still publish to gemini.</p>
<p>I really can&rsquo;t remember why I chose Hugo in particular as my static site generator, but my experience with it has been great.</p>
<p>I don&rsquo;t really regret doing everything by hand before. It was fun in the beginning and gives me a better understanding and appreciation for Hugo.</p>
<p>I host the site on Vercel mostly because it came recommended as having a good free tier. It&rsquo;s really fast (as it should be for my tiny page sizes) and I don&rsquo;t have any complaints. Really though, there are so many good options for free/cheap hosting that I don&rsquo;t feel especially attached to Vercel, and it&rsquo;s nice knowing something as simple as this site could easily be migrated anywhere else.</p>

<h2 id="how-do-you-write-your-posts"> <a href="#how-do-you-write-your-posts">
    How Do You Write Your Posts?
</a> </h2>

<p>With Neovim, and more specifically <a href="https://www.lunarvim.org/">LunarVim</a>. I&rsquo;ve added a few plugins and config options that make writing blog posts easier. The most notable ones are <a href="https://github.com/folke/zen-mode.nvim">Zen Mode</a> and <a href="https://github.com/ggandor/leap.nvim">Leap</a>. I&rsquo;ve also enabled spell check for certain file types like markdown files.</p>
<p>I can also write and publish from my phone using <a href="https://github.com/gsantner/markor">Markor</a> and <a href="https://termux.dev/en/">Termux</a>, but I&rsquo;ve only ever done this once because <em>phone keyboards</em>.</p>

<h2 id="when-do-you-feel-most-inspired-to-write"> <a href="#when-do-you-feel-most-inspired-to-write">
    When Do You Feel Most Inspired To Write?
</a> </h2>

<p>Writing inspiration is kind of a slow build up for me lately. I think that&rsquo;s part of the reason I&rsquo;ve taken to the week notes format. It gives me a way to organize a bunch of smaller thoughts together which I might not have bothered writing otherwise.</p>

<h2 id="do-you-publish-immediately-after-writing-or-do-you-let-it-simmer-a-bit-as-a-draft"> <a href="#do-you-publish-immediately-after-writing-or-do-you-let-it-simmer-a-bit-as-a-draft">
    Do You Publish Immediately After Writing, Or Do You Let It Simmer A Bit As A Draft?
</a> </h2>

<p>It depends. Usually immediately after, but I&rsquo;ll hold onto finished drafts for a day or two if it&rsquo;s something I&rsquo;ve been working harder at.</p>

<h2 id="whats-your-favorite-post-on-your-blog"> <a href="#whats-your-favorite-post-on-your-blog">
    What’s Your Favorite Post On Your Blog?
</a> </h2>

<p>Probably my <a href="/its-time-to-switch-an-opinionated-linux-guide">guide for switching to Linux</a> since it&rsquo;s still the one I&rsquo;ve put the most time and research into. I&rsquo;m also a bit proud of the posts I just wrote about <a href="/outer-wilds-2024">Outer Wilds</a>.</p>
<p>Some time ago I added a section for featured posts to my website homepage to highlight posts I&rsquo;m proud of, so you should go check those out if you&rsquo;re interested.</p>

<h2 id="any-future-plans-for-your-blog"> <a href="#any-future-plans-for-your-blog">
    Any future plans for your blog?
</a> </h2>

<p>Not at the moment. I did a <a href="/theme-refresh">big refactor of my theme back in October</a> which I had been planning on and putting off for some time, but I&rsquo;m glad I did it.</p>

<h2 id="who-will-participate-next"> <a href="#who-will-participate-next">
    Who Will Participate Next?
</a> </h2>

<p>Ok honestly at this point I&rsquo;m having a hard time thinking of people that haven&rsquo;t been nominated for this challenge already. So&hellip; if you haven&rsquo;t been nominated yet, this is your excuse. I&rsquo;m officially nominating you.</p>
<p>— JP</p>

      
      <hr>
      
      
      <p><a href='mailto:jp@moddedbear.com'>Reply by email</a></p>
      
      
      ]]></content:encoded>
    </item>
    <item>
      <title>Theme Refresh</title>
      <link>https://moddedbear.com/theme-refresh/</link>
      <pubDate>Sat, 12 Oct 2024 16:11:51 -0600</pubDate><author>jp@moddedbear.com (JP)</author>
      <guid>https://moddedbear.com/theme-refresh/</guid>
      <description>&lt;p&gt;I just finished a bit of house cleaning around the site!&lt;/p&gt;&#xA;&lt;p&gt;Visually, I tried not to change a ton. Mostly things are slightly more spaced out now which should hopefully make the place more accessible, more readable, and easier to use on touch screens. The biggest differences are on the back end. I use &lt;a href=&#34;https://gohugo.io&#34;&gt;Hugo&lt;/a&gt; to generate my site, and previously I was using the &lt;a href=&#34;https://github.com/janraasch/hugo-bearblog&#34;&gt;Hugo Bear Blog theme&lt;/a&gt; and overriding a bunch of its files with my own that had my customizations. Now I&amp;rsquo;ve refactored everything into my own proper Hugo theme using &lt;a href=&#34;https://github.com/clente/hugo-bearcub&#34;&gt;Bear Cub&lt;/a&gt; as a base.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I just finished a bit of house cleaning around the site!</p>
<p>Visually, I tried not to change a ton. Mostly things are slightly more spaced out now which should hopefully make the place more accessible, more readable, and easier to use on touch screens. The biggest differences are on the back end. I use <a href="https://gohugo.io">Hugo</a> to generate my site, and previously I was using the <a href="https://github.com/janraasch/hugo-bearblog">Hugo Bear Blog theme</a> and overriding a bunch of its files with my own that had my customizations. Now I&rsquo;ve refactored everything into my own proper Hugo theme using <a href="https://github.com/clente/hugo-bearcub">Bear Cub</a> as a base.</p>
<p>There&rsquo;s a couple reasons for having done this.</p>
<p>It makes my site a lot more organized. All my styling and features are in one place instead of being spread out between my site repo and the theme.</p>
<p>What I also really like is that others now have access to my Hugo theme, either for their own blog or just as a reference. I did my best during the refactor to implement everything cleanly and in a way that makes customization really easy. Pretty much every feature can be shown or hidden via config file, and customizing colors and fonts is as simple as I could make it.</p>
<p>If you&rsquo;re interested, you can <a href="https://github.com/moddedBear/hugo-moddedbear-theme">check out my theme here</a>. I&rsquo;m of course open to feedback if you find any issues.</p>
<p>&mdash; JP</p>

      
      <hr>
      
      
      <p><a href='mailto:jp@moddedbear.com'>Reply by email</a></p>
      
      
      ]]></content:encoded>
    </item>
  </channel>
</rss>
