<?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>Blogging on kunat.dev</title>
    <link>https://kunat.dev/tags/blogging/</link>
    <description>Recent content in Blogging on kunat.dev</description>
    <generator>Hugo -- 0.147.5</generator>
    <language>en-us</language>
    <copyright>2025 kunat.dev</copyright>
    <lastBuildDate>Mon, 29 Sep 2025 20:31:00 +0200</lastBuildDate>
    <atom:link href="https://kunat.dev/tags/blogging/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Setting Up Decap CMS with Hugo and CloudFlare Pages</title>
      <link>https://kunat.dev/notes/decap-cms-github-hugo-cloudflare-pages/</link>
      <pubDate>Mon, 29 Sep 2025 20:31:00 +0200</pubDate>
      <guid>https://kunat.dev/notes/decap-cms-github-hugo-cloudflare-pages/</guid>
      <description>&lt;p&gt;You have a website built with &lt;a href=&#34;https://gohugo.io/&#34; target=&#34;_blank&#34; &gt;Hugo&lt;/a&gt; hosted on &lt;a href=&#34;https://pages.cloudflare.com/&#34; target=&#34;_blank&#34; &gt;CloudFlare Pages&lt;/a&gt; and you want to integrate &lt;a href=&#34;https://decapcms.org/&#34; target=&#34;_blank&#34; &gt;Decap CMS&lt;/a&gt; to it? Here&amp;rsquo;s how.&lt;/p&gt;
