<?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>Michael Muratov</title><link>https://michaelmuratov.com/categories/web/</link><description>Recent content on Michael Muratov</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Tue, 22 Apr 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://michaelmuratov.com/categories/web/index.xml" rel="self" type="application/rss+xml"/><item><title>How this Blog Works</title><link>https://michaelmuratov.com/blog/artifacts/builds/how-this-blog-works/</link><pubDate>Tue, 22 Apr 2025 00:00:00 +0000</pubDate><guid>https://michaelmuratov.com/blog/artifacts/builds/how-this-blog-works/</guid><description>&lt;p&gt;The structure of this site is simple.&lt;/p&gt;
&lt;h3 id="hugo-static-generator"&gt;Hugo Static Generator&lt;/h3&gt;
&lt;p&gt;I use a static site generator called Hugo: &lt;a href="https://gohugo.io/getting-started/quick-start/"&gt;Hugo Quick Start&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;sudo apt install hugo
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;hugo new site michaelmuratov.com
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; michaelmuratov.com
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;hugo server
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;|&lt;/span&gt; EN
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;-------------------+-----
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; Pages &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; Paginator pages &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt; Non-page files &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt; Static files &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt; Processed images &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt; Aliases &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt; Cleaned &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;Built in &lt;span class="m"&gt;10&lt;/span&gt; ms&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The site consists of three quality of life features that would be non negotiable for this kind of project.&lt;/p&gt;</description><content:encoded><![CDATA[<p>The structure of this site is simple.</p>
<h3 id="hugo-static-generator">Hugo Static Generator</h3>
<p>I use a static site generator called Hugo: <a href="https://gohugo.io/getting-started/quick-start/">Hugo Quick Start</a></p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln"> 1</span><span class="cl">sudo apt install hugo
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">
</span></span><span class="line"><span class="ln"> 3</span><span class="cl">hugo new site michaelmuratov.com
</span></span><span class="line"><span class="ln"> 4</span><span class="cl"><span class="nb">cd</span> michaelmuratov.com
</span></span><span class="line"><span class="ln"> 5</span><span class="cl">
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">hugo server
</span></span><span class="line"><span class="ln"> 7</span><span class="cl">
</span></span><span class="line"><span class="ln"> 8</span><span class="cl">                   <span class="p">|</span> EN  
</span></span><span class="line"><span class="ln"> 9</span><span class="cl">-------------------+-----
</span></span><span class="line"><span class="ln">10</span><span class="cl">  Pages            <span class="p">|</span>  <span class="m">1</span>  
</span></span><span class="line"><span class="ln">11</span><span class="cl">  Paginator pages  <span class="p">|</span>  <span class="m">0</span>  
</span></span><span class="line"><span class="ln">12</span><span class="cl">  Non-page files   <span class="p">|</span>  <span class="m">0</span>  
</span></span><span class="line"><span class="ln">13</span><span class="cl">  Static files     <span class="p">|</span>  <span class="m">1</span>  
</span></span><span class="line"><span class="ln">14</span><span class="cl">  Processed images <span class="p">|</span>  <span class="m">0</span>  
</span></span><span class="line"><span class="ln">15</span><span class="cl">  Aliases          <span class="p">|</span>  <span class="m">0</span>  
</span></span><span class="line"><span class="ln">16</span><span class="cl">  Cleaned          <span class="p">|</span>  <span class="m">0</span>  
</span></span><span class="line"><span class="ln">17</span><span class="cl">
</span></span><span class="line"><span class="ln">18</span><span class="cl">Built in <span class="m">10</span> ms</span></span></code></pre></div>
<p>The site consists of three quality of life features that would be non negotiable for this kind of project.</p>
<ol>
<li>GIT Version Control</li>
<li>Obsidian Rich Text Editor</li>
<li>AWS CI/CD Pipeline</li>
</ol>
<h3 id="version-control">Version Control</h3>
<p>Version control is pretty important for a site like this. For one it keeps a consistent backup of my files on an external server, while giving me the freedom to modify my files offline. There are other benefits that git provides as a version control system such as reliable metrics for commit times and native CI/CD functionality for building the static site. The build at commit functionality allows me to  track only Markdown file changes, which are easy to read and edit.</p>
<p><img src="git.png" alt="image"></p>
<h3 id="text-editor">Text Editor</h3>
<p>Because most of the files on this site are written in Markdown, they can be viewed and edited in nice rich text editors like Obsidian. The integration between Obsidian and Hugo doesn&rsquo;t exist directly but I&rsquo;ve been able to port common elements such as code snippets and call outs.</p>

<div><img src="obsidian_editor.png" 
		 class="img-preset img-preset-md png">
</div>

<h3 id="aws-integration">AWS Integration</h3>
<p><img src="ci_cd.png" alt="CI/CD"></p>
<p>Learning a cloud platform like AWS has been on my priority list this year. In addition the existence of dedicated services like <strong>AWS Amplity</strong> makes it fairly cost efficient to host the website myself and monitor spending on all my cloud services through a unified interface. AWS does fall short in terms of identifying usage metrics but I&rsquo;ve augmented the website with Google Analytics tags that fills in for that gap.</p>
<p>My domain name is registered on Squarespace but I don&rsquo;t want to use them for hosting because I find their fees too expensive for my no name blog.</p>
<p>Instead I set up a Hosted Zone for my domain on Amazon&rsquo;s Route 53. Amazon will use its name servers to map my domain to their external IPs:</p>
<p><img src="aws_nameservers.png" alt="AWS Name Servers"></p>
<p>All I have to do is enter the name servers I was assigned to my Squarespace Domain Nameservers list.</p>
<p><img src="squarespace.png" alt="Square Space Name Servers"></p>
<p>This setup allows me to own my domains on Squarespace and manage them from AWS.</p>
<p>The hosting itself is defined by a direct relationship between AWS Amplify and your version control system in this case Github.</p>
<p><img src="github.png" alt="image"></p>
<p>Every time I make a commit on Github the CI/CD pipeline syncs the changes to the AWS instance and runs a prebuild command to generate the static files.</p>
<p><img src="prebuild.png" alt="image"></p>
<p>The version control, rich text editor and cloud deployment make this blog setup seamless, cost efficient and salable with minimal setup.</p>
<h3 id="theme-and-visual-system">Theme and Visual System</h3>
<p>This site started on <a href="https://github.com/maolonglong/hugo-simple/">Hugo Simple</a> and has now diverged into my own custom theme (<code>themes/muratov</code>) with project-specific layouts and styling.</p>
<p>The front page is organized into:</p>
<ul>
<li>A <strong>Latest Feature</strong> card</li>
<li>A curated <strong>Pinned</strong> section</li>
<li><strong>Explore by Track</strong> (Builds, Guides, Notes)</li>
<li><strong>Recent Activity</strong> and <strong>Recently Updated</strong></li>
<li>A dedicated <strong>Archive</strong> entry point</li>
</ul>
<p>Two status-oriented UI components near the top:</p>
<ul>
<li><strong>In Progress</strong>: the current focus and target date</li>
<li><strong>Momentum</strong>: weekly publishing/edit counts and an 8-week sparkline trend</li>
</ul>
<p>Giscus comments were added to make it easier for readers to engage with the content.</p>
<h3 id="metadata">Metadata</h3>
<p>Each post has associated metadata to inform Hugo on how to display the page and what category to group it under.</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown"><span class="line"><span class="ln"> 1</span><span class="cl">---
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">title: How this Blog Works
</span></span><span class="line"><span class="ln"> 3</span><span class="cl">date: 2025-04-22
</span></span><span class="line"><span class="ln"> 4</span><span class="cl">lastmod: 2025-04-20
</span></span><span class="line"><span class="ln"> 5</span><span class="cl">tags:
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">  <span class="k">-</span> Web
</span></span><span class="line"><span class="ln"> 7</span><span class="cl">draft: false
</span></span><span class="line"><span class="ln"> 8</span><span class="cl">image: blog_structure.png
</span></span><span class="line"><span class="ln"> 9</span><span class="cl">layout: blog-post
</span></span><span class="line"><span class="ln">10</span><span class="cl">---</span></span></code></pre></div>
<p>This format is very flexible and it lets me specify the file structure that the site will use to generate the page, directly in the Markdown file.</p>
<p>All layout files are customizable with the Hugo styling language to order page elements in unique configurations such as individual post layouts, lists of links to other posts, etc.</p>
<h3 id="analytics">Analytics</h3>
<p>To track usage on this website I made use of Google Analytics, which the most powerful set of tools for web monitoring and is completely free. Every page I want to track needs to contain the following <strong>Google Tag</strong>:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-js" data-lang="js"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="c">&lt;!--</span> <span class="nx">Google</span> <span class="nx">tag</span> <span class="p">(</span><span class="nx">gtag</span><span class="p">.</span><span class="nx">js</span><span class="p">)</span> <span class="o">--&gt;</span>
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">
</span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="o">&lt;</span><span class="nx">script</span> <span class="kr">async</span> <span class="nx">src</span><span class="o">=</span><span class="s2">&#34;https://www.googletagmanager.com/gtag/js?id=G-Y9QJ4EB3PT&#34;</span><span class="o">&gt;&lt;</span><span class="err">/script&gt;</span>
</span></span><span class="line"><span class="ln"> 4</span><span class="cl">
</span></span><span class="line"><span class="ln"> 5</span><span class="cl"><span class="o">&lt;</span><span class="nx">script</span><span class="o">&gt;</span>
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">
</span></span><span class="line"><span class="ln"> 7</span><span class="cl"><span class="nb">window</span><span class="p">.</span><span class="nx">dataLayer</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">dataLayer</span> <span class="o">||</span> <span class="p">[];</span>
</span></span><span class="line"><span class="ln"> 8</span><span class="cl">
</span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="kd">function</span> <span class="nx">gtag</span><span class="p">(){</span><span class="nx">dataLayer</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">arguments</span><span class="p">);}</span>
</span></span><span class="line"><span class="ln">10</span><span class="cl">
</span></span><span class="line"><span class="ln">11</span><span class="cl"><span class="nx">gtag</span><span class="p">(</span><span class="s1">&#39;js&#39;</span><span class="p">,</span> <span class="k">new</span> <span class="nb">Date</span><span class="p">());</span>
</span></span><span class="line"><span class="ln">12</span><span class="cl">  
</span></span><span class="line"><span class="ln">13</span><span class="cl">
</span></span><span class="line"><span class="ln">14</span><span class="cl"><span class="nx">gtag</span><span class="p">(</span><span class="s1">&#39;config&#39;</span><span class="p">,</span> <span class="s1">&#39;G-Y9QJ4EB3PT&#39;</span><span class="p">);</span>
</span></span><span class="line"><span class="ln">15</span><span class="cl">
</span></span><span class="line"><span class="ln">16</span><span class="cl"><span class="o">&lt;</span><span class="err">/script&gt;</span></span></span></code></pre></div>
<p>This tag is included in the <code>baseof.html</code> template of every single page that Hugo generates:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="ln">1</span><span class="cl">{{ partial &#34;google-analytics.html&#34; . }}</span></span></code></pre></div>
<p>Ensuring that every individual blog post and site page will feature a tag that links usage data to Google&rsquo;s server and my dashboard.</p>
<p><img src="google_analytics.png" alt="image"></p>
]]></content:encoded></item></channel></rss>