<?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>Regex on ram&#39;s blog</title>
    <link>https://blog.maheshwariram.com/tags/regex/</link>
    <description>Recent content in Regex on ram&#39;s blog</description>
    <image>
      <title>ram&#39;s blog</title>
      <url>https://blog.maheshwariram.com/images/r.png</url>
      <link>https://blog.maheshwariram.com/images/r.png</link>
    </image>
    <generator>Hugo -- 0.146.0</generator>
    <language>en</language>
    <lastBuildDate>Sun, 04 May 2025 19:07:22 +0200</lastBuildDate>
    <atom:link href="https://blog.maheshwariram.com/tags/regex/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>issues faced while migrating from WordPress to Hugo with PaperMod</title>
      <link>https://blog.maheshwariram.com/posts/troubleshooting/wptohugo/</link>
      <pubDate>Sun, 04 May 2025 04:28:10 +0200</pubDate>
      <guid>https://blog.maheshwariram.com/posts/troubleshooting/wptohugo/</guid>
      <description>&lt;h3 id=&#34;issue-1-no-navigation-links-at-the-bottom-of-the-post&#34;&gt;issue 1: no navigation links at the bottom of the post&lt;/h3&gt;
&lt;h3 id=&#34;issue-2-no-posts-displayed-on-the-homepage&#34;&gt;issue 2: no posts displayed on the homepage&lt;/h3&gt;
&lt;p&gt;TL;DR: remove &lt;code&gt;type: post&lt;/code&gt; (if present) from the front matter.&lt;br&gt;
this should solve both the issues, as Hugo looks for &lt;code&gt;type: posts&lt;/code&gt;, and you are explicitly stating that your content is of the &amp;ldquo;section&amp;rdquo; &lt;code&gt;post&lt;/code&gt;, and not &lt;code&gt;posts&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;why?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Hugo has a clever system for organizing content and choosing layouts.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;content sections &amp;amp; types:&lt;/strong&gt; by default, Hugo determines a content file&amp;rsquo;s &amp;ldquo;section&amp;rdquo; based on its directory (e.g., files in &lt;code&gt;content/posts/&lt;/code&gt; belong to the &lt;code&gt;posts&lt;/code&gt; section). it also often infers the content &amp;ldquo;type&amp;rdquo; from the section name. your &lt;code&gt;hugo.yaml&lt;/code&gt; correctly identified the main section with &lt;code&gt;mainsections: posts&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;the conflict:&lt;/strong&gt; by explicitly setting &lt;code&gt;type: post&lt;/code&gt; (singular) in the front matter, i might have been forcing Hugo to look for a layout specifically named for the singular &lt;code&gt;post&lt;/code&gt; type (like &lt;code&gt;layouts/post/list.html&lt;/code&gt; or &lt;code&gt;themes/PaperMod/layouts/post/list.html&lt;/code&gt;).&lt;br&gt;
it seems either such a layout didn&amp;rsquo;t exist, was flawed, or the PaperMod theme expected list pages to be associated with the &lt;em&gt;plural&lt;/em&gt; section name (&lt;code&gt;posts&lt;/code&gt;) derived from the directory or &lt;code&gt;mainsections&lt;/code&gt; setting.&lt;br&gt;
removing &lt;code&gt;type: post&lt;/code&gt; allowed Hugo to correctly use the type inferred from the directory (&lt;code&gt;posts&lt;/code&gt;) and find the working default list layout (&lt;code&gt;themes/PaperMod/layouts/_default/list.html&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;the-solution&#34;&gt;the solution&lt;/h3&gt;
&lt;p&gt;if your posts are in &lt;code&gt;content/posts/&lt;/code&gt; and your &lt;code&gt;hugo.yaml&lt;/code&gt; has &lt;code&gt;mainsections: posts&lt;/code&gt;, you generally don&amp;rsquo;t need to specify &lt;code&gt;type: post&lt;/code&gt; in the front matter of individual posts. Hugo is smart enough to figure it out from the directory structure.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
