<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?xml-stylesheet href="/static/styles/feed.xsl" type="text/xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
   <title>anna-docs</title>
   <link>https://anna-docs.netlify.app/</link>
   <description>Recent content on anna-docs</description>
   <language>en-IN</language>
   <webMaster>anna</webMaster>
   <copyright>This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.</copyright>
   <lastBuildDate>Sun, 29 Mar 2026 16:54:24 +0000</lastBuildDate>
   <atom:link href="https://anna-docs.netlify.app/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Anna Documentation</title>
      <link>https://anna-docs.netlify.app/docs.html</link>
      <pubDate>Sun, 28 Apr 2024 00:00:00 +0000</pubDate>
      <author>anna</author>
      <guid>https://anna-docs.netlify.app/docs.html</guid>
      <description>&lt;h1 id=&#34;table-of-contents&#34;&gt;Table of Contents &lt;a class=&#34;anchor&#34; href=&#34;#table-of-contents&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#directory-structure&#34;&gt;Directory structure&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#description-of-the-directory-structure&#34;&gt;Description of the directory structure&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#building-layouts&#34;&gt;Building layouts&lt;/a&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#pageurl&#34;&gt;PageURL&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#elements-stored-in-deepdatamerge&#34;&gt;Elements stored in DeepDataMerge&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#layout-partials&#34;&gt;Layout Partials&lt;/a&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#how-partials-work&#34;&gt;How Partials Work&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#example-partial-structure&#34;&gt;Example Partial Structure&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#creating-and-using-partials&#34;&gt;Creating and Using Partials&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#best-practices-for-partials&#34;&gt;Best Practices for Partials&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#common-partial-patterns&#34;&gt;Common Partial Patterns&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#accessing-specific-page-data&#34;&gt;Accessing specific page data&lt;/a&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#custom-template-functions&#34;&gt;Custom template functions&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#frontmatter&#34;&gt;Frontmatter&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#important---the-frontmatter-field-cannot-be-omitted&#34;&gt;Important - The frontmatter field cannot be omitted&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#frontmatter-1&#34;&gt;Frontmatter&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#important---the-frontmatter-field-cannot-be-omitted-1&#34;&gt;Important - The frontmatter field cannot be omitted&lt;/a&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#frontmatter-examples&#34;&gt;Frontmatter Examples&lt;/a&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#basic-page-frontmatter&#34;&gt;Basic Page Frontmatter&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#draft-post&#34;&gt;Draft Post&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#custom-layout&#34;&gt;Custom Layout&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#collection-page&#34;&gt;Collection Page&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#accessing-frontmatter-in-templates&#34;&gt;Accessing Frontmatter in Templates&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#body&#34;&gt;Body&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#static-assets&#34;&gt;Static assets&lt;/a&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#images&#34;&gt;Images&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#css&#34;&gt;CSS&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#development-workflow&#34;&gt;Development Workflow&lt;/a&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#building-the-site&#34;&gt;Building the Site&lt;/a&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#basic-build&#34;&gt;Basic Build&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#using-make&#34;&gt;Using Make&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#live-reloading&#34;&gt;Live Reloading&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#file-watching&#34;&gt;File Watching&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#troubleshooting&#34;&gt;Troubleshooting&lt;/a&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#common-issues&#34;&gt;Common Issues&lt;/a&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#missing-frontmatter-error&#34;&gt;Missing Frontmatter Error&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#template-execution-errors&#34;&gt;Template Execution Errors&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#missing-layout-files&#34;&gt;Missing Layout Files&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#broken-links-in-rendered-output&#34;&gt;Broken Links in Rendered Output&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#images-not-loading&#34;&gt;Images Not Loading&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#collection-pages-not-generating&#34;&gt;Collection Pages Not Generating&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#tag-pages-not-working&#34;&gt;Tag Pages Not Working&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#site-configuration&#34;&gt;Site configuration&lt;/a&gt;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;a href=&#34;#sample-configjson&#34;&gt;Sample config.json&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;directory-structure&#34;&gt;Directory structure &lt;a class=&#34;anchor&#34; href=&#34;#directory-structure&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Anna requires the following directory structure&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;site&#xA;├── content&#xA;│   ├── docs.md&#xA;│   ├── index.md*&#xA;│   ├── sub0folder&#xA;│   │   ├── bench.md&#xA;│   │   ├── building-anna&#xA;│   │   │   ├── images&#xA;│   │   │   │   ├── bench.png&#xA;│   │   │   │   └── wizard.gif&#xA;│   │   │   ├── index.md&#xA;│   │   └── weekly-progress&#xA;│   │       ├── week-1.md&#xA;│   │       ├── week-2.md&#xA;│   │       └── week-3.md&#xA;├── layout&#xA;│   ├── collection-subpage.html*&#xA;│   ├── collections.html*&#xA;│   ├── config.json*&#xA;│   ├── page.html*&#xA;│   ├── partials&#xA;│   │   ├── head.html&#xA;│   ├── robots.txt*&#xA;│   ├── tag-subpage.html*&#xA;│   |── tags.html*&#xA;│   ├── collection-subpage.html*&#xA;│   └── collections.html*&#xA;├── public&#xA;└── static&#xA;    ├── fonts&#xA;    │   ├── VictorMono&#xA;    │   │   └── victormono_italics.ttf&#xA;    ├── scripts&#xA;    │   └── light.js&#xA;    ├── style.css&#xA;    ├── styles&#xA;       └── tokyo.css&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Files marked * are required and cannot be omitted&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;description-of-the-directory-structure&#34;&gt;Description of the directory structure &lt;a class=&#34;anchor&#34; href=&#34;#description-of-the-directory-structure&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;All of the site data, including the content, configuration and static files, are stores in site/. The rendered/ directory generated by ssg is also stored in &lt;code&gt;site/&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;The markdown content for the site is stored in &lt;code&gt;content/&lt;/code&gt;. It can contain subdirectories along with images as the folder is recursively rendered.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The contents of this dir is rendered to the root of &lt;code&gt;rendered/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Static assets such as fonts are stored in &lt;code&gt;static/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Scripts are stored in the &lt;code&gt;scripts/&lt;/code&gt; dir in &lt;code&gt;static/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;The layout of the site is configured using html files in &lt;code&gt;layout/&lt;/code&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &lt;code&gt;config.json&lt;/code&gt; file stores the configuration of the site and includes details such as the baseURL&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;collections.html&lt;/code&gt;, &lt;code&gt;collection-subpage.html&lt;/code&gt;, &lt;code&gt;tags.html&lt;/code&gt; and other necessary layouts define the structure of the various pages of the site such as &lt;code&gt;collections.html&lt;/code&gt;, &lt;code&gt;collections/[[sub-page]].html&lt;/code&gt; and other SSG generated pages&lt;/li&gt;&#xA;&lt;li&gt;Additional layouts can be created and set for various pages of the site using the &lt;code&gt;layout&lt;/code&gt; frontmatter field&lt;/li&gt;&#xA;&lt;li&gt;The layout files can be composed of smaller html files which are stored in the &lt;code&gt;partials/&lt;/code&gt; folder&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Contents in &lt;code&gt;public/&lt;/code&gt; are rendered to the root of &lt;code&gt;rendered/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;building-layouts&#34;&gt;Building layouts &lt;a class=&#34;anchor&#34; href=&#34;#building-layouts&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Each layout file can access any data from the entire ssg&lt;/li&gt;&#xA;&lt;li&gt;The &lt;code&gt;tags.html&lt;/code&gt; page can access the following data:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.DeepDataMerge}}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.PageURL}}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.TemplateData}}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.TagNames}}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;The remaining pages can access the following data&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.DeepDataMerge}}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.PageURL}}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;pageurl&#34;&gt;PageURL &lt;a class=&#34;anchor&#34; href=&#34;#pageurl&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;The &lt;code&gt;{{.PageURL}}&lt;/code&gt; is of the form &lt;code&gt;index.html&lt;/code&gt;, &lt;code&gt;collections/tech/go.html&lt;/code&gt; and so on.&lt;/p&gt;&#xA;&lt;h3 id=&#34;elements-stored-in-deepdatamerge&#34;&gt;Elements stored in &lt;code&gt;DeepDataMerge&lt;/code&gt; &lt;a class=&#34;anchor&#34; href=&#34;#elements-stored-in-deepdatamerge&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.DeepDataMerge.Collections}}&lt;/code&gt; - A map that stores the template data of the collection sub-pages for a particular collection url&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.DeepDataMerge.CollectionsMap}}&lt;/code&gt; - A map that stores a slice of templates of all pages for a particular collection url&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.DeepDataMerge.JSONIndex}}&lt;/code&gt; - Stores the JSON index generated for a particular site (primarily used for search and graphing of tags)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.DeepDataMerge.LayoutConfig}}&lt;/code&gt; - Stores the layout parsed from &lt;code&gt;config.json&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.DeepDataMerge.Templates}}&lt;/code&gt; - A map that stores the template data of all the pages of the site for the particular url(the URL is the PageURL for the speicified page)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.DeepDataMerge.Tags}}&lt;/code&gt; - A map that stores the template data of the tag sub-pages for a particular tag url&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.DeepDataMerge.TagsMap}}&lt;/code&gt; - A map that stores a slice of templates of all pages for a particular tag url&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;layout-partials&#34;&gt;Layout Partials &lt;a class=&#34;anchor&#34; href=&#34;#layout-partials&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Anna supports layout partials, which are reusable HTML template fragments stored in the &lt;code&gt;layout/partials/&lt;/code&gt; directory. Partials allow you to break down complex layouts into smaller, manageable pieces that can be shared across multiple layout files.&lt;/p&gt;&#xA;&lt;h4 id=&#34;how-partials-work&#34;&gt;How Partials Work &lt;a class=&#34;anchor&#34; href=&#34;#how-partials-work&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;p&gt;Partials use Go&#39;s template system with the &lt;code&gt;{{define}}&lt;/code&gt; and &lt;code&gt;{{template}}&lt;/code&gt; directives:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Defining a Partial&lt;/strong&gt;: Use &lt;code&gt;{{define &amp;quot;partialName&amp;quot;}}&lt;/code&gt; to define a partial template&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Including a Partial&lt;/strong&gt;: Use &lt;code&gt;{{template &amp;quot;partialName&amp;quot; .}}&lt;/code&gt; to include the partial in a layout&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Partials have access to the same data context as the main layout templates, including:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.DeepDataMerge}}&lt;/code&gt; - All site data&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.PageURL}}&lt;/code&gt; - Current page URL&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{.TemplateData}}&lt;/code&gt; - Page-specific template data&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;example-partial-structure&#34;&gt;Example Partial Structure &lt;a class=&#34;anchor&#34; href=&#34;#example-partial-structure&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;p&gt;Here&#39;s how the built-in partials are organized:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;layout/partials/&#xA;├── head.html      # HTML head section with meta tags, stylesheets, and scripts&#xA;├── header.html    # Site header with navigation and branding&#xA;├── footer.html    # Site footer with copyright and links&#xA;└── search.html    # Search modal/component&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h4 id=&#34;creating-and-using-partials&#34;&gt;Creating and Using Partials &lt;a class=&#34;anchor&#34; href=&#34;#creating-and-using-partials&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;p&gt;&lt;strong&gt;Example: Defining a partial in &lt;code&gt;head.html&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;{{define &amp;quot;head&amp;quot;}}&#xA;&amp;lt;!doctype html&amp;gt;&#xA;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&#xA;&amp;lt;head&amp;gt;&#xA;    &amp;lt;meta charset=&amp;quot;UTF-8&amp;quot; /&amp;gt;&#xA;    &amp;lt;meta name=&amp;quot;viewport&amp;quot; content=&amp;quot;width=device-width, initial-scale=1.0&amp;quot; /&amp;gt;&#xA;    &amp;lt;title&amp;gt;{{index .DeepDataMerge.Templates .PageURL | .Frontmatter.Title}}&amp;lt;/title&amp;gt;&#xA;    &amp;lt;!-- Additional head content --&amp;gt;&#xA;&amp;lt;/head&amp;gt;&#xA;{{end}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;strong&gt;Example: Using partials in a layout file (&lt;code&gt;page.html&lt;/code&gt;)&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;{{define &amp;quot;page&amp;quot;}}&#xA;{{template &amp;quot;head&amp;quot; .}}&#xA;&#xA;&amp;lt;body&amp;gt;&#xA;    {{template &amp;quot;header&amp;quot; .}}&#xA;    &#xA;    &amp;lt;main&amp;gt;&#xA;        &amp;lt;!-- Page content --&amp;gt;&#xA;        {{index .DeepDataMerge.Templates .PageURL | .Body}}&#xA;    &amp;lt;/main&amp;gt;&#xA;    &#xA;    {{template &amp;quot;footer&amp;quot; .}}&#xA;&amp;lt;/body&amp;gt;&#xA;&amp;lt;/html&amp;gt;&#xA;{{end}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h4 id=&#34;best-practices-for-partials&#34;&gt;Best Practices for Partials &lt;a class=&#34;anchor&#34; href=&#34;#best-practices-for-partials&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Naming Convention&lt;/strong&gt;: Use descriptive names that match the partial&#39;s purpose (e.g., &amp;quot;head&amp;quot;, &amp;quot;header&amp;quot;, &amp;quot;footer&amp;quot;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Data Access&lt;/strong&gt;: Always check if page data exists before accessing it:&#xA;&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;{{$PageData := index .DeepDataMerge.Templates .PageURL}}&#xA;{{if eq $PageData nil}}&#xA;{{$PageData = .TemplateData}}&#xA;{{end}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Modularity&lt;/strong&gt;: Keep partials focused on a single responsibility&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Reusability&lt;/strong&gt;: Design partials to work across different layout types&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Conditional Logic&lt;/strong&gt;: Use template conditionals to show/hide content based on page data&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h4 id=&#34;common-partial-patterns&#34;&gt;Common Partial Patterns &lt;a class=&#34;anchor&#34; href=&#34;#common-partial-patterns&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Head Section&lt;/strong&gt;: Meta tags, stylesheets, scripts, and SEO data&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Navigation&lt;/strong&gt;: Site-wide navigation menus and breadcrumbs&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Footers&lt;/strong&gt;: Copyright notices, social links, and site information&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Components&lt;/strong&gt;: Reusable UI components like search forms, modals, or sidebars&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Partials make your layouts more maintainable by separating concerns and reducing code duplication across different page types.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;accessing-specific-page-data&#34;&gt;Accessing specific page data &lt;a class=&#34;anchor&#34; href=&#34;#accessing-specific-page-data&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The URL for the current page can be accessed using &lt;code&gt;{{.PageURL}}&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;To access the data for a particular page, use Go templating syntax:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;{{$PageData := index .DeepDataMerge.Templates .PageURL}}&#xA;{{$PageData.CompleteURL}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;To access the page data for &lt;code&gt;collections.html&lt;/code&gt;, &lt;code&gt;tags.html&lt;/code&gt; and their respective partials, set&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;{{$PageData := .TemplateData}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;All of the following page data fields can be accessed in the above manner:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;{{$PageData.CompleteURL}}&lt;/code&gt; : Returns the complete url of the given page&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{$PageData.Date}}&lt;/code&gt; : Returns the last modified date of the current file&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{$PageData.Frontmatter.[Tagname]}}&lt;/code&gt; : Returns the value of the frontmatter tag&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Example: &lt;code&gt;{{$PageData.Frontmatter.Title}}&lt;/code&gt; : Returns the value of the title tag&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;{{$PageData.Body}}&lt;/code&gt; : Returns the markdown body rendered to HTML&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;custom-template-functions&#34;&gt;Custom template functions &lt;a class=&#34;anchor&#34; href=&#34;#custom-template-functions&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Anna has the following pre-defined template function:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;code&gt;func strSliceContains(items []string, search string) bool&lt;/code&gt;&#xA;This function returns true if a &lt;code&gt;search&lt;/code&gt; string is present in a slice of strings (&lt;code&gt;items&lt;/code&gt;), else returns false&lt;/p&gt;&#xA;&lt;p&gt;Usage: &lt;code&gt;{{if strSliceContains $PageData.Frontmatter.Collections &amp;quot;posts&amp;quot;}}&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;frontmatter&#34;&gt;Frontmatter &lt;a class=&#34;anchor&#34; href=&#34;#frontmatter&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Metadata such as the title of the page can be added as frontmatter to the markdown files in the YAML format.&#xA;This metadata can be accessed from the layout files with the appropriate syntax.&lt;/p&gt;&#xA;&lt;p&gt;Currently, the following frontmatter tags are supported:&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;important---the-frontmatter-field-cannot-be-omitted&#34;&gt;Important - The frontmatter field cannot be omitted &lt;a class=&#34;anchor&#34; href=&#34;#important---the-frontmatter-field-cannot-be-omitted&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;anna will throw an error if a page does not contain frontmatter or if the &lt;code&gt;title&lt;/code&gt; frontmatter field is missing&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;authors&lt;/code&gt;: Stores (multiple) author/s of a particular page&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;collections&lt;/code&gt;: Stores the collections the particular page belongs to&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;date&lt;/code&gt;: The date of the current page&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;description&lt;/code&gt;: Stores the description of the current post previewed in html layouts&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;draft&lt;/code&gt;: When set to &#39;true&#39;, the current page is not rendered unless the &#39;-d&#39; flag is used&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;layout&lt;/code&gt;: Stores the layout file (*.html) to be used to render the current page&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;previewimage&lt;/code&gt;: Stores the preview image of the current page&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;scripts&lt;/code&gt;: Stores the page-level scripts to be added&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tags&lt;/code&gt;: Stores the tags of the particular page&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;frontmatter-1&#34;&gt;Frontmatter &lt;a class=&#34;anchor&#34; href=&#34;#frontmatter-1&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Metadata such as the title of the page can be added as frontmatter to the markdown files in the YAML format.&#xA;This metadata can be accessed from the layout files with the appropriate syntax.&lt;/p&gt;&#xA;&lt;p&gt;Currently, the following frontmatter tags are supported:&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;important---the-frontmatter-field-cannot-be-omitted-1&#34;&gt;Important - The frontmatter field cannot be omitted &lt;a class=&#34;anchor&#34; href=&#34;#important---the-frontmatter-field-cannot-be-omitted-1&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;anna will throw an error if a page does not contain frontmatter or if the &lt;code&gt;title&lt;/code&gt; frontmatter field is missing&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;authors&lt;/code&gt;: Stores (multiple) author/s of a particular page&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;collections&lt;/code&gt;: Stores the collections the particular page belongs to&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;date&lt;/code&gt;: The date of the current page&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;description&lt;/code&gt;: Stores the description of the current post previewed in html layouts&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;draft&lt;/code&gt;: When set to &#39;true&#39;, the current page is not rendered unless the &#39;-d&#39; flag is used&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;layout&lt;/code&gt;: Stores the layout file (*.html) to be used to render the current page&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;previewimage&lt;/code&gt;: Stores the preview image of the current page&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;scripts&lt;/code&gt;: Stores the page-level scripts to be added&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tags&lt;/code&gt;: Stores the tags of the particular page&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;title&lt;/code&gt; : The title of the current page&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;toc&lt;/code&gt;: When set to &#39;true&#39;, a table of contents is rendered for the current page&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;frontmatter-examples&#34;&gt;Frontmatter Examples &lt;a class=&#34;anchor&#34; href=&#34;#frontmatter-examples&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;h4 id=&#34;basic-page-frontmatter&#34;&gt;Basic Page Frontmatter &lt;a class=&#34;anchor&#34; href=&#34;#basic-page-frontmatter&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-yaml&#34;&gt;---&#xA;title: &amp;quot;My Blog Post&amp;quot;&#xA;date: 2024-01-15&#xA;description: &amp;quot;A brief description of this post&amp;quot;&#xA;authors: [&amp;quot;John Doe&amp;quot;]&#xA;tags: [&amp;quot;golang&amp;quot;, &amp;quot;ssg&amp;quot;]&#xA;collections: [&amp;quot;posts&amp;quot;]&#xA;toc: true&#xA;---&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h4 id=&#34;draft-post&#34;&gt;Draft Post &lt;a class=&#34;anchor&#34; href=&#34;#draft-post&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-yaml&#34;&gt;---&#xA;title: &amp;quot;Work in Progress&amp;quot;&#xA;date: 2024-01-15&#xA;draft: true&#xA;---&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h4 id=&#34;custom-layout&#34;&gt;Custom Layout &lt;a class=&#34;anchor&#34; href=&#34;#custom-layout&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-yaml&#34;&gt;---&#xA;title: &amp;quot;Special Page&amp;quot;&#xA;layout: &amp;quot;custom-layout.html&amp;quot;&#xA;scripts: [&amp;quot;special.js&amp;quot;]&#xA;---&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h4 id=&#34;collection-page&#34;&gt;Collection Page &lt;a class=&#34;anchor&#34; href=&#34;#collection-page&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-yaml&#34;&gt;---&#xA;title: &amp;quot;Building Anna: A Static Site Generator&amp;quot;&#xA;date: 2024-01-01&#xA;collections: [&amp;quot;posts&amp;quot;, &amp;quot;anna&amp;quot;]&#xA;tags: [&amp;quot;golang&amp;quot;, &amp;quot;static-site&amp;quot;, &amp;quot;development&amp;quot;]&#xA;previewimage: &amp;quot;/static/images/anna-preview.png&amp;quot;&#xA;---&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;accessing-frontmatter-in-templates&#34;&gt;Accessing Frontmatter in Templates &lt;a class=&#34;anchor&#34; href=&#34;#accessing-frontmatter-in-templates&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Frontmatter values are accessible in layout templates through the &lt;code&gt;Frontmatter&lt;/code&gt; field:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;&amp;lt;!-- Access title --&amp;gt;&#xA;&amp;lt;h1&amp;gt;{{ $PageData.Frontmatter.Title }}&amp;lt;/h1&amp;gt;&#xA;&#xA;&amp;lt;!-- Access authors --&amp;gt;&#xA;{{range $PageData.Frontmatter.Authors}}&#xA;&amp;lt;p&amp;gt;Author: {{.}}&amp;lt;/p&amp;gt;&#xA;{{end}}&#xA;&#xA;&amp;lt;!-- Access tags --&amp;gt;&#xA;{{range $PageData.Frontmatter.Tags}}&#xA;&amp;lt;a href=&amp;quot;/tags/{{.}}.html&amp;quot;&amp;gt;{{.}}&amp;lt;/a&amp;gt;&#xA;{{end}}&#xA;&#xA;&amp;lt;!-- Conditional rendering --&amp;gt;&#xA;{{if $PageData.Frontmatter.Toc}}&#xA;&amp;lt;div class=&amp;quot;toc&amp;quot;&amp;gt;{{ $PageData.Body | toc }}&amp;lt;/div&amp;gt;&#xA;{{end}}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;body&#34;&gt;Body &lt;a class=&#34;anchor&#34; href=&#34;#body&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Anna uses &lt;a href=&#34;https://github.com/yuin/goldmark&#34;&gt;Goldmark&lt;/a&gt; to render markdown files, which is CommonMark compliant&lt;/p&gt;&#xA;&lt;p&gt;A few useful goldmark extensions have been included:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/abhinav/goldmark-anchor&#34;&gt;anchor&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;adds support for anchors next to all headers&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/mangoumbrella/goldmark-figure&#34;&gt;figure&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;parse markdown paragraphs that start with an image into HTML &lt;code&gt;&amp;lt;figure&amp;gt;&lt;/code&gt; elements&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/abhinav/goldmark-toc&#34;&gt;toc&lt;/a&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;adds support for rendering a table-of-contents&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;static-assets&#34;&gt;Static assets &lt;a class=&#34;anchor&#34; href=&#34;#static-assets&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;images&#34;&gt;Images &lt;a class=&#34;anchor&#34; href=&#34;#images&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Images can be added to the &lt;code&gt;content/&lt;/code&gt; dir, &lt;code&gt;public/&lt;/code&gt; dir or the &lt;code&gt;static/&lt;/code&gt; dir.&#xA;The contents of the &lt;code&gt;static/&lt;/code&gt; and &lt;code&gt;public/&lt;/code&gt; directories and the non-markdown files present in the &lt;code&gt;content/&lt;/code&gt; dir are copied to &lt;code&gt;rendered/&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;The images can be referenced in the markdown files via their relative or absolute paths&lt;/p&gt;&#xA;&lt;h3 id=&#34;css&#34;&gt;CSS &lt;a class=&#34;anchor&#34; href=&#34;#css&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;CSS can be added in the following ways:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;In an external file in the &lt;code&gt;static/&lt;/code&gt; directory and linked to the layout files&lt;/p&gt;&#xA;&lt;p&gt;Example: &lt;code&gt;&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;/static/style.css&amp;quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Placed inside &lt;code&gt;&amp;lt;style&amp;gt;&amp;lt;/style&amp;gt;&lt;/code&gt; tags in the &lt;code&gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/code&gt; of the layout files&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Inline with the html elements&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;development-workflow&#34;&gt;Development Workflow &lt;a class=&#34;anchor&#34; href=&#34;#development-workflow&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;building-the-site&#34;&gt;Building the Site &lt;a class=&#34;anchor&#34; href=&#34;#building-the-site&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Anna provides several ways to build and serve your site:&lt;/p&gt;&#xA;&lt;h4 id=&#34;basic-build&#34;&gt;Basic Build &lt;a class=&#34;anchor&#34; href=&#34;#basic-build&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;# Build the site once&#xA;anna&#xA;&#xA;# Build with drafts included&#xA;anna -d&#xA;&#xA;# Build and serve locally&#xA;anna -s&#xA;&#xA;# Build and serve with drafts&#xA;anna -s -d&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h4 id=&#34;using-make&#34;&gt;Using Make &lt;a class=&#34;anchor&#34; href=&#34;#using-make&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;p&gt;The included Makefile provides convenient build targets:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;# Build the site&#xA;make build&#xA;&#xA;# Clean build artifacts&#xA;make clean&#xA;&#xA;# Run tests&#xA;make tests&#xA;&#xA;# Serve the site with live reload&#xA;make serve&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;live-reloading&#34;&gt;Live Reloading &lt;a class=&#34;anchor&#34; href=&#34;#live-reloading&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;When running with the &lt;code&gt;-s&lt;/code&gt; flag, Anna includes live reload functionality:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The server watches for file changes in &lt;code&gt;content/&lt;/code&gt;, &lt;code&gt;layout/&lt;/code&gt;, and &lt;code&gt;static/&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;When changes are detected, the site is automatically rebuilt&lt;/li&gt;&#xA;&lt;li&gt;Connected browsers automatically refresh to show changes&lt;/li&gt;&#xA;&lt;li&gt;Live reload scripts are injected into pages during development&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;file-watching&#34;&gt;File Watching &lt;a class=&#34;anchor&#34; href=&#34;#file-watching&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Anna monitors the following directories for changes:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;content/&lt;/code&gt; - Markdown files and assets&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;layout/&lt;/code&gt; - HTML templates and partials&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;static/&lt;/code&gt; - Static assets (CSS, JS, images)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;site/config.json&lt;/code&gt; - Site configuration&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Changes to any files in these directories trigger a rebuild.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;troubleshooting&#34;&gt;Troubleshooting &lt;a class=&#34;anchor&#34; href=&#34;#troubleshooting&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;common-issues&#34;&gt;Common Issues &lt;a class=&#34;anchor&#34; href=&#34;#common-issues&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;h4 id=&#34;missing-frontmatter-error&#34;&gt;Missing Frontmatter Error &lt;a class=&#34;anchor&#34; href=&#34;#missing-frontmatter-error&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;pre&gt;&lt;code&gt;Error: frontmatter is required for all pages&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Ensure every &lt;code&gt;.md&lt;/code&gt; file starts with YAML frontmatter including at least a &lt;code&gt;title&lt;/code&gt; field:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-yaml&#34;&gt;---&#xA;title: &amp;quot;Page Title&amp;quot;&#xA;---&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h4 id=&#34;template-execution-errors&#34;&gt;Template Execution Errors &lt;a class=&#34;anchor&#34; href=&#34;#template-execution-errors&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;pre&gt;&lt;code&gt;template: layout/page.html:1: function &amp;quot;undefined&amp;quot; not defined&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: Check for typos in template function names. Available functions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;strSliceContains&lt;/code&gt; for checking if a string exists in a slice&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;missing-layout-files&#34;&gt;Missing Layout Files &lt;a class=&#34;anchor&#34; href=&#34;#missing-layout-files&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;pre&gt;&lt;code&gt;Error: open site/layout/page.html: no such file or directory&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Ensure required layout files exist in &lt;code&gt;site/layout/&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;page.html&lt;/code&gt; (required)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;collections.html&lt;/code&gt; (required)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tags.html&lt;/code&gt; (required)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;config.json&lt;/code&gt; (required)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;broken-links-in-rendered-output&#34;&gt;Broken Links in Rendered Output &lt;a class=&#34;anchor&#34; href=&#34;#broken-links-in-rendered-output&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Use absolute paths starting with &lt;code&gt;/&lt;/code&gt; for internal links:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;&amp;lt;a href=&amp;quot;/collections/posts.html&amp;quot;&amp;gt;Posts&amp;lt;/a&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h4 id=&#34;images-not-loading&#34;&gt;Images Not Loading &lt;a class=&#34;anchor&#34; href=&#34;#images-not-loading&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Place images in:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;site/static/&lt;/code&gt; for global assets&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;site/content/&lt;/code&gt; alongside markdown files&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;site/public/&lt;/code&gt; for root-level files&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Reference with absolute paths: &lt;code&gt;/static/images/logo.png&lt;/code&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;collection-pages-not-generating&#34;&gt;Collection Pages Not Generating &lt;a class=&#34;anchor&#34; href=&#34;#collection-pages-not-generating&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Ensure pages have &lt;code&gt;collections&lt;/code&gt; frontmatter:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-yaml&#34;&gt;collections: [&amp;quot;posts&amp;quot;, &amp;quot;articles&amp;quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h4 id=&#34;tag-pages-not-working&#34;&gt;Tag Pages Not Working &lt;a class=&#34;anchor&#34; href=&#34;#tag-pages-not-working&#34;&gt;#&lt;/a&gt;&lt;/h4&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Ensure pages have &lt;code&gt;tags&lt;/code&gt; frontmatter:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-yaml&#34;&gt;tags: [&amp;quot;golang&amp;quot;, &amp;quot;tutorial&amp;quot;]&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;site-configuration&#34;&gt;Site configuration &lt;a class=&#34;anchor&#34; href=&#34;#site-configuration&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The config.json file stores additional information regarding the layout of the site&#xA;It contains the following fields:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;navbar&lt;/code&gt;: Stores the links to be added to the navbar (same name as the markdown files)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;baseURL&lt;/code&gt;: Stores the base URL of the site&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;siteTitle&lt;/code&gt;: Stores the name of the site&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;siteScripts&lt;/code&gt;: Stores the javascript files to be included with every page&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;author&lt;/code&gt;: Stores the author of the site&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;copyright&lt;/code&gt;: Stores the copyright information of the site&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;themeURL&lt;/code&gt;: Stores the link to the common stylesheet&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;customFields&lt;/code&gt;: Stores a set of arbitrary key-value pairs as required by the user&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;collectionLayouts&lt;/code&gt;: Stores the names of the layouts to be used for a particular collection subpage&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;sample-configjson&#34;&gt;Sample &lt;code&gt;config.json&lt;/code&gt; &lt;a class=&#34;anchor&#34; href=&#34;#sample-configjson&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-json&#34;&gt;  {&#xA;    &amp;quot;navbar&amp;quot;: [&#xA;      {&#xA;        &amp;quot;Index&amp;quot;: &amp;quot;index.html&amp;quot;&#xA;      },&#xA;      {&#xA;        &amp;quot;Quick Start&amp;quot;: &amp;quot;quick-start.html&amp;quot;&#xA;      },&#xA;      {&#xA;        &amp;quot;Docs&amp;quot;: &amp;quot;docs.html&amp;quot;&#xA;      },&#xA;      {&#xA;        &amp;quot;Dev Guide&amp;quot;: &amp;quot;developer-guide.html&amp;quot;&#xA;      },&#xA;      {&#xA;        &amp;quot;Tags&amp;quot;: &amp;quot;tags.html&amp;quot;&#xA;      },&#xA;      {&#xA;        &amp;quot;Collections&amp;quot;: &amp;quot;collections.html&amp;quot;&#xA;      },&#xA;      {&#xA;        &amp;quot;Posts&amp;quot;: &amp;quot;collections/posts.html&amp;quot;&#xA;      },&#xA;      {&#xA;        &amp;quot;Anna Blog&amp;quot;: &amp;quot;posts/building-anna/index.html&amp;quot;&#xA;      }&#xA;    ],&#xA;    &amp;quot;CustomFields&amp;quot;: [&#xA;      {&#xA;        &amp;quot;Github&amp;quot;: &amp;quot;https://github.com/anna-ssg/anna&amp;quot;&#xA;      }&#xA;    ],&#xA;&#xA;&#xA;    # make sure no trailing slash com/&#xA;    &amp;quot;baseURL&amp;quot;: &amp;quot;https://example.com&amp;quot;,&#xA;&#xA;    # Replace this with the actual canonical-url of your site&#xA;    # baseURL tells search-engines (SEO), web-crawlers (robots.txt) so people can discover your site on the internet.&#xA;    # It&#39;s also embeded in your sitemap / atom feed and can be used to change metadata about your site.&#xA;&#xA;    &amp;quot;siteTitle&amp;quot;: &amp;quot;anna&amp;quot;,&#xA;    &amp;quot;siteScripts&amp;quot;: null,&#xA;    &amp;quot;author&amp;quot;: &amp;quot;Anna&amp;quot;,&#xA;    &amp;quot;themeURL&amp;quot;: &amp;quot;/static/style.css&amp;quot;,&#xA;    &amp;quot;copyright&amp;quot;: &amp;quot;This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.&amp;quot;,&#xA;&#xA;    # Here, `all-posts` is the name of the layout template to be used to render the `collection/posts.html` subpage&#xA;    &amp;quot;collectionLayouts&amp;quot;: {&#xA;        &amp;quot;collections/posts.html&amp;quot;: &amp;quot;all-posts&amp;quot;&#xA;      }&#xA;  }&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr&gt;&#xA;</description>
    </item>
    <item>
      <title>Quick Start</title>
      <link>https://anna-docs.netlify.app/quick-start.html</link>
      <pubDate>Sun, 28 Apr 2024 00:00:00 +0000</pubDate>
      <author>anna</author>
      <guid>https://anna-docs.netlify.app/quick-start.html</guid>
      <description>&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Download a prebuilt binary for your platform from the latest release:&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;macos&#34;&gt;MacOS&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;brew install anna-ssg/anna/anna&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;gnulinux-targz&#34;&gt;GNU/Linux (tar.gz):&lt;/h3&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Linux (x86_64): &lt;a href=&#34;https://github.com/anna-ssg/anna/releases/latest/download/anna_Linux_x86_64.tar.gz&#34;&gt;anna_Linux_x86_64.tar.gz&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;tar -xzf anna_Linux_x86_64.tar.gz&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;./anna&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;windows-1011-x86-64&#34;&gt;Windows 10/11 (x86_64):&lt;/h3&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Download &lt;a href=&#34;https://github.com/anna-ssg/anna/releases/latest/download/anna_Windows_x86_64.zip&#34;&gt;anna_Windows_x86_64.zip&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Unzip &lt;code&gt;anna_Windows_*.zip&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Run &lt;code&gt;anna.exe&lt;/code&gt; from the extracted folder in a terminal&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;bootstrap-create-a-site-directory&#34;&gt;Bootstrap (create a &lt;code&gt;site/&lt;/code&gt; directory)&lt;/h2&gt;&#xA;&lt;p&gt;If you don&#39;t already have a &lt;code&gt;site/&lt;/code&gt; directory, Anna can initialize one for you with a default layout.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;# will ask to download the default site layout when config is missing&#xA;./anna &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;&#xA;&lt;h3 id=&#34;basic-render&#34;&gt;Basic render&lt;/h3&gt;&#xA;&lt;p&gt;Render the site found at &lt;code&gt;site/&lt;/code&gt; (default):&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;anna&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Specify a path:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;anna -p ./site&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;serve-with-live-reload&#34;&gt;Serve with live reload&lt;/h3&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;anna -s&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h3 id=&#34;version-and-debug&#34;&gt;Version and debug&lt;/h3&gt;&#xA;&lt;p&gt;Show the version (includes embedded commit when present):&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;anna -v&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Show usage and all flags:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-sh&#34;&gt;anna -h&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;</description>
    </item>
    <item>
      <title>Developer Guide</title>
      <link>https://anna-docs.netlify.app/developer-guide.html</link>
      <pubDate>Sun, 28 Apr 2024 00:00:00 +0000</pubDate>
      <author>anna</author>
      <guid>https://anna-docs.netlify.app/developer-guide.html</guid>
      <description>&lt;p&gt;This document explains the repository layout, development commands and how to contribute.&lt;/p&gt;&#xA;&lt;h2 id=&#34;repository-layout-high-level&#34;&gt;Repository layout (high level)&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;cmd/anna&lt;/code&gt;        - CLI and server (main command)&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pkg/engine&lt;/code&gt;      - core rendering engine&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pkg/parser&lt;/code&gt;      - markdown parsing and helpers&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;site/&lt;/code&gt;           - example site used for docs and dogfooding&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;test/&lt;/code&gt;           - integration and expected output for tests&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;build--run&#34;&gt;Build &amp;amp; run&lt;/h2&gt;&#xA;&lt;p&gt;Build locally:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;go build ./...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Run the CLI directly during development:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;go run github.com/anna-ssg/anna/v3 -p ./site -s&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Run only unit tests:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;go test ./pkg/...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Run all tests and race detector:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;go test ./... -v -race&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;benchmarks--profiling&#34;&gt;Benchmarks &amp;amp; profiling&lt;/h2&gt;&#xA;&lt;p&gt;Run benchmarks and generate pprof data using the Makefile:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;make bench&#xA;# results and pprof files are in the profiles/ or test output directories&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;While serving you can view pprof endpoints at &lt;code&gt;http://localhost:8000/debug/pprof&lt;/code&gt; (see &lt;code&gt;cmd/anna&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;h2 id=&#34;makefile-targets&#34;&gt;Makefile targets&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code&gt;Targets:&#xA;  build  : Build anna and render the site&#xA;  serve  : Build anna, render and serve the site with live reload&#xA;  tests  : Run all tests&#xA;  bench  : Run the benchmark and generate pprof files&#xA;  clean  : Remove the rendered site directory and test output&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;contribution-workflow&#34;&gt;Contribution workflow&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Fork the repository and create a feature branch (eg. &lt;code&gt;feature/foo&lt;/code&gt;).&lt;/li&gt;&#xA;&lt;li&gt;Write code, run &lt;code&gt;go fmt ./...&lt;/code&gt; and add/update tests.&lt;/li&gt;&#xA;&lt;li&gt;Run &lt;code&gt;go test ./... -v&lt;/code&gt; and verify all tests pass.&lt;/li&gt;&#xA;&lt;li&gt;Push your branch and open a Pull Request with a clear description and changelog.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;development-tips&#34;&gt;Development tips&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Use &lt;code&gt;go vet&lt;/code&gt; and &lt;code&gt;go test -race&lt;/code&gt; while developing for correctness.&lt;/li&gt;&#xA;&lt;li&gt;Keep changes small and isolated; add tests for new behavior.&lt;/li&gt;&#xA;&lt;li&gt;Update &lt;code&gt;site/&lt;/code&gt; when adding features that affect rendering or layouts so the docs can dogfood changes.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;</description>
    </item>
    <item>
      <title>Building anna</title>
      <link>https://anna-docs.netlify.app/posts/building-anna/index.html</link>
      <pubDate>Thu, 04 Apr 2024 00:00:00 +0000</pubDate>
      <author>anna</author>
      <guid>https://anna-docs.netlify.app/posts/building-anna/index.html</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;This post is WIP(work-in-progress) and has been authored by &lt;a href=&#34;https://github.com/DedLad&#34;&gt;Adhesh&lt;/a&gt;, &lt;a href=&#34;https://github.com/bwaklog&#34;&gt;Aditya&lt;/a&gt;, &lt;a href=&#34;https://github.com/polarhive&#34;&gt;Nathan&lt;/a&gt; and &lt;a href=&#34;https://github.com/anirudhsudhir&#34;&gt;Anirudh&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;There are several amazing static site generators(SSG) out there, like &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt; and&#xA;&lt;a href=&#34;https://www.11ty.dev/&#34;&gt;11ty&lt;/a&gt;. Building your own SSG is an amazing learning&#xA;experience. It also motivates one to maintain and improve their personal site.&lt;/p&gt;&#xA;&lt;p&gt;Building personal blogs from the ground up can be a &lt;em&gt;tedious process&lt;/em&gt;. Some of us&#xA;have had our hands deep in vanilla HTML and CSS, which isn&#39;t fun to maintain. We&#xA;all want to get to the point and share our thoughts on the web. But, there is a&#xA;small hurdle that stops us from doing so.&lt;/p&gt;&#xA;&lt;p&gt;Maintaining your personal site is like working with your own Neovim&#xA;configuration. Every issue fixed would lead to an entirely unrelated bug. There&#xA;is a lot of time spent fixing things rather than getting productive work done.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;A static site generator is an immensely useful application&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;figure&gt;&#xA;&lt;img src=&#34;images/lighthouse.png&#34; alt=&#34;Lighthouse scores of the anna-docs page&#34;&gt;&#xA;&lt;figcaption&gt;&lt;p&gt;Lighthouse scores of the anna-docs page&lt;/p&gt;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;It can simplify the whole process: allowing you to spend time and energy&#xA;on quality content. Keep reading to find out how we designed anna.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;introduction&#34;&gt;Introduction&lt;/h2&gt;&#xA;&lt;p&gt;ACM-PESU ECC conducts the ACM Industrial Experience Program (AIEP), an annual program that spans six weeks.&lt;/p&gt;&#xA;&lt;p&gt;It involves students working as a team to develop an industrial-level project.&#xA;AIEP intends to give students hands-on experience with real-world projects.&#xA;It is an excellent opportunity to interact with like-minded individuals.&lt;/p&gt;&#xA;&lt;p&gt;Our AIEP team consisted of &lt;a href=&#34;https://github.com/DedLad&#34;&gt;Adhesh&lt;/a&gt;, &lt;a href=&#34;https://github.com/bwaklog&#34;&gt;Aditya&lt;/a&gt;,&#xA;&lt;a href=&#34;https://github.com/polarhive&#34;&gt;Nathan&lt;/a&gt;, and &lt;a href=&#34;https://github.com/anirudhsudhir&#34;&gt;Anirudh&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Our mentors (cool senior names!) gave us some great ideas for our team of four freshers.&#xA;We were puzzled whether to build a distributed Postgres clone or a load balancer.&lt;/p&gt;&#xA;&lt;p&gt;Deep discussions over a week got us to the topic of making blog sites and how tiring it is to work with, which only gets worse as you&#xA;write more and more content for your internethome.&lt;/p&gt;&#xA;&lt;p&gt;This and inspirations from &lt;a href=&#34;https://github.com/anirudhRowjee/saaru&#34;&gt;Saaru&lt;/a&gt; and &lt;a href=&#34;https://github.com/NavinShrinivas/sapling&#34;&gt;Sapling&lt;/a&gt; pushed us to tackle this problem with our own SSG.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;    ___&#xA;   /   |  ____  ____  ____ _&#xA;  / /| | / __ \/ __ \/ __ `/&#xA; / ___ |/ / / / / / / /_/ /&#xA;/_/  |_/_/ /_/_/ /_/\__,_/&#xA;&#xA;A static site generator in Go&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;the-small-but-big-decision&#34;&gt;The small but big decision&lt;/h2&gt;&#xA;&lt;p&gt;Anna is written in &lt;a href=&#34;https://go.dev&#34;&gt;Go&lt;/a&gt;.&#xA;We considered writing it in Rust, but it came with a steep learning curve.&#xA;Go is a powerful language and has excellent concurrency support, which suited our requirements to build a performant application.&lt;/p&gt;&#xA;&lt;h3 id=&#34;whats-in-a-name&#34;&gt;What&#39;s in a name?&lt;/h3&gt;&#xA;&lt;p&gt;Probably the first thing that the four of us came across when joining ACM and HSP was the famous &lt;a href=&#34;https://github.com/anirudhRowjee/saaru&#34;&gt;Saaru&lt;/a&gt; repository, one of the projects that inspired our ssg.&#xA;Saaru is a thin lentil soup, usually served with rice and is a &lt;a href=&#34;https://en.wikipedia.org/wiki/Kannada&#34;&gt;Kannada&lt;/a&gt; word.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;In Kannada, rice is referred to as &#39;anna&#39; (ಅನ್ನ) pronounced &lt;i&gt;/ɐnːɐ/&lt;/i&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This was just a playful stunt that we engaged in.&#xA;We planned on beating Saaru at site render times, optimizing at runtime.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;genesis&#34;&gt;Genesis&lt;/h2&gt;&#xA;&lt;p&gt;We began the project in a unique manner, with each of us creating our own prototype of the SSG.&#xA;This was done to familiarize everyone with the Go toolchain.&lt;/p&gt;&#xA;&lt;p&gt;The first version of the SSG did just three things.&#xA;It rendered markdown (stored in files in a content folder in the project directory) to HTML.&#xA;This HTML was injected into a layout.html file and served over a local web server.&#xA;Later, we implemented a front matter YAML parser to retrieve page metadata&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;what-made-us-develop-this-to-a-great-extent&#34;&gt;What made us develop this to a great extent?&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Beginner-friendly: An easy setup wizard, ready to use layouts, and themes.&#xA;We wanted the process of typing out a blog and putting it up on your site to be short and simple.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Speed: Render sites in a flash (hugo – written in Go, is remarkably fast)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Maintainable: This ssg would be used by us, hence it should be easy to fix bugs and add new features&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Learning curve: None of us had really shipped a production-ready application.&#xA;Since AIEP is all about making industry-ready projects, we chose to use Go: so we could spend more &lt;strong&gt;writing&lt;/strong&gt; code&#xA;and not worrying about our toolchain or escaping dependency hell.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Owning a piece of the internet: Aditya and Anirudh registered their own domain names.&#xA;Now their anna sites live on &lt;a href=&#34;https://hegde.live&#34;&gt;hegde.live&lt;/a&gt; and &lt;a href=&#34;https://sudhir.live&#34;&gt;sudhir.live&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;benchmarks-can-anna-lift&#34;&gt;Benchmarks! Can anna lift??&lt;/h2&gt;&#xA;&lt;p&gt;In simple terms, to beat Saaru&#39;s render time (P.S. we did beat the initial version!).&#xA;Something you probably never notice while deploying, but it is what pushed us to spend hours on this.&lt;/p&gt;&#xA;&lt;p&gt;Adhesh was pretty excited to pick up Go and implement profiling, shaving&#xA;milliseconds off build times, when he implemented parallel rendering using goroutines.&lt;/p&gt;&#xA;&lt;h3 id=&#34;we-cook-&#34;&gt;We cook! 🍳&lt;/h3&gt;&#xA;&lt;p&gt;Here are some images that demonstrate build times, profiling et-al when having thousands of markdown files or in this case&#xA;just copy-pasting a single markdown file en-mass!&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;img src=&#34;images/bench.png&#34; alt=&#34;Hyperfine benchmarks comparing the render times of anna, Saaru and 11ty&#34;&gt;&#xA;&lt;figcaption&gt;&lt;p&gt;Hyperfine benchmarks comparing the render times of anna, Saaru and 11ty&lt;/p&gt;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;2 weeks into the project, we had a PR bringing parallel rendering and profiling to the table&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;profiling&#34;&gt;Profiling&lt;/h2&gt;&#xA;&lt;p&gt;For those who love to get technical, anna has a profiling flag and a debug endpoint(available during live reload).&#xA;This flag prints the profile data of the rendering process to stdout.&#xA;The debug endpoint displays the data for site render in the live reload mode, which can be visualised by navigating to the specified pprof endpoint&lt;/p&gt;&#xA;&lt;!-- Here&#39;s the CPU profile generated while rendering this site.&#xA;This is an SVG showing how much time each function call takes, the number of times it ran in a given test sample and various other useful information.&#xA;&#xA;![CPU profile of an anna render generated using pprof](images/cpu_prof.svg)&#xA;&#xA;You may wanna zoom-in about 3-4x times to get to see how our ssg works --&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;live-reload&#34;&gt;Live Reload&lt;/h2&gt;&#xA;&lt;p&gt;anna can be run in a serve mode which serves the rendered site over localhost.&#xA;It also includes live reload, which performs a re-render of the site for every change made to the markdown content.&#xA;It also injects a script which auto-refreshes the browser on a site re-render.&lt;/p&gt;&#xA;&lt;h3 id=&#34;initial-version&#34;&gt;Initial version&lt;/h3&gt;&#xA;&lt;p&gt;The initial version consisted of a multi-goroutine system.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;A new goroutine would be spawned to walk the required content directories.&#xA;If the current path being walked was a file, the path would be passed to another function along with its current modification time.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The previous mod time of the file would then be retrieved from a map holding the mod times of all the files:&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If the given file was freshly created, its modification time would be added to the map.&lt;/li&gt;&#xA;&lt;li&gt;If there was no change in the mod time, no changes would be made.&lt;/li&gt;&#xA;&lt;li&gt;If there was a change between the current and previous mod times, a re-render of the site would be performed.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The site re-render function checks if a child process is running:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;For the first render, when a process has not been created, a new process is created that runs anna (&amp;quot;go run main.go --serve&amp;quot;)&lt;/li&gt;&#xA;&lt;li&gt;For successive renders, the existing process is killed and a new process is spawned once again that runs the application.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This prototype was not very efficient as it created and killed processes for every change.&#xA;It had multiple goroutines attempting to walk the directories at the same time, which also required multiple mutual exclusion locks to prevent data races.&#xA;This was designed as a standalone component and integrating this proved to be challenging.&lt;/p&gt;&#xA;&lt;h3 id=&#34;improvements&#34;&gt;Improvements&lt;/h3&gt;&#xA;&lt;p&gt;The updated version of live reload utilised two goroutines.&lt;/p&gt;&#xA;&lt;p&gt;The main goroutine used the initial file walker, with one important change: it sequentially traversed the directory without spawning new goroutines.&#xA;For any modification to a file in the current traversal, a vanilla render of the entire site would be performed.&#xA;The goroutine would then sleep for a specified duration (currently 1 second) before attempting the next directory traversal.&lt;/p&gt;&#xA;&lt;p&gt;The secondary goroutine ran a local web server that served the rendered/ directory.&lt;/p&gt;&#xA;&lt;p&gt;This eliminated all locks and avoided the creation and destruction of child processes.&lt;/p&gt;&#xA;&lt;h3 id=&#34;browser-reload-wip&#34;&gt;Browser reload (WIP)&lt;/h3&gt;&#xA;&lt;p&gt;When anna performs a re-render of the site, the browser is automatically refreshed to reflect the latest changes.&#xA;This involved utilising server-sent events(SSE).&#xA;A script was injected into all pages that polled a particular port.&#xA;On receiving an event sent by anna during the re-render, the script would reload the page.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;(The following content is WIP)&lt;/p&gt;&#xA;&lt;h2 id=&#34;a-big-rewrite-when-we-went-for-a-tdd-approach&#34;&gt;A big rewrite (when we went for a TDD approach)&lt;/h2&gt;&#xA;&lt;p&gt;Starting off this project, we kept adding functionality without optimization.&#xA;We did not have a proper structure; PRs would keep breaking features and overwriting functions written by team-mates.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;We dived into the codebase to rebuild the application following a TDD-approach.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;a-new-proposed-rendering-system&#34;&gt;A new proposed rendering system&lt;/h3&gt;&#xA;&lt;h4 id=&#34;maingo&#34;&gt;main.go&lt;/h4&gt;&#xA;&lt;p&gt;Firstly, we refactored main.go to only handle flags.&#xA;The rest of the program logic was moved to other packages.&#xA;A benchmark for main.go was also written to time the entire application.&lt;/p&gt;&#xA;&lt;h4 id=&#34;pkg-modules&#34;&gt;pkg/ modules&lt;/h4&gt;&#xA;&lt;p&gt;Modules previously part of &lt;code&gt;cmd/anna/utils.go&lt;/code&gt; and &lt;code&gt;cmd/anna/main.go&lt;/code&gt; were to be split between &lt;code&gt;pkg/parsers/&lt;/code&gt;, &lt;code&gt;pkg/engine/&lt;/code&gt; and &lt;code&gt;pkg/helper&lt;/code&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;pkg&#xA;├─── helpers&#xA;│   ├─── helpers.go&#xA;│   └─── helper_test.go&#xA;├─── engine&#xA;│   ├─── anna_engine.go&#xA;│   ├─── anna_engine_test.go&#xA;│   ├─── engine.go&#xA;│   ├─── engine_test.go&#xA;│   ├─── user_engine.go&#xA;│   ├─── user_engine_test.go&#xA;│   └─── engine_integration_test.go&#xA;└─── parsers&#xA; ├── parser.go&#xA; ├── parser_test.go&#xA; └── parser_integration_test.go&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Wrote unit and integration tests for the parser and engine package&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h4 id=&#34;splitting-the-render-pipeline&#34;&gt;Splitting the render pipeline&lt;/h4&gt;&#xA;&lt;p&gt;Currently, there are three kinds of files that have to be rendered.&#xA;One set includes user-defined files such as &lt;code&gt;index.md&lt;/code&gt;, &lt;code&gt;docs.md&lt;/code&gt; and various posts. These are specific to a user.&lt;/p&gt;&#xA;&lt;p&gt;The second set of files that are rendered include &lt;code&gt;tags.html&lt;/code&gt; and &lt;code&gt;posts.html&lt;/code&gt;, which are present on every site rendered by anna.&lt;/p&gt;&#xA;&lt;p&gt;The third set of files included the tag-sub pages.&#xA;For every tag, there would be a corresponding sub-page containing all of the posts with the same tag.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Split the rendering system to make parallelisation easier by switching to a three method system.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Render &amp;quot;user defined&amp;quot; pages which include all markdown files and posts (This method has been parallelised, Render tags and tag-sub pages separately, which could be parallelised in the future&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;useful-features&#34;&gt;Useful features&lt;/h2&gt;&#xA;&lt;h3 id=&#34;tags&#34;&gt;Tags&lt;/h3&gt;&#xA;&lt;p&gt;You can tag posts by hand, at the start of each markdown file and you get a&#xA;nice sub-page on your site so readers can discover similar content or browser&#xA;by category.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Organizing posts into collections based on tags&lt;/li&gt;&#xA;&lt;li&gt;Reverse search for posts of a certain category&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;to-search-or-not-to-search-&#34;&gt;To search or not to search? 🤔&lt;/h3&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;That is the question &amp;gt; Is our &lt;em&gt;static site&lt;/em&gt; becoming dynamic and at what cost?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;We were wondering if we’d need a search function on our site since Google and&#xA;any other web-crawler index our site anyway.&#xA;If we needed to implement it, we had a constraint: do not use an API.&#xA;It had to be static and local to be user-friendly to work with.&#xA;We implemented a JSON index generator that uses &amp;quot;Deep Data Merge&amp;quot; to index posts on our site.&lt;/p&gt;&#xA;&lt;p&gt;This index is generated during the site render and functions without any lag or noticeable delay when searching across posts.&#xA;We mean to re-write it using WASM if necessary.&lt;/p&gt;&#xA;&lt;p&gt;Here&#39;s a gif demonstrating search&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;img src=&#34;images/search.gif&#34; alt=&#34;Demonstration of the search feature in anna&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&lt;h3 id=&#34;js-integration-as-plugins&#34;&gt;JS integration as plugins&lt;/h3&gt;&#xA;&lt;p&gt;We added a field to the frontmatter which lets you pick and add certain JS&#xA;based snippets to your site.&#xA;This way, you get to add &lt;code&gt;highlight.js&lt;/code&gt; support, analytics scripts and donation page widgets; that you can source from the &lt;code&gt;static/scripts&lt;/code&gt; folder and toggle as needed per-markdown page.&lt;/p&gt;&#xA;&lt;h3 id=&#34;wizard&#34;&gt;Wizard&lt;/h3&gt;&#xA;&lt;p&gt;An important ease-of-use feature was a GUI; a web-based wizard that let&#39;s a new user&#xA;setup anna along with a couple of easter eggs along the way 🍚&lt;/p&gt;&#xA;&lt;p&gt;The wizard lets a user pick a theme, enter your name, pick navbar elements, and&#xA;validates fields using regex checks so you don’t need to worry about relative&#xA;paths in baseURLs, canonical links, and sitemaps. After successfully completing&#xA;the setup, the wizard launches a live preview of your site in a new tab.&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;img src=&#34;images/wizard.gif&#34; alt=&#34;Demonstration of the GUI wizard in anna&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&lt;h3 id=&#34;raw-html&#34;&gt;Raw HTML&lt;/h3&gt;&#xA;&lt;p&gt;What if you&#39;d want to add a contact form to your site? or embed YouTube videos or iframes of your choosing?&lt;/p&gt;&#xA;&lt;p&gt;Anna let&#39;s us do that! Although, the point of a static site generator is to&#xA;quickly get to writing and focusing on the content.&#xA;You can still embed js elements and iframe as needed to showcase any interesting YouTube videos or to just rickroll people!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;changelog-showcasing-important-additions-which-are-yet-to-be-added-to-this-blog&#34;&gt;changelog: showcasing important additions, which are yet to be added to this blog&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Deep Data Merge&lt;/li&gt;&#xA;&lt;li&gt;Style feed.xml&lt;/li&gt;&#xA;&lt;li&gt;Site bootstrapping&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;next-steps&#34;&gt;Next steps&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Wizard theme repo&lt;/li&gt;&#xA;&lt;li&gt;Performance: Explore memory-mapping, etc&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;feedback--learnings&#34;&gt;Feedback? / Learnings&lt;/h2&gt;&#xA;&lt;p&gt;We have a lot of things in store and bugs to squash!&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Feel free to ask any questions / send feature requests you&#39;d like to see?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This blog post misses out of many not-so well documented features and learnings that&#xA;we got during midnight calls and the patches we kept sending each other fixing trivial but&#xA;interesting issues.&#xA;Have a look at our &lt;a href=&#34;https://github.com/anna-ssg/anna/issues&#34;&gt;GitHub&lt;/a&gt;, for more&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;Today, we use &lt;a href=&#34;https://github.com/anna-ssg/anna/releases/latest&#34;&gt;anna&lt;/a&gt; on our personal sites:&#xA;&lt;a href=&#34;https://hegde.live&#34;&gt;hegde.live&lt;/a&gt; // &lt;a href=&#34;https://sudhir.live&#34;&gt;sudhir.live&lt;/a&gt; // &lt;a href=&#34;https://polarhive.net&#34;&gt;polarhive.net&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;01100001 01101110 01101110 01100001&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Week-3 Progress</title>
      <link>https://anna-docs.netlify.app/posts/weekly-progress/week-3.html</link>
      <pubDate>Mon, 01 Apr 2024 00:00:00 +0000</pubDate>
      <author>anna</author>
      <guid>https://anna-docs.netlify.app/posts/weekly-progress/week-3.html</guid>
      <description>&lt;h1 id=&#34;week-3&#34;&gt;Week-3&lt;/h1&gt;&#xA;&lt;h1 id=&#34;anirudh-and-hegdes-progress&#34;&gt;Anirudh and Hegde&#39;s Progress&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Split methods previously part of &lt;code&gt;anna&lt;/code&gt; package among &lt;code&gt;parser&lt;/code&gt;, &lt;code&gt;engine&lt;/code&gt; and &lt;code&gt;helpers&lt;/code&gt; packages&lt;/li&gt;&#xA;&lt;li&gt;Refactored &lt;code&gt;main.go&lt;/code&gt; to only handle flags&lt;/li&gt;&#xA;&lt;li&gt;Wrote unit and integration tests for the &lt;code&gt;parser&lt;/code&gt; and &lt;code&gt;engine&lt;/code&gt; package&lt;/li&gt;&#xA;&lt;li&gt;Split the rendering system to make parallelisation easier by switching to a three method system.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Render &amp;quot;anna specific&amp;quot; pages such as sitemap and feed&lt;/li&gt;&#xA;&lt;li&gt;Render &amp;quot;user defined&amp;quot; pages which include all markdown files and posts (This method has been parallelised)&lt;/li&gt;&#xA;&lt;li&gt;Render tags and tag-subpages separately, which could be parallelised in the future&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Wrote a benchmark for &lt;code&gt;main.go&lt;/code&gt; that times the entire application&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;whats-next-anirudh-and-hegde&#34;&gt;Whats Next (Anirudh and Hegde):&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Improve test coverage for the &lt;code&gt;engine&lt;/code&gt; package&lt;/li&gt;&#xA;&lt;li&gt;Write unit and integration tests for the &lt;code&gt;cmd&lt;/code&gt; and &lt;code&gt;helper&lt;/code&gt; packages&lt;/li&gt;&#xA;&lt;li&gt;Write unit and integration tests for &lt;code&gt;main.go&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;adheshs-progress&#34;&gt;Adhesh’s Progress&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Re-implemented cobra CLI for the restructed codebase.&lt;/li&gt;&#xA;&lt;li&gt;Re-implemented Parallel rendering pipelines for redering tags and content files separately.&lt;/li&gt;&#xA;&lt;li&gt;Improved profiling.&lt;/li&gt;&#xA;&lt;li&gt;Refactored code to improve performance.&lt;/li&gt;&#xA;&lt;li&gt;Worked on content indexing.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;whats-next&#34;&gt;What&#39;s next?&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Implement content indexing and site wide content search.&lt;/li&gt;&#xA;&lt;li&gt;Improve existing GUI:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Add project directory browser.&lt;/li&gt;&#xA;&lt;li&gt;Add Theme browser.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Implement new flags to provide refined control on resource management.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;-c / --concurrency to set limit on number of goroutines.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Implement integration with hosting services to auto host project.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;nathans-progress&#34;&gt;Nathan’s Progress&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Implemented an interactive web based wizard to help a user bootstrap their anna site&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The intial build wrote the json blob to disk; now it passes it as a POST request to the webserver itself over port &lt;code&gt;8080&lt;/code&gt; (may conflict)&lt;/li&gt;&#xA;&lt;li&gt;So far it lets you pick a fill metadata, pick a theme and preview your site&lt;/li&gt;&#xA;&lt;li&gt;It auto validates fields using regex as you proceed&lt;/li&gt;&#xA;&lt;li&gt;Also: an animated progressbar and other easter-eggs (confetti??)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;whats-next-1&#34;&gt;What&#39;s next?&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Improve UX by dogfooding and collecting feedback from new users&lt;/li&gt;&#xA;&lt;li&gt;Theme triaging and cataloging (basic hugo compatability)&lt;/li&gt;&#xA;&lt;li&gt;Bootstrap &lt;code&gt;site&lt;/code&gt; dir, if the user didn&#39;t already have one, using &lt;code&gt;go-git&lt;/code&gt; and add basic git-submodule support for themes&lt;/li&gt;&#xA;&lt;li&gt;Implement go best practices: (auto generate docs, tag releases and known bugs)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;</description>
    </item>
    <item>
      <title>Week-2 Progress</title>
      <link>https://anna-docs.netlify.app/posts/weekly-progress/week-2.html</link>
      <pubDate>Mon, 25 Mar 2024 00:00:00 +0000</pubDate>
      <author>anna</author>
      <guid>https://anna-docs.netlify.app/posts/weekly-progress/week-2.html</guid>
      <description>&lt;h1 id=&#34;week-2&#34;&gt;Week-2&lt;/h1&gt;&#xA;&lt;h1 id=&#34;anirudhs-progress&#34;&gt;Anirudh’s Progress&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Restructured the project&lt;/li&gt;&#xA;&lt;li&gt;Improved and integrated the live reload functionality into the ssg&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Switched to a two goroutine system&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The main goroutine runs the application and renders pages&lt;/li&gt;&#xA;&lt;li&gt;The second goroutine runs the local web server&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Eliminated locks and restarting of application on file modification&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Implemented the tagging system&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Added functionality to tag posts into collections&lt;/li&gt;&#xA;&lt;li&gt;Reverse search for posts of a particular category&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;hegdes-progress&#34;&gt;Hegde’s Progress&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Implemented chronological feed for posts&lt;/li&gt;&#xA;&lt;li&gt;Added ssg flag and frontmatter field to allow working with draft posts. Changed page rendering process to prevent rendering of unnecessary posts.&lt;/li&gt;&#xA;&lt;li&gt;Added options in frontmatter and config.yml to integrate javascript based plugins (eg: light mode, code highliting, etc). Users can have seprate plugin options per post.&lt;/li&gt;&#xA;&lt;li&gt;Fixed iframe, video and image rendering (CSS)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;whats-next-anirudh-and-hegde&#34;&gt;Whats Next (Anirudh and Hegde):&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Rebuild the project from ground up and split up the rendering process and Generator struct&lt;/li&gt;&#xA;&lt;li&gt;Follow a TDD-based approach during the rebuild&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;adheshs-progress&#34;&gt;Adhesh’s Progress&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Implemented parallel rendering pipelines.&lt;/li&gt;&#xA;&lt;li&gt;Improved parallel rendering and calculation of concurrency factor.&lt;/li&gt;&#xA;&lt;li&gt;Cleaned and refactored code to improvise performance.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;whats-next&#34;&gt;What&#39;s next?&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Split Parallel rendering pipelines for tags and content files.&lt;/li&gt;&#xA;&lt;li&gt;Implement work-stealing.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;nathans-progress&#34;&gt;Nathan’s Progress&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;chore/build: Build and deploy anna using Netlify &lt;a href=&#34;https://github.com/anna-ssg/anna/pull/48&#34;&gt;#11, #48&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;chore/build: switch to Makefile &lt;a href=&#34;https://github.com/anna-ssg/anna/pull/49&#34;&gt;#49&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;whats-next-1&#34;&gt;What&#39;s next?&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Implement a gui/wizard to configure the &lt;code&gt;config.yml&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;</description>
    </item>
    <item>
      <title>Week-1 Progress</title>
      <link>https://anna-docs.netlify.app/posts/weekly-progress/week-1.html</link>
      <pubDate>Mon, 18 Mar 2024 00:00:00 +0000</pubDate>
      <author>anna</author>
      <guid>https://anna-docs.netlify.app/posts/weekly-progress/week-1.html</guid>
      <description>&lt;h1 id=&#34;week-1&#34;&gt;Week-1&lt;/h1&gt;&#xA;&lt;h1 id=&#34;anirudhs-progress&#34;&gt;Anirudh’s Progress&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Built the markdown to HTML renderer using the &lt;a href=&#34;https://github.com/yuin/goldmark&#34;&gt;Goldmark&lt;/a&gt; library&lt;/li&gt;&#xA;&lt;li&gt;Set up a web server to preview the rendered content locally&lt;/li&gt;&#xA;&lt;li&gt;Implemented a front matter YAML parser to retrieve page metadata&lt;/li&gt;&#xA;&lt;li&gt;Designed a reusable system of partials to build page layouts&lt;/li&gt;&#xA;&lt;li&gt;Implemented a recursive renderer for the content/ and static/ directories&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;whats-next&#34;&gt;What&#39;s next?&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Restructure the project&lt;/li&gt;&#xA;&lt;li&gt;Refactor and improve the live reload functionality&lt;/li&gt;&#xA;&lt;li&gt;Implement the post tagging system&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;adheshs-progress&#34;&gt;Adhesh’s Progress&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Migrated to &lt;a href=&#34;https://cobra.dev&#34;&gt;Cobra&lt;/a&gt; for better &lt;strong&gt;CLI integration&lt;/strong&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Implemented important flags for serving a local &lt;strong&gt;HTTP server&lt;/strong&gt; (---serve), and to explicitly mention the &lt;strong&gt;port&lt;/strong&gt; to use (---addr).&lt;/li&gt;&#xA;&lt;li&gt;Implemented &lt;strong&gt;Real-Time Directory/File change&lt;/strong&gt; watcher using &lt;a href=&#34;https://pkg.go.dev/github.com/fsnotify/fsnotify&#34;&gt;fsnotify&lt;/a&gt;, and Hot-Reload system for reserving updated files instantaneously.&lt;/li&gt;&#xA;&lt;li&gt;Cleaned and sanitised some parts of the codebase.&lt;/li&gt;&#xA;&lt;li&gt;Included early optimizations to some functions of the codebase using goroutines and sync operations.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;whats-next-1&#34;&gt;What&#39;s next?&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Making &lt;strong&gt;main.go&lt;/strong&gt; the entry point for the code.&lt;/li&gt;&#xA;&lt;li&gt;Fix issues with the watcher, and clean up the goroutine issues.&lt;/li&gt;&#xA;&lt;li&gt;Try studying about &lt;strong&gt;parallelizing code functions&lt;/strong&gt;, and implementing it.&lt;/li&gt;&#xA;&lt;li&gt;Add a &lt;strong&gt;developer&lt;/strong&gt; mode/flag for profiling the performance of the application (---dev)&lt;/li&gt;&#xA;&lt;li&gt;Look into &lt;a href=&#34;https://themes.gohugo.io&#34;&gt;Huge theme&lt;/a&gt; compatibility.&lt;/li&gt;&#xA;&lt;li&gt;Try integrating &lt;strong&gt;JavaScript&lt;/strong&gt; in templates.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;hegdes-progress&#34;&gt;Hegde’s Progress&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Switched to automatic filename parsing&lt;/li&gt;&#xA;&lt;li&gt;Implementing Draft Posts&lt;/li&gt;&#xA;&lt;li&gt;Complete CSS styling&lt;/li&gt;&#xA;&lt;li&gt;Cleaned up unnecessary post rendering&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;whats-next-2&#34;&gt;Whats Next:&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;JS injection as plugins into pages and individual posts&lt;/li&gt;&#xA;&lt;li&gt;Draft post rendering&lt;/li&gt;&#xA;&lt;li&gt;Chronological Feed for posts&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;nathans-progress&#34;&gt;Nathan’s Progress&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Setup CI using GitHub actions which builds and deploys the SSG to &lt;a href=&#34;https://ssg-test-org.github.io&#34;&gt;gh-pages&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;Setup &lt;code&gt;robots.txt&lt;/code&gt; to (currently set to prevent indexing until we reach a v1.0 release)&lt;/li&gt;&#xA;&lt;li&gt;Implemented &lt;code&gt;sitemap.xml&lt;/code&gt; to tell search engines how our site is structured&lt;/li&gt;&#xA;&lt;li&gt;Fixed &lt;code&gt;baseURL&lt;/code&gt; it now, uses absolute paths from root &lt;code&gt;/&lt;/code&gt; when loading stylesheets&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;whats-next-3&#34;&gt;What&#39;s next?&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;SEO optimization (verify semantic HTML generation)&lt;/li&gt;&#xA;&lt;li&gt;OGP tags in page headers&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;hr&gt;&#xA;</description>
    </item>
    <item>
      <title>Henlo!</title>
      <link>https://anna-docs.netlify.app/index.html</link>
      <pubDate>Sat, 24 Feb 2024 00:00:00 +0000</pubDate>
      <author>anna</author>
      <guid>https://anna-docs.netlify.app/index.html</guid>
      <description>&lt;p&gt;Anna is a lightning fast static site generator written in Go, designed for simplicity and ease of use. With a focus on performance and minimal configuration, &lt;a href=&#34;https://github.com/anna-ssg/anna&#34;&gt;Anna&lt;/a&gt; allows you to create beautiful static websites with ease.&lt;/p&gt;&#xA;&lt;h2 id=&#34;crafted-with-anna&#34;&gt;Crafted with Anna&lt;/h2&gt;&#xA;&lt;div id=&#34;embed-gallery&#34;&gt;&lt;/div&gt;&#xA;&lt;script&gt;&#xA;const urls = [&#xA;  &#34;https://adhesh.netlify.app&#34;,&#xA;  &#34;https://sameermanvi.me&#34;,&#xA;  &#34;https://adihegde.com&#34;,&#xA;  &#34;https://hsp-ec.xyz&#34;,&#xA;  &#34;https://anirudhsudhir.com&#34;,&#xA;  &#34;https://polarhive.net&#34;,&#xA;  &#34;https://prawns.dev&#34;&#xA;];&#xA;&#xA;const gallery = document.getElementById(&#39;embed-gallery&#39;);&#xA;gallery.className = &#39;embed-gallery&#39;;&#xA;&#xA;urls.forEach((url, index) =&gt; {&#xA;  const domain = new URL(url).hostname;&#xA;  const item = document.createElement(&#39;div&#39;);&#xA;  item.className = &#39;embed-item&#39;;&#xA;  item.style.animationDelay = `${index * 0.5}s`;&#xA;  const frame = document.createElement(&#39;div&#39;);&#xA;  frame.className = &#39;embed-frame&#39;;&#xA;  const iframe = document.createElement(&#39;iframe&#39;);&#xA;  iframe.src = url;&#xA;  iframe.title = `Live site preview — ${domain}`;&#xA;  iframe.loading = &#39;lazy&#39;;&#xA;  iframe.sandbox = &#39;allow-forms allow-scripts allow-same-origin allow-popups&#39;;&#xA;  iframe.referrerPolicy = &#39;no-referrer&#39;;&#xA;  frame.appendChild(iframe);&#xA;  item.appendChild(frame);&#xA;  gallery.appendChild(item);&#xA;});&#xA;&#xA;// wrap the gallery in a scrollable marquee container if not already wrapped&#xA;if (!gallery.parentElement.classList.contains(&#39;marquee&#39;)) {&#xA;  const marquee = document.createElement(&#39;div&#39;);&#xA;  marquee.className = &#39;marquee&#39;;&#xA;  gallery.parentNode.replaceChild(marquee, gallery);&#xA;  marquee.appendChild(gallery);&#xA;  gallery.classList.add(&#39;marquee-track&#39;);&#xA;}&#xA;&#xA;// setup auto-scroll + drag timeline&#xA;function setupMarquee() {&#xA;  const container = gallery.parentElement; // .marquee&#xA;  const track = gallery; // .marquee-track&#xA;  const initial = Array.from(track.children);&#xA;  if (!initial.length) return;&#xA;&#xA;  // duplicate items until track width &gt;= 2x container width&#xA;  let totalWidth = initial.reduce((sum, el) =&gt; sum + el.getBoundingClientRect().width + parseFloat(getComputedStyle(track).gap || 0), 0);&#xA;  let i = 0;&#xA;  while (totalWidth &lt; container.getBoundingClientRect().width * 2) {&#xA;    const clone = initial[i % initial.length].cloneNode(true);&#xA;    track.appendChild(clone);&#xA;    totalWidth += clone.getBoundingClientRect().width + parseFloat(getComputedStyle(track).gap || 0);&#xA;    i++;&#xA;    if (i &gt; 60) break;&#xA;  }&#xA;&#xA;  const trackWidth = Array.from(track.children).reduce((w, node) =&gt; w + node.getBoundingClientRect().width + parseFloat(getComputedStyle(track).gap || 0), 0);&#xA;  const half = trackWidth / 2;&#xA;&#xA;  // auto-scroll state&#xA;  let last = null;&#xA;  const speed = 12; // px/s&#xA;  let isPointerDown = false;&#xA;  let isHover = false;&#xA;  let isFocused = false;&#xA;&#xA;  let startX = 0;&#xA;  let startScroll = 0;&#xA;&#xA;  container.addEventListener(&#39;pointerdown&#39;, (e) =&gt; {&#xA;    isPointerDown = true;&#xA;    container.setPointerCapture?.(e.pointerId);&#xA;    startX = e.clientX;&#xA;    startScroll = container.scrollLeft;&#xA;  });&#xA;&#xA;  container.addEventListener(&#39;pointermove&#39;, (e) =&gt; {&#xA;    if (!isPointerDown) return;&#xA;    const dx = e.clientX - startX;&#xA;    container.scrollLeft = startScroll - dx;&#xA;    if (container.scrollLeft &gt;= half) container.scrollLeft -= half;&#xA;    if (container.scrollLeft &lt; 0) container.scrollLeft += half;&#xA;  });&#xA;&#xA;  container.addEventListener(&#39;pointerup&#39;, (e) =&gt; {&#xA;    isPointerDown = false;&#xA;    try { container.releasePointerCapture?.(e.pointerId); } catch (err) {}&#xA;  });&#xA;&#xA;  container.addEventListener(&#39;pointercancel&#39;, () =&gt; { isPointerDown = false; });&#xA;  container.addEventListener(&#39;mouseleave&#39;, () =&gt; { isPointerDown = false; });&#xA;&#xA;  container.addEventListener(&#39;mouseenter&#39;, () =&gt; { isHover = true; });&#xA;  container.addEventListener(&#39;mouseleave&#39;, () =&gt; { isHover = false; });&#xA;  container.addEventListener(&#39;focusin&#39;, () =&gt; { isFocused = true; });&#xA;  container.addEventListener(&#39;focusout&#39;, () =&gt; { isFocused = false; });&#xA;&#xA;  function step(t) {&#xA;    if (!last) last = t;&#xA;    const dt = (t - last) / 1000;&#xA;    last = t;&#xA;&#xA;    if (!isPointerDown &amp;&amp; !isHover &amp;&amp; !isFocused) {&#xA;      container.scrollLeft += speed * dt;&#xA;      if (container.scrollLeft &gt;= half) container.scrollLeft -= half;&#xA;    }&#xA;&#xA;    requestAnimationFrame(step);&#xA;  }&#xA;&#xA;  requestAnimationFrame(step);&#xA;&#xA;  // ensure initial scroll is positioned within first half&#xA;  container.scrollLeft = 0;&#xA;}&#xA;&#xA;window.addEventListener(&#39;load&#39;, setupMarquee);&#xA;window.addEventListener(&#39;resize&#39;, () =&gt; {&#xA;  clearTimeout(window._marqueeTimer);&#xA;  window._marqueeTimer = setTimeout(setupMarquee, 150);&#xA;});&#xA;&lt;/script&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;quick-start-guidequick-starthtml&#34;&gt;&lt;a href=&#34;./quick-start.html&#34;&gt;Quick Start Guide&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;p&gt;Download Anna and deploy your site in seconds with our quick start guide.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-text&#34;&gt;    ___&#xA;   /   |  ____  ____  ____ _&#xA;  / /| | / __ \/ __ \/ __ `/&#xA; / ___ |/ / / / / / / /_/ /&#xA;/_/  |_/_/ /_/_/ /_/\__,_/&#xA;&#xA;A static site generator in go&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This project was a part of the ACM PESU-ECC&#39;s yearly &lt;a href=&#34;https://acmpesuecc.github.io/aiep&#34;&gt;AIEP&lt;/a&gt; program, and is maintained by &lt;a href=&#34;https://github.com/DedLad&#34;&gt;Adhesh Athrey&lt;/a&gt;, &lt;a href=&#34;https://github.com/polarhive&#34;&gt;Nathan Paul&lt;/a&gt;, &lt;a href=&#34;https://github.com/anirudhsudhir&#34;&gt;Anirudh Sudhir&lt;/a&gt;, and &lt;a href=&#34;https://github.com/bwaklog&#34;&gt;Aditya Hegde&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>Language Codeblock Test</title>
      <link>https://anna-docs.netlify.app/posts/test-content/lang_test.html</link>
      <pubDate>Fri, 23 Feb 2024 00:00:00 +0000</pubDate>
      <author>anna</author>
      <guid>https://anna-docs.netlify.app/posts/test-content/lang_test.html</guid>
      <description>&lt;h2 id=&#34;struct-in-rust&#34;&gt;struct in rust&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-rust&#34;&gt;struct Vector2D {&#xA;    x: f64,&#xA;    y: f64,&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;brainfuck-interpreter-yanked-from-reddit&#34;&gt;Brainfuck interpreter yanked from reddit&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-C&#34;&gt;s[999],*r=s,*d,c;main(a,b){char*v=1[d=b];for(;c=*v++%93;)for(b=c%7?a&amp;amp;&amp;amp;(c&amp;amp;17?c&amp;amp;1?&#xA;(*r-=c-44):(r+=c-61):c&amp;amp;2?putchar(*r):(*r=getchar()),0):v;b&amp;amp;&amp;amp;c|a**r;v=d)main(!c,&amp;amp;&#xA;b-1);d=v;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;entire-yake-sourcecode&#34;&gt;Entire &lt;code&gt;yake&lt;/code&gt; sourcecode!&lt;/h2&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-C&#34;&gt;#include &amp;lt;stdio.h&amp;gt;&#xA;&#xA;int opr(char *v);&#xA;void ex(int *p, char *syn);&#xA;&#xA;int main(int ac, char *av[]) {&#xA;    int p = 0;&#xA;    return (ac &amp;lt; 2) ? (printf(&amp;quot;synerr\n&amp;quot;),1) : (ex(&amp;amp;p, av[1]), 0);&#xA;}&#xA;&#xA;void ex(int *v, char *syn){&#xA;    int *p;&#xA;    int st = 0; // 0 for value control, 1 for pointer control&#xA;    while ((int)*syn!=&#39;\0&#39;){&#xA;        switch ((int)*syn) {&#xA;            case 46: printf(&amp;quot;&amp;amp;v : %d | %p -&amp;gt; %d | m = %d\n&amp;quot;, *v, p, *p, st); break;&#xA;            case 43: if(st!=1){++*v;}else{++p;} break;&#xA;            case 45: if(st!=1){--*v;}else{--p;} break;&#xA;            case 60: if(st!=1){*v = *v&amp;lt;&amp;lt;1;}else{printf(&amp;quot;synerr&amp;quot;);return;} break;&#xA;            case 62: if(st!=1){*v = *v&amp;gt;&amp;gt;1;}else{printf(&amp;quot;synerr&amp;quot;);return;} break;&#xA;            case 64: if(st == 1){st = 0;*p=*v;}else{st=1;} break;&#xA;            case 38: if(st == 1){st = 0;*v=*p;}else{st=1;}break;// &amp;amp; is used to get value&#xA;&#xA;            // operations, st == 1, for subsequent value for operation type&#xA;            case 37: if(st==1){&#xA;                syn++;&#xA;                switch((int)*syn) {&#xA;                    case 45: *v-=*p; break;&#xA;                    case 43: *v+=*p; break;&#xA;                }&#xA;                st = 0; // auto switch back to st=0&#xA;            } break;&#xA;&#xA;            case 58: // ascii to string&#xA;                     // length of string to be printed is&#xA;                     // to be stored in v&#xA;                     for (int i=0;i&amp;lt;*v;++i){printf(&amp;quot;%c&amp;quot;,*p);++p;}&#xA;&#xA;                     printf(&amp;quot;\n&amp;quot;);&#xA;                     break;&#xA;&#xA;            default: printf(&amp;quot;synerr\n&amp;quot;); return;&#xA;        }&#xA;        syn++;&#xA;    }&#xA;    return;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;</description>
    </item>
    <item>
      <title>Sample Post</title>
      <link>https://anna-docs.netlify.app/posts/test-content/markdown_test.html</link>
      <pubDate>Fri, 23 Feb 2024 00:00:00 +0000</pubDate>
      <author>anna</author>
      <guid>https://anna-docs.netlify.app/posts/test-content/markdown_test.html</guid>
      <description>&lt;h1 id=&#34;h1-heading-8-&#34;&gt;h1 Heading 8-)&lt;/h1&gt;&#xA;&lt;h2 id=&#34;h2-heading&#34;&gt;h2 Heading&lt;/h2&gt;&#xA;&lt;h3 id=&#34;h3-heading&#34;&gt;h3 Heading&lt;/h3&gt;&#xA;&lt;h4 id=&#34;h4-heading&#34;&gt;h4 Heading&lt;/h4&gt;&#xA;&lt;h5 id=&#34;h5-heading&#34;&gt;h5 Heading&lt;/h5&gt;&#xA;&lt;h6 id=&#34;h6-heading&#34;&gt;h6 Heading&lt;/h6&gt;&#xA;&lt;h2 id=&#34;horizontal-rules&#34;&gt;Horizontal Rules&lt;/h2&gt;&#xA;&lt;hr&gt;&#xA;&lt;hr&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;typographic-replacements&#34;&gt;Typographic replacements&lt;/h2&gt;&#xA;&lt;p&gt;Enable typographer option to see result.&lt;/p&gt;&#xA;&lt;p&gt;(c) (C) (r) (R) (tm) (TM) (p) (P) +-&lt;/p&gt;&#xA;&lt;p&gt;test.. test... test..... test?..... test!....&lt;/p&gt;&#xA;&lt;p&gt;!!!!!! ???? ,, -- ---&lt;/p&gt;&#xA;&lt;p&gt;&amp;quot;Smartypants, double quotes&amp;quot; and &#39;single quotes&#39;&lt;/p&gt;&#xA;&lt;h2 id=&#34;emphasis&#34;&gt;Emphasis&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;This is bold text&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;This is bold text&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;This is italic text&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;This is italic text&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;~~Strikethrough~~&lt;/p&gt;&#xA;&lt;h2 id=&#34;blockquotes&#34;&gt;Blockquotes&lt;/h2&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Blockquotes can also be nested...&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;...by using additional greater-than signs right next to each other...&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;...or with spaces between arrows.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;lists&#34;&gt;Lists&lt;/h2&gt;&#xA;&lt;p&gt;Unordered&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create a list by starting a line with &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt;, or &lt;code&gt;*&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Sub-lists are made by indenting 2 spaces:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Marker character change forces new list start:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Ac tristique libero volutpat at&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Facilisis in pretium nisl aliquet&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Nulla volutpat aliquam velit&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Very easy!&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Ordered&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Lorem ipsum dolor sit amet&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Consectetur adipiscing elit&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Integer molestie lorem at massa&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;You can use sequential numbers...&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;...or keep all the numbers as &lt;code&gt;1.&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Start numbering with offset:&lt;/p&gt;&#xA;&lt;ol start=&#34;57&#34;&gt;&#xA;&lt;li&gt;foo&lt;/li&gt;&#xA;&lt;li&gt;bar&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;code&#34;&gt;Code&lt;/h2&gt;&#xA;&lt;p&gt;Inline &lt;code&gt;code&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Indented code&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;// Some comments&#xA;line 1 of code&#xA;line 2 of code&#xA;line 3 of code&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Block code &amp;quot;fences&amp;quot;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Sample text here...&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Syntax highlighting&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-js&#34;&gt;var foo = function (bar) {&#xA;  return bar++;&#xA;};&#xA;&#xA;console.log(foo(5));&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h2 id=&#34;tables&#34;&gt;Tables&lt;/h2&gt;&#xA;&lt;p&gt;| Option | Description                                                               |&#xA;| ------ | ------------------------------------------------------------------------- |&#xA;| data   | path to data files to supply the data that will be passed into templates. |&#xA;| engine | engine to be used for processing templates. Handlebars is the default.    |&#xA;| ext    | extension to be used for dest files.                                      |&lt;/p&gt;&#xA;&lt;p&gt;Right aligned columns&lt;/p&gt;&#xA;&lt;p&gt;| Option |                                                               Description |&#xA;| -----: | ------------------------------------------------------------------------: |&#xA;|   data | path to data files to supply the data that will be passed into templates. |&#xA;| engine |    engine to be used for processing templates. Handlebars is the default. |&#xA;|    ext |                                      extension to be used for dest files. |&lt;/p&gt;&#xA;&lt;h2 id=&#34;links&#34;&gt;Links&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://dev.nodeca.com&#34;&gt;link text&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://nodeca.github.io/pica/demo/&#34; title=&#34;title text!&#34;&gt;link with title&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Autoconverted link https://github.com/nodeca/pica (enable linkify to see)&lt;/p&gt;&#xA;&lt;h2 id=&#34;images&#34;&gt;Images&lt;/h2&gt;&#xA;&lt;figure&gt;&#xA;&lt;img src=&#34;https://octodex.github.com/images/minion.png&#34; alt=&#34;Minion&#34;&gt;&#xA;&lt;img src=&#34;https://octodex.github.com/images/stormtroopocat.jpg&#34; alt=&#34;Stormtroopocat&#34; title=&#34;The Stormtroopocat&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;Like links, Images also have a footnote style syntax&lt;/p&gt;&#xA;&lt;figure&gt;&#xA;&lt;img src=&#34;https://octodex.github.com/images/dojocat.jpg&#34; alt=&#34;Alt text&#34; title=&#34;The Dojocat&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;With a reference later in the document defining the URL location:&lt;/p&gt;&#xA;&lt;h2 id=&#34;plugins&#34;&gt;Plugins&lt;/h2&gt;&#xA;&lt;p&gt;The killer feature of &lt;code&gt;markdown-it&lt;/code&gt; is very effective support of&#xA;&lt;a href=&#34;https://www.npmjs.org/browse/keyword/markdown-it-plugin&#34;&gt;syntax plugins&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;emojieshttpsgithubcommarkdown-itmarkdown-it-emoji&#34;&gt;&lt;a href=&#34;https://github.com/markdown-it/markdown-it-emoji&#34;&gt;Emojies&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Classic markup: :wink: :cry: :laughing: :yum:&lt;/p&gt;&#xA;&lt;p&gt;Shortcuts (emoticons): :-) :-( 8-) ;)&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;see &lt;a href=&#34;https://github.com/markdown-it/markdown-it-emoji#change-output&#34;&gt;how to change output&lt;/a&gt; with twemoji.&lt;/p&gt;&#xA;&lt;h3 id=&#34;subscripthttpsgithubcommarkdown-itmarkdown-it-sub--superscripthttpsgithubcommarkdown-itmarkdown-it-sup&#34;&gt;&lt;a href=&#34;https://github.com/markdown-it/markdown-it-sub&#34;&gt;Subscript&lt;/a&gt; / &lt;a href=&#34;https://github.com/markdown-it/markdown-it-sup&#34;&gt;Superscript&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;19^th^&lt;/li&gt;&#xA;&lt;li&gt;H~2~O&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;inshttpsgithubcommarkdown-itmarkdown-it-ins&#34;&gt;&lt;a href=&#34;https://github.com/markdown-it/markdown-it-ins&#34;&gt;&amp;lt;ins&amp;gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;++Inserted text++&lt;/p&gt;&#xA;&lt;h3 id=&#34;markhttpsgithubcommarkdown-itmarkdown-it-mark&#34;&gt;&lt;a href=&#34;https://github.com/markdown-it/markdown-it-mark&#34;&gt;&amp;lt;mark&amp;gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;==Marked text==&lt;/p&gt;&#xA;&lt;h3 id=&#34;footnoteshttpsgithubcommarkdown-itmarkdown-it-footnote&#34;&gt;&lt;a href=&#34;https://github.com/markdown-it/markdown-it-footnote&#34;&gt;Footnotes&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Footnote 1 link[^first].&lt;/p&gt;&#xA;&lt;p&gt;Footnote 2 link[^second].&lt;/p&gt;&#xA;&lt;p&gt;Inline footnote^[Text of inline footnote] definition.&lt;/p&gt;&#xA;&lt;p&gt;Duplicated footnote reference[^second].&lt;/p&gt;&#xA;&lt;p&gt;[^first]: Footnote &lt;strong&gt;can have markup&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;and multiple paragraphs.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;[^second]: Footnote text.&lt;/p&gt;&#xA;&lt;h3 id=&#34;definition-listshttpsgithubcommarkdown-itmarkdown-it-deflist&#34;&gt;&lt;a href=&#34;https://github.com/markdown-it/markdown-it-deflist&#34;&gt;Definition lists&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Term 1&lt;/p&gt;&#xA;&lt;p&gt;: Definition 1&#xA;with lazy continuation.&lt;/p&gt;&#xA;&lt;p&gt;Term 2 with &lt;em&gt;inline markup&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;: Definition 2&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;    { some code, part of Definition 2 }&#xA;&#xA;Third paragraph of definition 2.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;&lt;em&gt;Compact style:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Term 1&#xA;~ Definition 1&lt;/p&gt;&#xA;&lt;p&gt;Term 2&#xA;~ Definition 2a&#xA;~ Definition 2b&lt;/p&gt;&#xA;&lt;h3 id=&#34;abbreviationshttpsgithubcommarkdown-itmarkdown-it-abbr&#34;&gt;&lt;a href=&#34;https://github.com/markdown-it/markdown-it-abbr&#34;&gt;Abbreviations&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This is HTML abbreviation example.&lt;/p&gt;&#xA;&lt;p&gt;It converts &amp;quot;HTML&amp;quot;, but keep intact partial entries like &amp;quot;xxxHTMLyyy&amp;quot; and so on.&lt;/p&gt;&#xA;&lt;p&gt;*[HTML]: Hyper Text Markup Language&lt;/p&gt;&#xA;&lt;h3 id=&#34;custom-containershttpsgithubcommarkdown-itmarkdown-it-container&#34;&gt;&lt;a href=&#34;https://github.com/markdown-it/markdown-it-container&#34;&gt;Custom containers&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;::: warning&#xA;&lt;em&gt;here be dragons&lt;/em&gt;&#xA;:::&lt;/p&gt;&#xA;</description>
    </item>
    <item>
      <title>benchmark</title>
      <link>https://anna-docs.netlify.app/posts/bench.html</link>
      <pubDate>Mon, 01 Jan 2024 00:00:00 +0000</pubDate>
      <author>anna</author>
      <guid>https://anna-docs.netlify.app/posts/bench.html</guid>
      <description>&lt;h1 id=&#34;heading-l1&#34;&gt;heading L1&lt;/h1&gt;&#xA;&lt;p&gt;Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim&#xA;labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi&#xA;anim cupidatat excepteur officia. Reprehenderit nostrud nostrud ipsum Lorem est&#xA;aliquip amet voluptate voluptate dolor minim nulla est proident. Nostrud&#xA;officia pariatur ut officia. Sit irure elit esse ea nulla sunt ex occaecat&lt;/p&gt;&#xA;&lt;h2 id=&#34;heading-l2&#34;&gt;heading L2&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;bold and italics&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;quote text&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;</description>
    </item>
    <item>
      <title>Testing File for Extensions</title>
      <link>https://anna-docs.netlify.app/posts/test.html</link>
      <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
      <author>anna</author>
      <guid>https://anna-docs.netlify.app/posts/test.html</guid>
      <description>&lt;pre&gt;&lt;code class=&#34;language-pikchr&#34;&gt;arrow right 200% &amp;quot;Markdown&amp;quot; &amp;quot;Source&amp;quot;&#xA;box rad 10px &amp;quot;Markdown&amp;quot; &amp;quot;Formatter&amp;quot; &amp;quot;(markdown.c)&amp;quot; fit&#xA;arrow right 200% &amp;quot;HTML+SVG&amp;quot; &amp;quot;Output&amp;quot;&#xA;arrow &amp;lt;-&amp;gt; down 70% from last box.s&#xA;box same &amp;quot;Pikchr&amp;quot; &amp;quot;Formatter&amp;quot; &amp;quot;(pikchr.c)&amp;quot; fit&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-mermaid&#34;&gt;graph TD;&#xA;    A--&amp;gt;B;&#xA;    A--&amp;gt;C;&#xA;    B--&amp;gt;D;&#xA;    C--&amp;gt;D;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;pre&gt;&lt;code class=&#34;language-mermaid&#34;&gt;---&#xA;title: Order example&#xA;---&#xA;erDiagram&#xA;    CUSTOMER ||--o{ ORDER : places&#xA;    ORDER ||--|{ LINE-ITEM : contains&#xA;    CUSTOMER }|..|{ DELIVERY-ADDRESS : uses&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;</description>
    </item>
  </channel>
</rss>