&lt;p&gt;At the end of this article you&amp;rsquo;ll be able to add posts to your website and manage existing ones using a Decap admin panel on your website.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Your website is built using Hugo&lt;/li&gt;
&lt;li&gt;Your website is hosted using CloudFlare pages&lt;/li&gt;
&lt;li&gt;You have a GitHub account (we&amp;rsquo;ll use it for OAuth authentication)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;how&#34;&gt;How&lt;/h2&gt;
&lt;h3 id=&#34;creating-an-oauth-app-in-github&#34;&gt;Creating an OAuth App in GitHub&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;a href=&#34;https://github.com/settings/apps&#34; target=&#34;_blank&#34; &gt;Developer Settings&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;OAuth Apps&lt;/li&gt;
&lt;li&gt;New OAuth App&lt;/li&gt;
&lt;li&gt;Fill out application name, Homepage URL and Authorization callback URL as follows&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://kunat.dev/notes/images/decap-1-github-oauth.jpg&#34; title=&#34;GitHub OAuth app creation screen&#34;&gt;&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>You have a website built with <a href="https://gohugo.io/" target="_blank" >Hugo</a> hosted on <a href="https://pages.cloudflare.com/" target="_blank" >CloudFlare Pages</a> and you want to integrate <a href="https://decapcms.org/" target="_blank" >Decap CMS</a> to it? Here&rsquo;s how.</p>
<p>At the end of this article you&rsquo;ll be able to add posts to your website and manage existing ones using a Decap admin panel on your website.</p>
<h2 id="prerequisites">Prerequisites</h2>
<ul>
<li>Your website is built using Hugo</li>
<li>Your website is hosted using CloudFlare pages</li>
<li>You have a GitHub account (we&rsquo;ll use it for OAuth authentication)</li>
</ul>
<h2 id="how">How</h2>
<h3 id="creating-an-oauth-app-in-github">Creating an OAuth App in GitHub</h3>
<ol>
<li>Go to <a href="https://github.com/settings/apps" target="_blank" >Developer Settings</a></li>
<li>OAuth Apps</li>
<li>New OAuth App</li>
<li>Fill out application name, Homepage URL and Authorization callback URL as follows</li>
</ol>
<p><img loading="lazy" src="/notes/images/decap-1-github-oauth.jpg" title="GitHub OAuth app creation screen"></p>
<ol start="5">
<li>Register application</li>
<li>Generate a new client secret (we&rsquo;ll need it in a moment)</li>
</ol>
<h3 id="cloudflare">CloudFlare</h3>
<ol>
<li>Open your <a href="https://dash.cloudflare.com/" target="_blank" >CloudFlare dashboard</a></li>
<li>Compute (workers)</li>
<li>Workers and Pages</li>
<li>Select the project you want to set up your CMS for and open settings</li>
<li>Go to Variables and secrets and select Add</li>
<li>Add the following two secrets</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>GITHUB_CLIENT_SECRET: &lt;secret that you<span style="color:#e6db74">&#39;ve copied in step 6 above&gt;
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">GITHUB_CLIENT_ID: &lt;Client ID from the OAuth app you&#39;</span>ve created before&gt;
</span></span></code></pre></div><h2 id="adding-decap-to-your-site">Adding Decap to your site</h2>
<ol>
<li>Copy <code>functions</code> directory from <a href="https://github.com/SubhenduX/decap-cms-cloudflare-pages" target="_blank" >this project</a> to the root of your website</li>
<li>Copy <code>static</code> directory from <a href="https://github.com/SubhenduX/decap-cms-cloudflare-pages" target="_blank" >this project</a> to the root of your website</li>
<li>Configure <code>/static/admin/config.yml</code> so that it works for your site. Here&rsquo;s how this config file looks for this site:</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-yml" data-lang="yml"><span style="display:flex;"><span><span style="color:#f92672">backend</span>:
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">name</span>: <span style="color:#ae81ff">github</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">repo</span>: <span style="color:#ae81ff">bkunat/kunat.dev</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">branch</span>: <span style="color:#ae81ff">main</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">base_url</span>: <span style="color:#ae81ff">https://kunat.dev</span>
</span></span><span style="display:flex;"><span>  <span style="color:#f92672">auth_endpoint</span>: <span style="color:#ae81ff">/api/auth</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">media_folder</span>: <span style="color:#e6db74">&#34;content/notes/images&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">public_folder</span>: <span style="color:#e6db74">&#34;/notes/images&#34;</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">collections</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#f92672">name</span>: <span style="color:#e6db74">&#34;notes&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">label</span>: <span style="color:#e6db74">&#34;Notes&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">folder</span>: <span style="color:#e6db74">&#34;content/notes&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">create</span>: <span style="color:#66d9ef">true</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">slug</span>: <span style="color:#e6db74">&#34;{{slug}}&#34;</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">editor</span>:
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">preview</span>: <span style="color:#66d9ef">false</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">fields</span>:
</span></span><span style="display:flex;"><span>      - { <span style="color:#f92672">label</span>: <span style="color:#e6db74">&#34;Title&#34;</span><span style="color:#f92672">, name</span>: <span style="color:#e6db74">&#34;title&#34;</span><span style="color:#f92672">, widget</span>: <span style="color:#e6db74">&#34;string&#34;</span> }
</span></span><span style="display:flex;"><span>      - { <span style="color:#f92672">label</span>: <span style="color:#e6db74">&#34;Publish Date&#34;</span><span style="color:#f92672">, name</span>: <span style="color:#e6db74">&#34;date&#34;</span><span style="color:#f92672">, widget</span>: <span style="color:#e6db74">&#34;datetime&#34;</span><span style="color:#f92672">, date_format</span>: <span style="color:#e6db74">&#34;YYYY-MM-DD&#34;</span><span style="color:#f92672">, time_format</span>: <span style="color:#e6db74">&#34;HH:mm:ss&#34;</span><span style="color:#f92672">, format</span>: <span style="color:#e6db74">&#34;YYYY-MM-DDTHH:mm:ss+02:00&#34;</span> }
</span></span><span style="display:flex;"><span>      - { <span style="color:#f92672">label</span>: <span style="color:#e6db74">&#34;Draft&#34;</span><span style="color:#f92672">, name</span>: <span style="color:#e6db74">&#34;draft&#34;</span><span style="color:#f92672">, widget</span>: <span style="color:#e6db74">&#34;boolean&#34;</span><span style="color:#f92672">, default</span>: <span style="color:#66d9ef">true</span> }
</span></span><span style="display:flex;"><span>      - { <span style="color:#f92672">label</span>: <span style="color:#e6db74">&#34;Tags&#34;</span><span style="color:#f92672">, name</span>: <span style="color:#e6db74">&#34;tags&#34;</span><span style="color:#f92672">, widget</span>: <span style="color:#e6db74">&#34;list&#34;</span><span style="color:#f92672">, allow_add: true, collapsed: false, field</span>: { <span style="color:#f92672">label</span>: <span style="color:#e6db74">&#34;Tag&#34;</span><span style="color:#f92672">, name</span>: <span style="color:#e6db74">&#34;tag&#34;</span><span style="color:#f92672">, widget</span>: <span style="color:#e6db74">&#34;string&#34;</span> } }
</span></span><span style="display:flex;"><span>      - { <span style="color:#f92672">label</span>: <span style="color:#e6db74">&#34;Body&#34;</span><span style="color:#f92672">, name</span>: <span style="color:#e6db74">&#34;body&#34;</span><span style="color:#f92672">, widget</span>: <span style="color:#e6db74">&#34;markdown&#34;</span> }
</span></span></code></pre></div><ol start="4">
<li>Open <code>yoursite.com/admin</code> and log in using your GitHub account</li>
</ol>
<p><img alt="Decap login screen" loading="lazy" src="/notes/images/decap-2-login.jpg" title="Decap login screen"></p>
<h2 id="success">Success</h2>
<p>After a successful login here&rsquo;s how your site should look like:</p>
<p><img alt="Decap home screen" loading="lazy" src="/notes/images/decap-3-final.jpg" title="Decap home screen"></p>
<p>Recently a non-technical friend asked me to create a site for him. He didn&rsquo;t have any special requirements so to save time I just cloned this site. The final missing piece was adding a CMS that would allow him to easily add new content to the site.</p>
<p>I was so positively surprised by the Decap experience that I ended up adding it for myself. Till now I managed all of my content manually with git. That remains my default way to manage content, but being able to quickly add/edit posts from my iPhone or iPad is a great improvement!</p>
<h2 id="resources">Resources</h2>
<ul>
<li>⭐️ <a href="https://github.com/SubhenduX/decap-cms-cloudflare-pages" target="_blank" >GitHub - SubhenduX/decap-cms-cloudflare-pages: Oauth API to run Decap CMS on Cloudflare Pages</a></li>
<li><a href="https://decapcms.org/docs/basic-steps/" target="_blank" >Basic Steps | Decap CMS | Open-Source Content Management System</a></li>
</ul>
]]></content:encoded>
    </item>
    <item>
      <title>Creating Tag-Specific RSS Feeds in Hugo with PaperMod</title>
      <link>https://kunat.dev/notes/hugo-papermod-tag-specific-rss/</link>
      <pubDate>Tue, 30 Jan 2024 21:02:14 +0100</pubDate>
      <guid>https://kunat.dev/notes/hugo-papermod-tag-specific-rss/</guid>
      <description>&lt;p&gt;This website uses the &lt;a href=&#34;https://github.com/adityatelange/hugo-PaperMod&#34; target=&#34;_blank&#34; &gt;PaperMod&lt;/a&gt; theme for Hugo. The default setup offers a primary RSS feed for all posts at &lt;code&gt;yoursite.com/index.xml&lt;/code&gt;. However, I needed more granularity—specifically, RSS feeds for posts tagged with certain keywords.&lt;/p&gt;
&lt;p&gt;After some exploration and experimentation, I discovered that Hugo automatically generates RSS feeds for each tag. TIL! Here&amp;rsquo;s how you can access these tag-specific RSS feeds:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;iOS Tag Feed: &lt;code&gt;https://kunat.dev/tags/ios/index.xml&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Swift Tag Feed: &lt;code&gt;https://kunat.dev/tags/swift/index.xml&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Utils Tag Feed: &lt;code&gt;https://kunat.dev/tags/utils/index.xml&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <content:encoded><![CDATA[<p>This website uses the <a href="https://github.com/adityatelange/hugo-PaperMod" target="_blank" >PaperMod</a> theme for Hugo. The default setup offers a primary RSS feed for all posts at <code>yoursite.com/index.xml</code>. However, I needed more granularity—specifically, RSS feeds for posts tagged with certain keywords.</p>
<p>After some exploration and experimentation, I discovered that Hugo automatically generates RSS feeds for each tag. TIL! Here&rsquo;s how you can access these tag-specific RSS feeds:</p>
<ul>
<li>iOS Tag Feed: <code>https://kunat.dev/tags/ios/index.xml</code></li>
<li>Swift Tag Feed: <code>https://kunat.dev/tags/swift/index.xml</code></li>
<li>Utils Tag Feed: <code>https://kunat.dev/tags/utils/index.xml</code></li>
</ul>
]]></content:encoded>
    </item>
  </channel>
</rss>
