<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Markdown on Panic! At The Terminal</title>
    <link>https://blog.nousiainen.xyz/tags/markdown/</link>
    <description>Recent content in Markdown on Panic! At The Terminal</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sat, 19 Jul 2025 20:47:07 +0300</lastBuildDate>
    <atom:link href="https://blog.nousiainen.xyz/tags/markdown/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Setting Up Pre-commit Hooks</title>
      <link>https://blog.nousiainen.xyz/docs/precommit-hooks/</link>
      <pubDate>Thu, 03 Jul 2025 12:00:00 +0300</pubDate>
      <guid>https://blog.nousiainen.xyz/docs/precommit-hooks/</guid>
      <description>&lt;h1 id=&#34;setting-up-pre-commit-hooks&#34;&gt;&#xA;  Setting Up Pre-commit hooks&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#setting-up-pre-commit-hooks&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;what-are-they&#34;&gt;&#xA;  What are they?&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#what-are-they&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Pre-commit hooks are automated scripts that run before each commit, helping you catch issues early and maintain consistent code quality.&lt;/p&gt;&#xA;&lt;h2 id=&#34;steps&#34;&gt;&#xA;  Steps&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#steps&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Installing and configuring pre-commit&lt;/li&gt;&#xA;&lt;li&gt;Setting up hooks for markdown files&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;installation&#34;&gt;&#xA;  Installation&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#installation&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;First, install pre-commit using pip:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pip install pre-commit&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;configuration&#34;&gt;&#xA;  Configuration&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#configuration&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Create a &lt;code&gt;.pre-commit-config.yaml&lt;/code&gt; file in your repository root:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;repos&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  - &lt;span style=&#34;color:#f92672&#34;&gt;repo&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;https://github.com/pre-commit/pre-commit-hooks&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;rev&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;v4.4.0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;hooks&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;trailing-whitespace&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;end-of-file-fixer&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;check-yaml&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;check-added-large-files&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;check-case-conflict&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;id&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;check-merge-conflict&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;what-each-hook-does&#34;&gt;&#xA;  What Each Hook Does&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#what-each-hook-does&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;basic-hooks&#34;&gt;&#xA;  Basic Hooks&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#basic-hooks&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;trailing-whitespace&lt;/strong&gt;: Removes trailing whitespace from lines&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;end-of-file-fixer&lt;/strong&gt;: Ensures files end with a newline&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;check-yaml&lt;/strong&gt;: Validates YAML syntax&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;check-added-large-files&lt;/strong&gt;: Prevents accidentally committing large files&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;check-case-conflict&lt;/strong&gt;: Catches case conflicts that would cause issues on case-insensitive filesystems&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;check-merge-conflict&lt;/strong&gt;: Detects merge conflict markers&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;For a complete list of all available hooks, check out the &lt;a href=&#34;https://github.com/pre-commit/pre-commit-hooks&#34;&gt;pre-commit-hooks repository&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Make a New Post on Hugo</title>
      <link>https://blog.nousiainen.xyz/docs/hugo-post/</link>
      <pubDate>Tue, 25 Mar 2025 18:32:04 +0200</pubDate>
      <guid>https://blog.nousiainen.xyz/docs/hugo-post/</guid>
      <description>&lt;h1 id=&#34;creating-new-posts-in-hugo&#34;&gt;&#xA;  Creating New Posts in Hugo&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#creating-new-posts-in-hugo&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;Hugo is a fast and flexible static site generator written in Go. Creating new posts is straightforward once you understand the basic workflow. This guide is mostly for myself since I don&amp;rsquo;t always remember how the process goes.&lt;/p&gt;&#xA;&lt;h2 id=&#34;step-by-step-process&#34;&gt;&#xA;  Step-by-Step Process&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#step-by-step-process&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;1-navigate-to-your-hugo-site-directory&#34;&gt;&#xA;  1. Navigate to your Hugo site directory&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#1-navigate-to-your-hugo-site-directory&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/var/lib/snapd/void/blog&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;2-create-a-new-post-using-hugo-cli&#34;&gt;&#xA;  2. Create a new post using Hugo CLI&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#2-create-a-new-post-using-hugo-cli&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hugo new content content/docs/hugo-post.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;3-edit-the-post-content&#34;&gt;&#xA;  3. Edit the post content&#xA;  &lt;a class=&#34;anchor&#34; href=&#34;#3-edit-the-post-content&#34;&gt;#&lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;vim content/docs/hugo-post.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Edit the front matter (title, date, draft status) and add your content in Markdown.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
