<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/feeds/devlog-feed.xsl" type="text/xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:shark="https://shellsharks.com/feeds/shark-namespace">
  <channel>
    <title>shellsharks Devlogs</title>
    <description>Shellsharks development logs</description>
    <link>https://shellsharks.com</link>
    <language>en-us</language>
    <managingEditor>mike@shellsharks.com (Shellsharks)</managingEditor>
    <webMaster>mike@shellsharks.com (Shellsharks)</webMaster>
    <atom:link href="https://shellsharks.com/feeds/devlog-feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sun, 19 Apr 2026 02:34:56 -0400</pubDate>
    <lastBuildDate>Sun, 19 Apr 2026 02:34:56 -0400</lastBuildDate>
    <image>
      <title>shellsharks Devlogs</title>
      <url>https://shellsharks.com/assets/img/avatar.png</url>
      <link>https://shellsharks.com</link>
    </image>
    <generator>Jekyll v4.3.4</generator>
    
    
      <item>
        <title>RSScaping</title>
        <author>mike@shellsharks.com (Mike)</author>
        <shark:summary><p>Having an <a href="/an-ode-to-rss">RSS feed</a> for your site’s content is one of the most important things you can do as a citizen of the open web. If you want people to tune into your writing, it <strong>just makes sense</strong> to have one. Or better yet, you could have <em>many</em> RSS feeds, <a href="/feeds">as I do</a>—each from their own unique <a href="/multiplicity-of-writing">collection</a> or topic(s). This site is <a href="/architecture">built</a> on top of <a href="https://jekyllrb.com">Jekyll</a>, a static-site generator. Each of the individual RSS feeds on my site are comprised of a <a href="#rss-xml-file">.xml file</a> which sets the feeds metadata and programattically generates the feed records, and a <a href="#rss-xsl-file">.xsl file</a> which (<em>very optionally</em>) gives the feed a web view.
<br /><br />
In the years I’ve had this site, I’ve had to tune and tweak the .xml file quite a few times to continue to improve the way it works, the content it exposes and the metadata that is associated with the feed. Here I’ll explain some of those tweaks and the thought process behind them.</p>
</shark:summary>
        <description>&lt;p&gt;Having an &lt;a href=&quot;https://shellsharks.com/an-ode-to-rss&quot;&gt;RSS feed&lt;/a&gt; for your site’s content is one of the most important things you can do as a citizen of the open web. If you want people to tune into your writing, it &lt;strong&gt;just makes sense&lt;/strong&gt; to have one. Or better yet, you could have &lt;em&gt;many&lt;/em&gt; RSS feeds, &lt;a href=&quot;https://shellsharks.com/feeds&quot;&gt;as I do&lt;/a&gt;—each from their own unique &lt;a href=&quot;https://shellsharks.com/multiplicity-of-writing&quot;&gt;collection&lt;/a&gt; or topic(s). This site is &lt;a href=&quot;https://shellsharks.com/architecture&quot;&gt;built&lt;/a&gt; on top of &lt;a href=&quot;https://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt;, a static-site generator. Each of the individual RSS feeds on my site are comprised of a &lt;a href=&quot;#rss-xml-file&quot;&gt;.xml file&lt;/a&gt; which sets the feeds metadata and programattically generates the feed records, and a &lt;a href=&quot;#rss-xsl-file&quot;&gt;.xsl file&lt;/a&gt; which (&lt;em&gt;very optionally&lt;/em&gt;) gives the feed a web view.
&lt;br /&gt;&lt;br /&gt;
In the years I’ve had this site, I’ve had to tune and tweak the .xml file quite a few times to continue to improve the way it works, the content it exposes and the metadata that is associated with the feed. Here I’ll explain some of those tweaks and the thought process behind them.&lt;/p&gt;

&lt;h2 id=&quot;rss-xml-file&quot;&gt;RSS XML File&lt;/h2&gt;

&lt;p&gt;My site’s RSS feed .xml file. I have substituted many values in the block below with placeholders such as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[FEED NAME]&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-xml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml-stylesheet href=&quot;[LINK TO .XSL FILE]&quot; type=&quot;text/xsl&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;rss&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;version=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;2.0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:atom=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.w3.org/2005/Atom&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:shark=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://shellsharks.com/feeds/shark-namespace&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;channel&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;{{ site.title | strip_html | xml_escape }} [FEED NAME]&lt;span class=&quot;nt&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;description&amp;gt;&lt;/span&gt;{{ site.description | xml_escape }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/description&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;link&amp;gt;&lt;/span&gt;{{ site.url }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/link&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;language&amp;gt;&lt;/span&gt;en-us&lt;span class=&quot;nt&quot;&gt;&amp;lt;/language&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;managingEditor&amp;gt;&lt;/span&gt;[EMAIL] ([ALIAS])&lt;span class=&quot;nt&quot;&gt;&amp;lt;/managingEditor&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;webMaster&amp;gt;&lt;/span&gt;[EMAIL] ([ALIAS])&lt;span class=&quot;nt&quot;&gt;&amp;lt;/webMaster&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;atom:link&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;{{ &quot;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;[RELATIVE&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;.XML&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;FILE&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;LOCATION]&quot;&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;prepend:&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;site.baseurl&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;prepend:&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;site.url&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;}}&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;rel=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;self&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;application/rss+xml&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;pubDate&amp;gt;&lt;/span&gt;{{ site.time | date_to_rfc822 }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/pubDate&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;lastBuildDate&amp;gt;&lt;/span&gt;{{ site.time | date_to_rfc822 }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/lastBuildDate&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;image&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;{{ site.title | strip_html | xml_escape }} [FEED NAME]&lt;span class=&quot;nt&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;url&amp;gt;&lt;/span&gt;{{ site.url }}{{ site.avatar_url }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/url&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;link&amp;gt;&lt;/span&gt;{{ site.url }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/link&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/image&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;generator&amp;gt;&lt;/span&gt;Jekyll v{{ jekyll.version }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/generator&amp;gt;&lt;/span&gt;
    {% assign sorted_posts = site.posts | sort: &apos;date&apos; | reverse %}
    {% for post in sorted_posts limit:100 %}
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;item&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;{{ post.title | strip_html | xml_escape }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;shark:summary&amp;gt;&lt;/span&gt;{{ post.excerpt }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/shark:summary&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;description&amp;gt;&lt;/span&gt;{{ post.content | replace: &apos;href=&quot;https://shellsharks.com/&apos;, &apos;href=&quot;https://[DOMAIN]/&apos; | xml_escape }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/description&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;pubDate&amp;gt;&lt;/span&gt;{{ post.date | date_to_rfc822 }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/pubDate&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;link&amp;gt;&lt;/span&gt;{{ post.url | prepend: site.baseurl | prepend: site.url }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/link&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;guid&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;isPermaLink=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;{{ post.url | prepend: site.baseurl | prepend: site.url }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/guid&amp;gt;&lt;/span&gt;
        {% for tag in post.tags %}
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;category&amp;gt;&lt;/span&gt;{{ tag | xml_escape }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/category&amp;gt;&lt;/span&gt;
        {% endfor %}
        {% for cat in post.categories %}
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;category&amp;gt;&lt;/span&gt;{{ cat | xml_escape }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/category&amp;gt;&lt;/span&gt;
        {% endfor %}
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;/item&amp;gt;&lt;/span&gt;
    {% endfor %}
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/channel&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/rss&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Some important things to note from the .xml file…&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;You’ll notice the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shark&lt;/code&gt; &lt;a href=&quot;https://www.rssboard.org/rss-specification#extendingRss&quot;&gt;namespace&lt;/a&gt; established in the initial &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;rss&amp;gt;&lt;/code&gt; element. Within the RSS &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;generator&amp;gt;&lt;/code&gt; elemtn you will see a tag from this namespace, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;shark:summary&amp;gt;&lt;/code&gt;. I explain what these are for &lt;a href=&quot;#shark-namespace&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;There’s a lot of html stripping (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;strip_html&lt;/code&gt;) and xml escaping (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;xml_escape&lt;/code&gt;) being done. This is because RSS clients, and general RSS spec gets very cranky about certain characters being included in feeds.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;For any &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;date&lt;/code&gt;-related tags, be sure to use &lt;a href=&quot;https://validator.w3.org/feed/docs/error/InvalidRFC2822Date.html&quot;&gt;RFC822-compatible&lt;/a&gt; (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;date_to_rfc822&lt;/code&gt;) date strings. Otherwise things break.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Remember to sort your RSS feed output using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sort: &apos;date&apos; | reverse&lt;/code&gt;.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;You can limit the number of posts that are included in your generated RSS feed by using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;limit:[COUNT]&lt;/code&gt; directive in your Liquid for loop (as I did here &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{% for post in sorted_posts limit:100 %}&lt;/code&gt;).&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;For a &lt;u&gt;full-content&lt;/u&gt; feed, use the following syntax in your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;generator&amp;gt;&amp;lt;description&amp;gt;&lt;/code&gt; tag ⬇️. This uses the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;content&lt;/code&gt; &lt;a href=&quot;https://jekyllrb.com/docs/variables/&quot;&gt;variable&lt;/a&gt; to pull in the full content, fixes relative links with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;replace: &apos;href=&quot;https://shellsharks.com/&apos;, &apos;href=&quot;https://[DOMAIN]/&apos;&lt;/code&gt; and then does the usual &lt;em&gt;xml_escape&lt;/em&gt; operation.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&quot;language-liquid highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;\|&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;href=&quot;https://shellsharks.com/&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;href=&quot;https://[DOMAIN]/&apos;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;\|&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;xml_escape&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;You can limit the source collections an RSS feed is generated from using something like this: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{% assign pagesandnotes = site.posts \| concat: site.notes \| concat: site.scrolls %}&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;You can filter the feed records by front matter tags using syntax such as this: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{% if post.tags contains &apos;fediverse&apos; or post.tags contains &apos;social&apos; or post.tags contains &apos;indieweb&apos; %}&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Create an individual .xml and .xsl file for each RSS feed you’re interested in having! A lot of the code is reusable with minor tweaks to customize for each of your feed usecases.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;rss-xsl-file&quot;&gt;RSS XSL File&lt;/h2&gt;

&lt;p&gt;My site’s RSS feed .xsl file. I have substituted many values in the block below with placeholders such as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[RSS FEED TITLE]&lt;/code&gt;. &lt;strong&gt;XSL&lt;/strong&gt;, or &lt;a href=&quot;https://www.w3schools.com/xml/xsl_intro.asp&quot;&gt;eXtensible Stylesheet Lanugage&lt;/a&gt; is a styling language for XML. The syntax is somewhat arcane, but easy enough to use to create something simple like I have to spruce up your raw .xml RSS feeds (or other .xml files like a Sitemap).&lt;/p&gt;

&lt;p&gt;I won’t spend time explaining the &lt;em&gt;xsl&lt;/em&gt;-related syntax, as I believe you can kinda reverse-engineer how they work by looking at what is below, but I will note that you &lt;em&gt;can&lt;/em&gt; use &lt;a href=&quot;https://jekyllrb.com/docs/includes/&quot;&gt;Jekyll includes&lt;/a&gt; to further stylize and bring these xml files under the umbrella of your site’s larger thematic design.&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
&lt;span class=&quot;cp&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;xsl:stylesheet&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;version=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;3.0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:xsl=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.w3.org/1999/XSL/Transform&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:atom=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.w3.org/2005/Atom&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:dc=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://purl.org/dc/elements/1.1/&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:itunes=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.itunes.com/dtds/podcast-1.0.dtd&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns:shark=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://shellsharks.com/feeds/shark-namespace&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;xsl:output&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;method=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;html&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;version=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1.0&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;encoding=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;indent=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;yes&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;xsl:template&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;match=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;html&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.w3.org/1999/xhtml&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;title&amp;gt;&amp;lt;xsl:value-of&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;select=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/rss/channel/title&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt; [RSS FEED TITLE]&lt;span class=&quot;nt&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;meta&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;http-equiv=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Content-Type&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;content=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;text/html; charset=utf-8&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;meta&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;viewport&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;content=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;width=device-width, initial-scale=1, maximum-scale=1&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;meta&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;charset=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;link&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;rel=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;[LINK TO CSS FILE]&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;header&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;sitetitle&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
              &lt;span class=&quot;nt&quot;&gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;[HEADER IMAGE]&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;alt=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;[ALT TITLE]&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;30&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;head&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;description&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
              &lt;span class=&quot;nt&quot;&gt;&amp;lt;p&amp;gt;&amp;lt;xsl:value-of&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;select=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/rss/channel/description&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;aboutfeeds&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is a web feed that can be viewed in the browser. &lt;span class=&quot;nt&quot;&gt;&amp;lt;strong&amp;gt;&lt;/span&gt;Subscribe for free&lt;span class=&quot;nt&quot;&gt;&amp;lt;/strong&amp;gt;&lt;/span&gt; by copying the URL &lt;span class=&quot;nt&quot;&gt;&amp;lt;code&amp;gt;&amp;lt;mark&amp;gt;&lt;/span&gt;[.XML URL]&lt;span class=&quot;nt&quot;&gt;&amp;lt;/mark&amp;gt;&amp;lt;/code&amp;gt;&lt;/span&gt; into your RSS reader. Learn more &lt;span class=&quot;nt&quot;&gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;https://aboutfeeds.com&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;about feeds here&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;. A full listing of this site&apos;s feeds can be found &lt;span class=&quot;nt&quot;&gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;[LINK TO FEEDS INDEX PAGE]&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;here&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;.&lt;span class=&quot;nt&quot;&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;main&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;h2&amp;gt;&amp;lt;svg&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xmlns=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;http://www.w3.org/2000/svg&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;24&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;24&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;viewBox=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0 0 455.731 455.731&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;xml:space=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;preserve&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;path&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;style=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill:#f78422&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;d=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;M0 0h455.731v455.731H0z&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&amp;lt;path&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;style=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill:#fff&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;d=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;M296.208 159.16C234.445 97.397 152.266 63.382 64.81 63.382v64.348c70.268 0 136.288 27.321 185.898 76.931 49.609 49.61 76.931 115.63 76.931 185.898h64.348c-.001-87.456-34.016-169.636-95.779-231.399z&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&amp;lt;path&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;style=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill:#fff&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;d=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;M64.143 172.273v64.348c84.881 0 153.938 69.056 153.938 153.939h64.348c0-120.364-97.922-218.287-218.286-218.287z&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&amp;lt;circle&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;style=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;fill:#fff&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;cx=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;109.833&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;cy=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;346.26&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;r=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;46.088&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&amp;lt;/svg&amp;gt;&lt;/span&gt; Latest Posts&lt;span class=&quot;nt&quot;&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;xsl:for-each&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;select=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/rss/channel/item&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;article&amp;gt;&lt;/span&gt;
              &lt;span class=&quot;nt&quot;&gt;&amp;lt;h3&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;hreflang=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;en&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;xsl:attribute&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;href&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;xsl:value-of&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;select=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;link&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&amp;lt;/xsl:attribute&amp;gt;&amp;lt;xsl:value-of&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;select=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/h3&amp;gt;&lt;/span&gt;
              &lt;span class=&quot;nt&quot;&gt;&amp;lt;footer&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;pubdate&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Posted: &lt;span class=&quot;nt&quot;&gt;&amp;lt;time&amp;gt;&amp;lt;xsl:value-of&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;select=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;pubDate&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&amp;lt;/time&amp;gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
              &lt;span class=&quot;nt&quot;&gt;&amp;lt;p&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;postdescription&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;xsl:value-of&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;select=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;shark:summary&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;/&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;/article&amp;gt;&lt;/span&gt;
          &lt;span class=&quot;nt&quot;&gt;&amp;lt;/xsl:for-each&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/main&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;footer&amp;gt;&lt;/span&gt;
          {% include footer.html %}
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;/footer&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/xsl:template&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;One thing to note is the use of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shark:summary&lt;/code&gt; identifier in the &lt;em&gt;article&lt;/em&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;postdescription&lt;/code&gt; element. This is to bring in a more human readable form of the post description rather than the full-content, w/ HTML that is set by default. I describe what this is and why I’m doin’ it &lt;a href=&quot;#shark-namespace&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h1 id=&quot;shark-namespace&quot;&gt;“Shark” Namespace&lt;/h1&gt;

&lt;p&gt;Upon popular request, I recently upgraded &lt;em&gt;all&lt;/em&gt; of my &lt;a href=&quot;https://shellsharks.com/feeds&quot;&gt;RSS feeds&lt;/a&gt; to be “full content”. This means that full-length articles, including much of the styling and images would be available directly within folks RSS readers, for those who enjoy consuming directly in-client, rather than clicking out to read within the confines of my site. I personally think reading on-site is the better way to enjoy mine and other people’s content, but to each their own!&lt;/p&gt;

&lt;p&gt;This modification however had a negative downstream effect on the human-readability of my RSS feeds on the web. Last year I gave my &lt;em&gt;.xml&lt;/em&gt; &lt;a href=&quot;https://shellsharks.com/notes/2024/02/21/web-feed-makeover&quot;&gt;RSS feeds a makeover&lt;/a&gt; by giving each a &lt;em&gt;.xslt&lt;/em&gt; file, which styled them and made them viewable via the browser. When I modified the feeds to be “full-content”, this changed the view of each post record in the stylized feed to be a single-line glob of HTML—not very readable! I wanted to fix this, but needed a way to do it that would keep my RSS .xml files &lt;a href=&quot;https://www.rssboard.org/rss-specification&quot;&gt;in-spec&lt;/a&gt; enough to be handled by RSS clients.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;https://www.rssboard.org/rss-specification#extendingRss&quot;&gt;RSS 2.0 Specification states&lt;/a&gt; that “&lt;em&gt;A RSS feed may contain elements and attributes not described on this page, only if those elements and attributes are defined in a namespace.&lt;/em&gt;”. &lt;em&gt;Alrightey then&lt;/em&gt;, I needed to figure out how to establish a &lt;strong&gt;namespace&lt;/strong&gt; and put custom elements in it. Enter the &lt;a href=&quot;https://shellsharks.com/feeds/shark-namespace&quot;&gt;“&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shark&lt;/code&gt;” namespace&lt;/a&gt;. After much trial-and-error, I finally figured out how to establish the namespace, initialize a variable element in the &lt;em&gt;.xml&lt;/em&gt; &lt;a href=&quot;#rss-xml-file&quot;&gt;file&lt;/a&gt; and then reference it in the associated &lt;em&gt;.xslt&lt;/em&gt; &lt;a href=&quot;#rss-xsl-file&quot;&gt;file&lt;/a&gt;. This ultimately allowed me to keep what shows up in the actual RSS feed as the full-content, HTML-laden blob and what shows up in the web view as a clean, human-readable, excerpt of each post record. &lt;em&gt;Cool&lt;/em&gt;!&lt;/p&gt;

&lt;p&gt;There’s &lt;em&gt;a lot&lt;/em&gt; I still don’t understand about .xml &lt;a href=&quot;https://www.w3.org/1999/XSL/Transform&quot;&gt;namespaces&lt;/a&gt;, and &lt;a href=&quot;https://www.w3.org/TR/xslt20/#introduction&quot;&gt;XSLT&lt;/a&gt; in general. For now, I think I’ve figured out the bare minimum I need to, to solve this single issue. One notable, unexplained quirk that I encountered was that I needed to put my new &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;shark:summary&amp;gt;&lt;/code&gt; element &lt;em&gt;before&lt;/em&gt; the standard RSS &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;description&amp;gt;&lt;/code&gt; element or it just didn’t work. I’m sure there’s an explanation for that but I couldn’t tell you what it is (&lt;em&gt;yet&lt;/em&gt;).&lt;/p&gt;

&lt;h1 id=&quot;ongoing-rss-validation-issues&quot;&gt;Ongoing RSS Validation Issues&lt;/h1&gt;

&lt;p&gt;Full-content RSS feeds are great, for those who want that level of detail directly in their RSS clients. But having &lt;em&gt;that much&lt;/em&gt; &lt;u&gt;stuff&lt;/u&gt; jammed into the rather finicky &lt;a href=&quot;https://www.rssboard.org/rss-specification&quot;&gt;RSS protocol&lt;/a&gt; is a recipe for well, &lt;strong&gt;validation issues&lt;/strong&gt;. So, I’m going to create a running list of current validation issues for my RSS feeds here, and (hopefully) document how I ultimately address them. It’s worth pointing out that my feeds &lt;em&gt;appear&lt;/em&gt; to be working fine in the RSS clients I have tried out, despite these issues/errors. &lt;em&gt;But&lt;/em&gt;, I’d still like to fix them where possible.&lt;/p&gt;

&lt;p&gt;According to the &lt;a href=&quot;https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fshellsharks.com%2Ffeeds%2Ffeed.xml&quot;&gt;W3C Feed Validation Service&lt;/a&gt; I have a number of validation issues…&lt;/p&gt;

&lt;p&gt;Missing namespace for p (84 occurrences)&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;shark:summary&amp;gt;&amp;lt;p&amp;gt;Here’s another &amp;lt;em&amp;gt;Blog Questions Challenge&amp;lt;/em&amp;gt;.  ...&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I have a bunch of individual linstances ofo the following “invalid characther in a URI” error…
Invalid character in a URI: &lt;em&gt;]/whats-a-home-page&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;/description&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Missing namespace for div&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;shark:summary&amp;gt;&amp;lt;div class=&quot;poem&quot;&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendations.&lt;/p&gt;

&lt;p&gt;Use of unknown namespace: https://shellsharks.com—(LOL! They don’t like my sketchy &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shark&lt;/code&gt; namespace 🦈.)&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;rss version=&quot;2.0&quot; xmlns:atom=&quot;http://www.w3.org/2005/Atom&quot; xmlns:shark=&quot;htt ...&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;description should not contain relative URL references: #silliest-souvenir (1330 occurrences)&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;/description&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Invalid HTML: Unexpected start tag (a) implies end tag (a). (3 occurrences)&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;description&amp;gt;&amp;amp;lt;p&amp;amp;gt;My site is over &amp;amp;lt;a href=&amp;amp;quot;https://shell ...&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;style attribute contains potentially dangerous content: color:var(–shellsharks-color);text-decoration:underline!important; (22 occurrences)&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;/shark:summary&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Non-html tag: svg (4 occurrences)&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;/shark:summary&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;description should not contain script tag (4 occurrences)&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;/shark:summary&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;description should not contain style tag (3 occurrences)&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;/shark:summary&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;description should not contain onkeyup attribute (3 occurrences)&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;/shark:summary&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;description should not contain onclick attribute (2 occurrences)&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;/shark:summary&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;All kinda interesting huh?… Well I’ll work through these as I have time. In the meantime, if you know how to address any of these, or you’re seeing &lt;em&gt;actual&lt;/em&gt; impact on a feed in your client, &lt;em&gt;please&lt;/em&gt; &lt;a href=&quot;mailto:mike@shellsharks.com&quot;&gt;reach out&lt;/a&gt; so I can fix them ASAP!&lt;/p&gt;
</description>
        <pubDate>Wed, 19 Mar 2025 16:01:00 -0400</pubDate>
        <link>https://shellsharks.com/devlog/rsscaping</link>
        <guid isPermaLink="true">https://shellsharks.com/devlog/rsscaping</guid>
        
        <category>devlog</category>
        
      </item>
    
      <item>
        <title>The Changelog</title>
        <author>mike@shellsharks.com (Mike)</author>
        <shark:summary><p>How I’ve built the <a href="/changelog">Changelog</a> on my site. The Changelog is a day-by-day list of changes to the site. It is something I manually update and includes many, but not all, changes. I tend to call out content changes to individual blog posts, but typically avoid listing out each and every little modification to other bits of the site’s code. It serves as an easy way for me to capture updates to the site that wouldn’t otherwise be explicitly mentioned.</p>
</shark:summary>
        <description>&lt;p&gt;How I’ve built the &lt;a href=&quot;https://shellsharks.com/changelog&quot;&gt;Changelog&lt;/a&gt; on my site. The Changelog is a day-by-day list of changes to the site. It is something I manually update and includes many, but not all, changes. I tend to call out content changes to individual blog posts, but typically avoid listing out each and every little modification to other bits of the site’s code. It serves as an easy way for me to capture updates to the site that wouldn’t otherwise be explicitly mentioned.&lt;/p&gt;

&lt;p&gt;The changelog is built using two separate constructs, a collection of &lt;u&gt;weekly&lt;/u&gt; &lt;em&gt;changes&lt;/em&gt; files and the &lt;em&gt;changelog&lt;/em&gt; file itself. An example of the &lt;em&gt;changes&lt;/em&gt; file front matter and markdown is shown below.&lt;/p&gt;

&lt;div class=&quot;language-markdown highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;
---&lt;/span&gt;
layout: page
title: Weekly Changes 3/17/25-3/23/25
description: Changes made March 17, 2025 - March 23, 2025
date: 2025-03-17 00:00:00 -0500
&lt;span class=&quot;gh&quot;&gt;updated: 2025-03-17 23:54:00 -0400
---
&lt;/span&gt;
&lt;span class=&quot;gu&quot;&gt;###### March 17, 2025&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt; List
&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt; of
&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt; changes
&lt;span class=&quot;p&quot;&gt;-&lt;/span&gt; here

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;To pull in each of the weekly &lt;em&gt;changes&lt;/em&gt; files, the following Liquid code is employed. Pretty simple actually!&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
{% assign changes = site.changes | sort: &quot;date&quot; | reverse %}
{% assign latest = changes | first %}

&lt;span class=&quot;nt&quot;&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Changelog&lt;span class=&quot;nt&quot;&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
Last Update: &lt;span class=&quot;nt&quot;&gt;&amp;lt;i&amp;gt;&lt;/span&gt;{{latest.updated | date: &apos;%B %-d, %Y | %l:%M %p %:z&apos;}}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/i&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;hr/&amp;gt;&lt;/span&gt;

{% for change in paginator.posts %}
{{ change.content }}
{% endfor %}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;That’s it!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In the future, It’d be nice if this log could be dynamically populated with things like net new content. Content changes to existing, posts would either still need to be manually updated here, or &lt;em&gt;maybe&lt;/em&gt; even exist in per-post change logs.&lt;/p&gt;

</description>
        <pubDate>Mon, 17 Mar 2025 23:54:00 -0400</pubDate>
        <link>https://shellsharks.com/devlog/the-changelog</link>
        <guid isPermaLink="true">https://shellsharks.com/devlog/the-changelog</guid>
        
        <category>devlog</category>
        
      </item>
    
      <item>
        <title>Mastodon Auto-PESOS</title>
        <author>mike@shellsharks.com (Mike)</author>
        <shark:summary><p>As someone who has fully embraced the <a href="/indieweb">IndieWeb</a>, <a href="/notes/2025/01/16/the-magic-of-pesos">owning my data</a> and maintaining a canonical <em><a href="/notes/2023/08/16/your-website-your-identity">identity</a></em> on the web is very important. Though I operate a lot of my online life directly out of my website, it doesn’t mean I don’t participate in other social networks. What I don’t want is for my ‘content’ to live solely within any external platform, silo or walled garden. Finding a way to <a href="/notes/2025/02/05/save-your-links">archive</a> or otherwise make this content available on my own site mitigates this. <strong><a href="https://indieweb.org/PESOS">PESOS</a></strong> (i.e. “Publish Elsewhere Syndicate (to your) Own Site”) or what I like to call “<a href="/notes/2024/04/02/reverse-syndication-pesos">reverse syndication</a>” is the practice of archiving content that is originally posted elsewhere on the web, back to your site - the single source of origin. The problem is, if a lot of your content <em>originates</em> outside your site, you have to either deal with the overhead of manually archiving it, <em>or</em>, find a way to automatically do it. Here, I talk about how I (<em>finally</em>) found a way to <em>semi</em>-auto-PESOS select <a href="https://shellsharks.social/@shellsharks">Mastodon</a> posts to the site.</p>
</shark:summary>
        <description>&lt;p&gt;As someone who has fully embraced the &lt;a href=&quot;https://shellsharks.com/indieweb&quot;&gt;IndieWeb&lt;/a&gt;, &lt;a href=&quot;https://shellsharks.com/notes/2025/01/16/the-magic-of-pesos&quot;&gt;owning my data&lt;/a&gt; and maintaining a canonical &lt;em&gt;&lt;a href=&quot;https://shellsharks.com/notes/2023/08/16/your-website-your-identity&quot;&gt;identity&lt;/a&gt;&lt;/em&gt; on the web is very important. Though I operate a lot of my online life directly out of my website, it doesn’t mean I don’t participate in other social networks. What I don’t want is for my ‘content’ to live solely within any external platform, silo or walled garden. Finding a way to &lt;a href=&quot;https://shellsharks.com/notes/2025/02/05/save-your-links&quot;&gt;archive&lt;/a&gt; or otherwise make this content available on my own site mitigates this. &lt;strong&gt;&lt;a href=&quot;https://indieweb.org/PESOS&quot;&gt;PESOS&lt;/a&gt;&lt;/strong&gt; (i.e. “Publish Elsewhere Syndicate (to your) Own Site”) or what I like to call “&lt;a href=&quot;https://shellsharks.com/notes/2024/04/02/reverse-syndication-pesos&quot;&gt;reverse syndication&lt;/a&gt;” is the practice of archiving content that is originally posted elsewhere on the web, back to your site - the single source of origin. The problem is, if a lot of your content &lt;em&gt;originates&lt;/em&gt; outside your site, you have to either deal with the overhead of manually archiving it, &lt;em&gt;or&lt;/em&gt;, find a way to automatically do it. Here, I talk about how I (&lt;em&gt;finally&lt;/em&gt;) found a way to &lt;em&gt;semi&lt;/em&gt;-auto-PESOS select &lt;a href=&quot;https://shellsharks.social/@shellsharks&quot;&gt;Mastodon&lt;/a&gt; posts to the site.&lt;/p&gt;

&lt;p&gt;Traditionally, my &lt;a href=&quot;https://shellsharks.com/syndication-strategy&quot;&gt;syndication strategy&lt;/a&gt; has been very curated, and &lt;em&gt;very&lt;/em&gt; &lt;strong&gt;manual&lt;/strong&gt;. It’s time consuming to archive stuff I post elsewhere, and that overhead scales rapidly if I am generating a lot that originates not on my own site. It requires that I, A. &lt;a href=&quot;https://shellsharks.com/notes/2025/01/28/remembering-to-pesos&quot;&gt;remember&lt;/a&gt; to archive it at all, and B. that I make nuanced decisions about whether something is &lt;em&gt;worth&lt;/em&gt; archiving to begin with. That threshold for whether something is worth it or not can vary depending on how lazy I am being, to be frank. If there was a way for me to automatically pull down posts, add the appropriate &lt;a href=&quot;#front-matter&quot;&gt;front-matter&lt;/a&gt; and use some logic to determine which posts I would actually &lt;a href=&quot;#what-to-archive&quot;&gt;want to bring back&lt;/a&gt; to my site, that would save me a lot of time! Not only that, but there would be things that could make it to my site that I traditionally wouldn’t have bothered to try and manually bring over. &lt;em&gt;Awesome!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Setting PESOS and data ownership aside for a second though, a big &lt;a href=&quot;https://shellsharks.com/notes/2024/04/08/the-activity-feed&quot;&gt;motivator&lt;/a&gt; for me wanting to pull in content from around the Internet was &lt;a href=&quot;https://www.mollywhite.net/feed&quot;&gt;Molly White’s Activity feed&lt;/a&gt;. I loved the idea of just having that composite feed of everything I was up to all in one &lt;a href=&quot;https://shellsharks.com/creating-an-activity-feed&quot;&gt;mega timeline&lt;/a&gt;. Bringing in Mastodon posts as I explain in this devlog is one piece to that ultimate indieweb-puzzle.&lt;/p&gt;

&lt;hr class=&quot;fin&quot; /&gt;

&lt;h1 id=&quot;mastodon-markdown-archive&quot;&gt;Mastodon markdown archive&lt;/h1&gt;

&lt;p&gt;I’ve had this dream of automating the &lt;a href=&quot;https://shellsharks.com/notes/2024/04/02/reverse-syndication-pesos&quot;&gt;reverse-syndication&lt;/a&gt; of my &lt;a href=&quot;https://shellsharks.com/syndication-strategy&quot;&gt;Mastodon&lt;/a&gt; posts since April(&lt;em&gt;ish&lt;/em&gt;) of 2024, and had searched for ways to pull in this content off and on since then. Recently though, I came across this post, “&lt;u&gt;&lt;a href=&quot;https://garrido.io/notes/archiving-and-syndicating-mastodon-posts/&quot;&gt;Archiving and syndicating Mastodon posts&lt;/a&gt;&lt;/u&gt;”, which seemed to exactly meet my needs. &lt;sup id=&quot;fnref:1&quot;&gt;&lt;a href=&quot;#fn:1&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot; role=&quot;doc-noteref&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; So, I cloned down the &lt;a href=&quot;https://git.garrido.io/gabriel/mastodon-markdown-archive&quot;&gt;repo&lt;/a&gt; and tried it out! &lt;sup id=&quot;fnref:2&quot;&gt;&lt;a href=&quot;#fn:2&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot; role=&quot;doc-noteref&quot;&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;It didn’t go well&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I was getting an incomprehensible traceback and wasn’t sure how to troubleshoot. I thought, maybe it could be the version? So I tried a downgraded version and still no dice. Finally, I went back and actually re-read &lt;a href=&quot;https://garrido.io/notes/archiving-and-syndicating-mastodon-posts/&quot;&gt;the original post&lt;/a&gt; and tried to follow slowly, step-by-step, and sure enough, it was something pretty simple that was the issue (&lt;em&gt;isn’t it always?&lt;/em&gt;). &lt;a href=&quot;https://garrido.io/about/&quot;&gt;Gabriel&lt;/a&gt; makes it pretty clear that the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dist&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user&lt;/code&gt; flags are &lt;u&gt;required&lt;/u&gt;, and sure enough, &lt;em&gt;they super are&lt;/em&gt;. I won’t dock any points from Gabriel for not handling those errors gracefully, after all, this is freely available and otherwise the script works great!&lt;/p&gt;

&lt;h2 id=&quot;planning-and-mechanics&quot;&gt;Planning and Mechanics&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;OK&lt;/em&gt;, so I’ve proved that I can get &lt;a href=&quot;https://git.garrido.io/gabriel/mastodon-markdown-archive&quot;&gt;the script&lt;/a&gt; to work, now I needed to figure a few things out…&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;#what-to-archive&quot;&gt;&lt;i class=&quot;ph ph-link-simple-horizontal&quot;&gt;&lt;/i&gt;&lt;/a&gt; What posts did I want to pull in? (e.g. boosts, replies, public-only, etc…)&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#notes&quot;&gt;&lt;i class=&quot;ph ph-link-simple-horizontal&quot;&gt;&lt;/i&gt;&lt;/a&gt; Where do I want these posts to live on my site?&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#front-matter&quot;&gt;&lt;i class=&quot;ph ph-link-simple-horizontal&quot;&gt;&lt;/i&gt;&lt;/a&gt; What front matter is important to populate for these posts? What data is available in the .json output for each post?&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#site-tweaks&quot;&gt;&lt;i class=&quot;ph ph-link-simple-horizontal&quot;&gt;&lt;/i&gt;&lt;/a&gt; Do I need to tweak any of my existing code to accomodate the posts pulled in via this script?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;what-to-archive&quot;&gt;What to Archive?&lt;/h3&gt;

&lt;p&gt;The first challenge was part technical and part &lt;em&gt;philosophical&lt;/em&gt;. &lt;b&gt;What do I &lt;i&gt;really&lt;/i&gt; want to archive&lt;/b&gt;? To start, I knew I didn’t care to archive my boosts/reblogs, so I can easily tune those out with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--exclude-reblogs&lt;/code&gt; flag. What about replies? Well I write a lot of (&lt;em&gt;in my mind&lt;/em&gt;) great, well-thought-out replies, with info I’d love to hold on to and refer back to later. In fact, I’ve manually reverse-syndicated &lt;em&gt;a lot&lt;/em&gt; of this kind of post in the past. So I knew I needed replies, just not &lt;em&gt;all&lt;/em&gt; of them. The overwhelming majority of my reply posts are short little comments that when I thought about it, weren’t really anything I cared to bring back to my site. Especially in a &lt;a href=&quot;#notes&quot;&gt;format&lt;/a&gt; that is &lt;a href=&quot;https://shellsharks.com/devlog/site-search&quot;&gt;site-searchable&lt;/a&gt; and would certainly junk up other parts of the site (e.g. &lt;a href=&quot;https://shellsharks.com/tags&quot;&gt;tags&lt;/a&gt; page, &lt;a href=&quot;https://shellsharks.com/search&quot;&gt;search&lt;/a&gt; results, RSS &lt;a href=&quot;https://shellsharks.com/feeds&quot;&gt;feeds&lt;/a&gt;, etc…)&lt;/p&gt;

&lt;p&gt;I knew I would need to clean up any mass-export of posts that included replies, so to start I just &lt;a href=&quot;https://garrido.io/notes/archiving-and-syndicating-mastodon-posts/#creating-the-archive&quot;&gt;created the full archive&lt;/a&gt; to see how many posts there were in total. The result was over 1000 and it became clear that I &lt;u&gt;wasn&apos;t&lt;/u&gt; going to manually review each of those to see what was worth keeping. &lt;em&gt;I needed a new approach&lt;/em&gt;. So, I decided to instead bring down just posts that I had marked &lt;strong&gt;public&lt;/strong&gt;. More recently, when I post on Mastodon I’ve given more thought to whether that post should be marked as ‘&lt;a href=&quot;https://docs.joinmastodon.org/user/posting/#public&quot;&gt;public&lt;/a&gt;’ or ‘&lt;a href=&quot;https://docs.joinmastodon.org/user/posting/#unlisted&quot;&gt;quiet public&lt;/a&gt;’ (i.e. ‘unlisted’). This foresight would pay off now as I wanted to only bring over a select few things that I felt were worthy of being public/exposed on my site. The problem is, I haven’t &lt;em&gt;always&lt;/em&gt; been this mindful about what visibilty setting I post under. &lt;em&gt;But it would have to do for now&lt;/em&gt;. So, how many posts did I have that were in fact &lt;em&gt;public&lt;/em&gt;? Creating the filtered archive yielded only a few hundred posts - &lt;em&gt;much more manageable&lt;/em&gt; to manually review. The compromise now was that &lt;em&gt;maybe&lt;/em&gt; I’d miss a good reply that I had marked as &lt;em&gt;unlisted&lt;/em&gt; some time ago, but I’ve done a decent enough job manually syndicating things I thought were worth keeping for a good while now so I’m &lt;em&gt;OK&lt;/em&gt; if maybe I missed something.&lt;/p&gt;

&lt;p&gt;Below are the flags I used to create my complete post archive of public toots (included replies).&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
go run main.go &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--user&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;https://shellsharks.social/@shellsharks &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--dist&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;./[OUTPUT FOLDER] &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--exclude-reblogs&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--filename&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;{{.Post.CreatedAt | date &quot;2006-01-02&quot;}}-shellsharks.social-{{.Post.Id}}.md&apos;&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--porcelain&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--persist-last&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;./last &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--max-id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;test&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; ./last &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;cat&lt;/span&gt; ./last &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--visibility&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;public

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;After clicking through each of the exported posts, I whittled the list down from 200-&lt;em&gt;ish&lt;/em&gt; to about &lt;em&gt;50&lt;/em&gt; posts. &lt;em&gt;Not bad&lt;/em&gt;! Though it makes you wonder how important/worth it all of this effort is if I’m only interested in saving 50 things from nearly a year’s worth of tootin’. But, this last year I have also done a lot of manual reverse-syndicating which softened how many I needed to import now. 🤷‍♂️&lt;/p&gt;

&lt;p&gt;Moving forward, I’ll have to be thoughtful about what I mark as &lt;em&gt;unlisted&lt;/em&gt; vs. what I mark as &lt;em&gt;public&lt;/em&gt;. Anything &lt;em&gt;public&lt;/em&gt; &lt;u&gt;will&lt;/u&gt; come to my site.&lt;/p&gt;

&lt;p&gt;This is what my command looks like to import just the &lt;u&gt;latest&lt;/u&gt; &lt;em&gt;public&lt;/em&gt; posts…&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
go run main.go &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--user&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;https://shellsharks.social/@shellsharks &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--dist&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/[DESTINATION DIR] &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--exclude-reblogs&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--filename&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;{{.Post.CreatedAt | date &quot;2006-01-02&quot;}}-shellsharks.social-{{.Post.Id}}.md&apos;&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--porcelain&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--persist-first&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;./first &lt;span class=&quot;nt&quot;&gt;--since-id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;test&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; ./first &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;cat&lt;/span&gt; ./first &lt;span class=&quot;o&quot;&gt;||&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;--visibility&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;public

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;notes&quot;&gt;Notes&lt;/h3&gt;

&lt;p&gt;The second question was, &lt;em&gt;where&lt;/em&gt; should these auto-syndicated posts live? In the original plan for my site, the &lt;a href=&quot;https://shellsharks.com/notebook&quot;&gt;Notes&lt;/a&gt; section was meant to house microblogs / social media posts, but I wasn’t sure I &lt;em&gt;really&lt;/em&gt; wanted these auto-syndicated toots to &lt;em&gt;junk&lt;/em&gt; up that timeline. In practice, the way I’ve used the notes feed has been for content I thought was “lower quality” than what was in my posts feed (e.g. shorter-form, less-researched, etc…). In hindsight, this was the &lt;u&gt;wrong&lt;/u&gt; way to think about the notes feed. Over time, this approach resulted in me publishing a lot of things as Notes that should have just been &lt;em&gt;Posts&lt;/em&gt; all along. This meant that my Notes feed had become HIGHER quality than I had intended it to be. So, rather than create yet &lt;em&gt;another&lt;/em&gt; feed for these toots, I decided to revert back to the original, correct mode of thinking and house these toots as Notes on my site. Moving forward I plan to be less stingy about what I publish as a ‘Post’ and much less &lt;a href=&quot;https://shellsharks.com/notes/2025/01/29/publish-with-pride&quot;&gt;precious&lt;/a&gt; about what gets ‘Note’ status. If there was anything ‘lower quality’ than that, it probably doesn’t need to exist on my site.&lt;/p&gt;

&lt;p&gt;It’s also worth mentioning that my notes &lt;em&gt;layout&lt;/em&gt; was built with a social media post design in mind from the beginning. So, it definitely made sense in the end to just bring these toots in as notes and have them live directly within my &lt;a href=&quot;https://shellsharks.com/notebook&quot;&gt;notebook&lt;/a&gt; feed.&lt;/p&gt;

&lt;div style=&quot;max-width:650px; margin: auto; font-size:.85em;&quot;&gt;

&lt;article class=&quot;post h-entry&quot;&gt;

    &lt;div id=&quot;ncard&quot; class=&quot;containbox&quot; style=&quot;margin:auto; position:relative; margin-top: 20px; margin-bottom:20px; width:100%; background-color: color-mix(in srgb, var(--mastodon-color) 10%, var(--background-color));&quot;&gt;
      
      
        &lt;div style=&quot;float:left;&quot;&gt;&lt;a href=&quot;https://shellsharks.social/@shellsharks&quot; class=&quot;p-author&quot;&gt;&lt;img class=&quot;profilepic&quot; src=&quot;https://shellsharks-images.s3.amazonaws.com/surfshark.png&quot; width=&quot;60&quot; alt=&quot;author-image&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
        &lt;div style=&quot;float:left;&quot;&gt;&lt;span id=&quot;author&quot; style=&quot;font-weight:bold;&quot;&gt;shellsharks&lt;/span&gt;&lt;br /&gt;&lt;span id=&quot;handle&quot; style=&quot;color:var(--light-font-color);&quot;&gt;@shellsharks&lt;/span&gt;&lt;/div&gt;
      
      &lt;div style=&quot;float:right;padding:10px 0px 0px 0px;&quot;&gt;&lt;i class=&quot;ph ph-calendar-dot&quot;&gt;&lt;/i&gt; &lt;span id=&quot;date&quot; style=&quot;font-size:0.75em;&quot; class=&quot;dt-published&quot;&gt;3/22/24 23:31&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
    
      &lt;div class=&quot;post-content e-content&quot;&gt;
      &lt;p&gt;Alright fedi’, spit a ‘verse, drop some knowledge.&lt;/p&gt;


      &lt;/div&gt;
      &lt;div style=&quot;bottom:-5px; text-align:right;font-size:0.75em;&quot;&gt;&lt;i class=&quot;ph ph-pencil&quot;&gt;&lt;/i&gt; 8&lt;/div&gt;
    
    &lt;hr style=&quot;opacity:35%;margin-top: 10px;margin-bottom: 10px;width:75%;&quot; /&gt;

    &lt;div id=&quot;info&quot; class=&quot;wrapper&quot;&gt;
      &lt;div class=&quot;box 1&quot; style=&quot;background-color:color-mix(in srgb, var(--mastodon-color) 10%, var(--background-color));&quot;&gt;
    
    
    &lt;div&gt;&lt;i class=&quot;ph ph-map-pin-area&quot; title=&quot;Posted from&quot;&gt;&lt;/i&gt; &lt;span id=&quot;posted-from&quot; style=&quot;font-size:0.75em;&quot;&gt;Ivory for iOS&lt;/span&gt;&lt;/div&gt;
    
    
      &lt;div&gt;&lt;i class=&quot;ph ph-broadcast&quot;&gt;&lt;/i&gt;&lt;span style=&quot;font-size:0.75em;&quot;&gt; Syndication:&lt;/span&gt;&lt;/div&gt;
      &lt;div style=&quot;font-size:1.5em;&quot;&gt;&lt;span id=&quot;syndicate-to&quot;&gt;
      
      &lt;span style=&quot;padding:0px 3px 0px 3px;&quot;&gt;&lt;a href=&quot;https://shellsharks.social/users/shellsharks/statuses/112142889817441762&quot;&gt;&lt;i class=&quot;ph ph-mastodon-logo&quot; title=&quot;Mastodon&quot;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;
      
      &lt;/span&gt;&lt;/div&gt;
    
  &lt;/div&gt;
  
  &lt;div class=&quot;box2&quot; style=&quot;bottom:0;&quot;&gt;
    &lt;div style=&quot;text-align:right; padding:5px 5px 5px 5px;&quot;&gt;&lt;a class=&quot;u-url&quot; href=&quot;https://shellsharks.com/notes/2024/03/22/spit-a-verse-drop-some-knowledge&quot;&gt;&lt;i class=&quot;ph ph-link&quot; title=&quot;Permalink&quot;&gt;&lt;/i&gt;&lt;/a&gt; &lt;a href=&quot;https://shellsharks.com/notebook&quot;&gt;&lt;i class=&quot;ph ph-book-open&quot; title=&quot;Notebook&quot;&gt;&lt;/i&gt;&lt;/a&gt; &lt;a href=&quot;https://shellsharks.com/&quot;&gt;&lt;i class=&quot;ph ph-house&quot; title=&quot;Home&quot;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/div&gt;
    
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/article&gt;

&lt;/div&gt;

&lt;style&gt;
    .wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    }
    img {max-width:100%}
  &lt;/style&gt;

&lt;p&gt;This said, they were’nt given &lt;em&gt;full&lt;/em&gt; rights and visibility across the blog (&lt;em&gt;at least not for now&lt;/em&gt;), as I’ll explain &lt;a href=&quot;#site-tweaks&quot;&gt;later&lt;/a&gt;…&lt;/p&gt;

&lt;h3 id=&quot;front-matter&quot;&gt;Front Matter&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://shellsharks.com/notebook&quot;&gt;Notes&lt;/a&gt; on my site have their own unique layout and some specific front matter metadata. To make this whole effort worth it, I needed &lt;a href=&quot;https://git.garrido.io/gabriel/mastodon-markdown-archive&quot;&gt;the script&lt;/a&gt; to auto-populate as much of that metadata as possible. Thankfully, &lt;a href=&quot;https://garrido.io/about/&quot;&gt;Gabriel&lt;/a&gt; solutioned for this…&lt;/p&gt;

&lt;p&gt;This script supports a &lt;a href=&quot;https://git.garrido.io/gabriel/mastodon-markdown-archive&quot;&gt;templating construct&lt;/a&gt; (located here &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/mastodon-markdown-archive/files/templates&lt;/code&gt;) which allows you to customize front matter. It will convert hashtags to jekyll tags, populate created dates, author names, etc… &lt;a href=&quot;https://pkg.go.dev/git.garrido.io/gabriel/mastodon-markdown-archive/client&quot;&gt;This resource&lt;/a&gt; shows you some of the variables/data types you can work with from the .json export. Notably, I used the “&lt;a href=&quot;https://pkg.go.dev/git.garrido.io/gabriel/mastodon-markdown-archive/client#Account&quot;&gt;Account&lt;/a&gt;” and “&lt;a href=&quot;https://pkg.go.dev/git.garrido.io/gabriel/mastodon-markdown-archive/client#Post&quot;&gt;Post&lt;/a&gt;” types to further enrich my post front matter. Below I show some of the more relevant tweaks to the default &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;post.tmpl&lt;/code&gt; file…&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
layout: note
title: shellsharks.social {{.Post.CreatedAt | date &quot;1/2/06 15:04 MST&quot;}}
author: {{ .Post.Account.DisplayName }}
syndication: auto
syndicate-to:
- name: Mastodon
  url: {{ .Post.URI }}
  icon: ph ph-mastodon-logo
{{- if .Post.Application}}
posted-from: {{ .Post.Application.Name }}
{{- end}}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Customizing the date structure is super easy thanks to &lt;a href=&quot;https://docs.gomplate.ca/functions/time/&quot;&gt;gomplate&lt;/a&gt;, and it’s nice that I can import the ‘Application’ used to publish the post and have that represented in my notes front matter metadata.&lt;/p&gt;

&lt;h3 id=&quot;site-tweaks&quot;&gt;Site Tweaks&lt;/h3&gt;

&lt;p&gt;To make this all work correctly I had to tweak a &lt;em&gt;few things&lt;/em&gt; in my existing layouts and consider how this type of content would be fed into the various streams and feeds across the site.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;First&lt;/em&gt;, I excluded anything auto-syndicated from going into my &lt;a href=&quot;https://shellsharks.com/feeds&quot;&gt;RSS feeds&lt;/a&gt;. If you want to follow me on social media, you can do that, you can even subscribe to those RSS feeds directly. But I figured folks who subscribed to my blogs RSS didn’t need to have my exact social media posts fed into their RSS readers as well.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Second&lt;/em&gt;, a lot of these &lt;a href=&quot;https://shellsharks.com/notes/2024/04/02/reverse-syndication-pesos&quot;&gt;PESOS’ed&lt;/a&gt; toots do not have any hashtags, and thus do not come over with any tag front-matter. So I had to add a bit of logic on my &lt;a href=&quot;https://shellsharks.com/tags&quot;&gt;tags&lt;/a&gt; page to make sure tagless posts didn’t show up in the list.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Third&lt;/em&gt;, I added some additional logic to my activity streams on my home page to not show auto-syndicated toots. They &lt;em&gt;will&lt;/em&gt; show up in my “&lt;a href=&quot;https://shellsharks.com/#infosecstuff&quot;&gt;Infosec-Only&lt;/a&gt;” stream and in the “&lt;a href=&quot;https://shellsharks.com/#latest-note&quot;&gt;Latest Note&lt;/a&gt;” card however.&lt;/p&gt;

&lt;p&gt;For all of this logic to work however, I added a flag in the &lt;a href=&quot;#front-matter&quot;&gt;front matter&lt;/a&gt; for these notes - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;syndication: auto&lt;/code&gt;. If I want to have these notes show up in my feeds/streams later, I can easily remove that flag and regenerate the site.&lt;/p&gt;

&lt;p&gt;Overall though, my site handled the addition of these notes pretty well - with minimal re-engineering 😄.&lt;/p&gt;

&lt;h2 id=&quot;issues-and-the-future&quot;&gt;Issues and the Future&lt;/h2&gt;

&lt;p&gt;I’m happy with the &lt;em&gt;v1&lt;/em&gt; of this capability, I think it will save me a lot of time and bring in content I never had the time to import/archive in the past. &lt;em&gt;But&lt;/em&gt;, it isn’t without &lt;em&gt;some&lt;/em&gt; issues, and there’s a lot I’d like to improve on into the future.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Notes are brought in with no title, and reply posts are brought in without the OP context. I &lt;em&gt;might&lt;/em&gt; take time to retroactively go back and add this information in. Since I’m being pretty &lt;a href=&quot;#what-to-archive&quot;&gt;selective&lt;/a&gt; about what gets brought over, this shouldn’t be that big of a task.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;This script solves for my &lt;a href=&quot;https://shellsharks.social/@shellsharks&quot;&gt;Mastodon&lt;/a&gt; posts, but there’s a lot of other places I’d like to PESOS in a similar way (e.g. GoToSocial, Pixelfed, Bluesky, Reddit, Lemmy, etc…). Notably, this script does &lt;em&gt;not&lt;/em&gt; work for GoToSocial &lt;em&gt;or&lt;/em&gt; Pixelfed, so I’ll either need to tweak it myself, find a new solution, or whip up some script of my own to do it. Until then, I will continue to &lt;a href=&quot;https://shellsharks.com/syndication-strategy&quot;&gt;manually reverse-syndicate&lt;/a&gt; things I think are worth it.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;For now, I am running this script manually, rather than having it auto-run as a GitHub &lt;a href=&quot;https://garrido.io/notes/archiving-and-syndicating-mastodon-posts/#updating-the-archive&quot;&gt;action&lt;/a&gt; or cronjob on my local machine. In the future, I may want to automate it fully. If I do that, I’d like to find a way to &lt;a href=&quot;https://garrido.io/notes/archiving-and-syndicating-mastodon-posts/#integrating-with-the-site&quot;&gt;auto update&lt;/a&gt; my &lt;a href=&quot;https://shellsharks.com/changelog&quot;&gt;changelog&lt;/a&gt; as well to reflect new imported notes.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Finally, I’ve considered making a separate feed that truly mirrors my Fediverse feed, importing all posts. This feed would be entirely isolated from my &lt;a href=&quot;https://shellsharks.com/&quot;&gt;home page&lt;/a&gt; streams, &lt;a href=&quot;https://shellsharks.com/search&quot;&gt;search&lt;/a&gt;, &lt;a href=&quot;https://shellsharks.com/tags&quot;&gt;tags&lt;/a&gt;, &lt;a href=&quot;https://shellsharks.com/feeds&quot;&gt;RSS feeds&lt;/a&gt;, etc… It would literally just be a mirror of my &lt;a href=&quot;https://shellsharks.social/@shellsharks&quot;&gt;Mastodon&lt;/a&gt; toots. A project for another day…&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;resources&quot;&gt;Resources&lt;/h1&gt;

&lt;div class=&quot;footnotes&quot; role=&quot;doc-endnotes&quot;&gt;
  &lt;ol&gt;
    &lt;li id=&quot;fn:1&quot;&gt;
      &lt;p&gt;&lt;a href=&quot;https://garrido.io/notes/archiving-and-syndicating-mastodon-posts&quot;&gt;Archiving and syndicating Mastodon posts&lt;/a&gt; &lt;a href=&quot;#fnref:1&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:2&quot;&gt;
      &lt;p&gt;&lt;a href=&quot;https://git.garrido.io/gabriel/mastodon-markdown-archive&quot;&gt;mastodon-markdown-archive&lt;/a&gt; &lt;a href=&quot;#fnref:2&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
</description>
        <pubDate>Tue, 11 Mar 2025 11:32:00 -0400</pubDate>
        <link>https://shellsharks.com/devlog/mastodon-auto-pesos</link>
        <guid isPermaLink="true">https://shellsharks.com/devlog/mastodon-auto-pesos</guid>
        
        <category>devlog</category>
        
        <category>mastodon</category>
        
        <category>fediverse</category>
        
      </item>
    
      <item>
        <title>Site Search</title>
        <author>mike@shellsharks.com (Mike)</author>
        <shark:summary><p>I have a fair bit of content on my site. I’ve been writing for over <a href="/notes/2024/05/30/5-years">5 years</a> and at the time of this log have ~<strong>326</strong> individual posts. My site is, and has always been, first and foremost a reference for myself. To be useful, to <em>actually find stuff</em> across all these posts, I need some sort of <strong>search</strong> capability. Here’s a brief history of the search capability on <span class="shellsharks-com">shellsharks.com</span> and what I’d like to see search on this site do in the <a href="#search-wish-list">future</a>…</p>
</shark:summary>
        <description>&lt;p&gt;I have a fair bit of content on my site. I’ve been writing for over &lt;a href=&quot;https://shellsharks.com/notes/2024/05/30/5-years&quot;&gt;5 years&lt;/a&gt; and at the time of this log have ~&lt;strong&gt;326&lt;/strong&gt; individual posts. My site is, and has always been, first and foremost a reference for myself. To be useful, to &lt;em&gt;actually find stuff&lt;/em&gt; across all these posts, I need some sort of &lt;strong&gt;search&lt;/strong&gt; capability. Here’s a brief history of the search capability on &lt;span class=&quot;shellsharks-com&quot;&gt;shellsharks.com&lt;/span&gt; and what I’d like to see search on this site do in the &lt;a href=&quot;#search-wish-list&quot;&gt;future&lt;/a&gt;…&lt;/p&gt;

&lt;h1 id=&quot;classic-search&quot;&gt;Classic Search&lt;/h1&gt;

&lt;p&gt;When I &lt;a href=&quot;https://shellsharks.com/notes/2024/02/15/shellsharks-a-visual-history#shellsharks-10-may-2019&quot;&gt;first started&lt;/a&gt; the site, I picked a Jekyll &lt;a href=&quot;https://agusmakmun.github.io&quot;&gt;theme&lt;/a&gt; that had already implemented search (&lt;strong&gt;&lt;a href=&quot;https://github.com/chinchang/super-search&quot;&gt;super-search&lt;/a&gt;&lt;/strong&gt; to be specific). &lt;em&gt;Super search&lt;/em&gt; worked well enough, but in time I ran into some issues with it (&lt;em&gt;which I honestly don’t remember what they were&lt;/em&gt;) and needed to find a &lt;a href=&quot;#modern-search&quot;&gt;new search solution&lt;/a&gt;. I liked &lt;em&gt;super search&lt;/em&gt; because it displayed results dynamically as I typed my search query and it was decently fast/performant. From here, I went to &lt;a href=&quot;#modern-search&quot;&gt;Lunr&lt;/a&gt;.&lt;/p&gt;

&lt;h1 id=&quot;modern-search&quot;&gt;Modern Search&lt;/h1&gt;

&lt;p&gt;The modern &lt;a href=&quot;https://shellsharks.com/search&quot;&gt;search&lt;/a&gt; capability on my site uses &lt;a href=&quot;https://lunrjs.com&quot;&gt;Lunr&lt;/a&gt;.js. It was easy enough to get started with, static-site-generator-compatible, and was easily tunable to search across all my different &lt;a href=&quot;https://shellsharks.com/multiplicity-of-writing&quot;&gt;collection types&lt;/a&gt;. In practice, it works &lt;em&gt;ok&lt;/em&gt;. It’s not “dynamic” in the same way that &lt;a href=&quot;#classic-search&quot;&gt;super search was&lt;/a&gt;, and it’s a bit clunkier given that I have it on a dedicated search page and not in-line across the site, but it does a decent job surfacing what I am looking for using a &lt;a href=&quot;https://lunrjs.com/guides/searching.html#scoring&quot;&gt;BM25&lt;/a&gt;-based scoring system. Lunr supports &lt;a href=&quot;https://lunrjs.com/guides/searching.html#wildcards&quot;&gt;wildcards&lt;/a&gt;, &lt;a href=&quot;https://lunrjs.com/guides/searching.html#fields&quot;&gt;field-level&lt;/a&gt; search, search term &lt;a href=&quot;https://lunrjs.com/guides/searching.html#boosts&quot;&gt;boosting&lt;/a&gt;, &lt;a href=&quot;https://lunrjs.com/guides/searching.html#fuzzy-matches&quot;&gt;fuzzy matches&lt;/a&gt;, and logical &lt;a href=&quot;https://lunrjs.com/guides/searching.html#term-presence&quot;&gt;ANDs&lt;/a&gt;. It also has some &lt;a href=&quot;https://lunrjs.com/guides/customising.html&quot;&gt;customization&lt;/a&gt; and &lt;a href=&quot;https://lunrjs.com/guides/customising.html#plugins&quot;&gt;plugin&lt;/a&gt; capabilties, but I haven’t really toyed around with that (yet). All this said, it’s not perfect. There’s still a few things that my &lt;a href=&quot;#search-wish-list&quot;&gt;perfect vision of search&lt;/a&gt; would be able to do…&lt;/p&gt;

&lt;p&gt;The only thing I’ve really tinkered with related to Lunr is how I am &lt;a href=&quot;https://lunrjs.com/guides/getting_started.html#creating-an-index&quot;&gt;constructing my page index&lt;/a&gt;. Below is the (&lt;em&gt;very ugly&lt;/em&gt;) code that I have on my search page for creating the index. Notably, it specifies which pages are excluded from the index and then what front matter and body content is included across each collection type.&lt;/p&gt;

&lt;h3 id=&quot;creating-the-lunr-search-index&quot;&gt;Creating the Lunr Search Index&lt;/h3&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;assign&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;documents&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;page&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;site&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;pages&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;.xml&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;assets&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;.json&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;.xsl&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;- page&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;/page/&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;tags&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;nosearch&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}},&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{{ site.url }}{{ page.url }}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{{ page.title }}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{{ page.content | markdownify | replace: &apos;.&apos;, &apos;. &apos; | replace: &apos;&amp;lt;/h2&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/h3&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/h4&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/p&amp;gt;&apos;, &apos; &apos; | strip_html | strip_newlines | replace: &apos;  &apos;, &apos; &apos; | replace: &apos;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; }}&quot;{% assign counter = counter | plus: 1 %}
    }, {% endif %}{% endfor %}{% for page in site.without-plugin %}{
    &quot;id&quot;: {{ counter }},
    &quot;url&quot;: &quot;{{ site.url }}{{ page.url }}&quot;,
    &quot;title&quot;: &quot;{{ page.title }}&quot;,
    &quot;body&quot;: &quot;{{ page.content | markdownify | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/h2&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;h3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/h4&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | strip_html | strip_newlines | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;  &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&apos;, &apos; &apos; }}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;assign&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;plus&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;endfor&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;page&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;site&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;posts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}},&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{{ site.url }}{{ page.url }}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{{ page.title }}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{{ page.date | date: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/%&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/%&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; }} - {{ page.content | markdownify | replace: &apos;.&apos;, &apos;. &apos; | replace: &apos;&amp;lt;/h2&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/h3&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/h4&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/p&amp;gt;&apos;, &apos; &apos; | strip_html | strip_newlines | replace: &apos;  &apos;, &apos; &apos; | replace: &apos;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; }}&quot;{% assign counter = counter | plus: 1 %}
    }, {% endfor %}{% for page in site.notes %}{% if page.tags contains &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;nosearch&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; %}{% else %}{
    &quot;id&quot;: {{ counter }},
    &quot;url&quot;: &quot;{{ site.url }}{{ page.url }}&quot;,
    &quot;title&quot;: &quot;{{ page.title }}&quot;,
    &quot;body&quot;: &quot;{{ page.date | date: &quot;%Y/%m/%d&quot; }} - {{ page.content | markdownify | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/h2&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;h3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/h4&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | strip_html | strip_newlines | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;  &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&apos;, &apos; &apos; }}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;assign&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;plus&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;endif&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;endfor&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;page&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;site&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;captain_logs&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}},&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{{ site.url }}{{ page.url }}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{{ page.title }}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{{ page.date | date: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/%&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/%&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; }} - {{ page.content | markdownify | replace: &apos;.&apos;, &apos;. &apos; | replace: &apos;&amp;lt;/h2&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/h3&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/h4&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/p&amp;gt;&apos;, &apos; &apos; | strip_html | strip_newlines | replace: &apos;  &apos;, &apos; &apos; | replace: &apos;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; }}&quot;{% assign counter = counter | plus: 1 %}
    }, {% endfor %}{% for page in site.scrolls %}{
    &quot;id&quot;: {{ counter }},
    &quot;url&quot;: &quot;{{ site.url }}{{ page.url }}&quot;,
    &quot;title&quot;: &quot;{{ page.title }}&quot;,
    &quot;body&quot;: &quot;{{ page.date | date: &quot;%Y/%m/%d&quot; }} - {{ page.content | markdownify | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/h2&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;h3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/h4&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | strip_html | strip_newlines | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;  &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&apos;, &apos; &apos; }}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;assign&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;plus&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;endfor&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;page&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;site&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;links&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;tags&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;contains&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;nosearch&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{{&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}},&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{{ page.link }}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{{ page.title }}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;{{ page.date | date: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Y&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/%&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;m&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;/%&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; }} - {{ page.content | markdownify | replace: &apos;.&apos;, &apos;. &apos; | replace: &apos;&amp;lt;/h2&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/h3&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/h4&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/p&amp;gt;&apos;, &apos; &apos; | strip_html | strip_newlines | replace: &apos;  &apos;, &apos; &apos; | replace: &apos;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; }}&quot;{% assign counter = counter | plus: 1 %}
    }, {% endif %}{% endfor %}{% for page in site.devlogs %}{
    &quot;id&quot;: {{ counter }},
    &quot;url&quot;: &quot;{{ site.url }}{{ page.url }}&quot;,
    &quot;title&quot;: &quot;{{ page.title }}&quot;,
    &quot;body&quot;: &quot;{{ page.date | date: &quot;%Y/%m/%d&quot; }} - {{ page.content | markdownify | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/h2&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;h3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/h4&amp;gt;&apos;, &apos;: &apos; | replace: &apos;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | strip_html | strip_newlines | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;  &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;, &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt; | replace: &lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&apos;, &apos; &apos; }}&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;assign&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;plus&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;forloop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;last&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;endif&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}{&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;endfor&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}];&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;web-search&quot;&gt;Web Search&lt;/h2&gt;

&lt;p&gt;I think having a &lt;em&gt;native&lt;/em&gt; search capability on your site is very important, but I can’t dismiss the potential value of a traditional web search. Look, Google and other web search providers aren’t what they used to be, that’s undeniable. But, you can go on Google right now and do a good ol’ fashioned “&lt;a href=&quot;https://www.google.com/search?q=site%3Ashellsharks.com&quot;&gt;site:shellsharks.com&lt;/a&gt;” search and pull back actual results from my site. So yeah, in a pinch, if your site is indexed by Google, or other search engines, you can fall back on that for search.&lt;/p&gt;

&lt;h1 id=&quot;next-generation-search&quot;&gt;Next-Generation Search&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Alright&lt;/em&gt;, let me chat a bit about what I’d like to see in future versions of my sites search capability. I’ve got a wishlist below actually…&lt;/p&gt;

&lt;h6 id=&quot;search-wish-list&quot;&gt;Search Wish List&lt;/h6&gt;

&lt;ul&gt;
  &lt;li&gt;Searches across all pages of my site, but customizable so I can limit based on front matter (e.g. tag), or collection type (e.g. link)&lt;/li&gt;
  &lt;li&gt;Performant&lt;/li&gt;
  &lt;li&gt;Regex-capable&lt;/li&gt;
  &lt;li&gt;Supports boolean logic (i.e. AND, OR, NOT, etc…)&lt;/li&gt;
  &lt;li&gt;Can be put in-line in the header, rather than having to load into the separate &lt;a href=&quot;https://shellsharks.com/search&quot;&gt;/search&lt;/a&gt; page&lt;/li&gt;
  &lt;li&gt;Dynamically loads results (you don’t have to “submit” the queries) as you enter search terms&lt;/li&gt;
  &lt;li&gt;Search results return not only the page which matches the search term, but also a snippet from that page with the terms highlighted&lt;/li&gt;
  &lt;li&gt;The ability to filter results based on a number of criteria (e.g. date, collection, tag, etc…)&lt;/li&gt;
  &lt;li&gt;No server-side requirement (preferably)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yep, that’s it. Put search on your site!!&lt;/p&gt;
</description>
        <pubDate>Tue, 04 Mar 2025 14:02:00 -0500</pubDate>
        <link>https://shellsharks.com/devlog/site-search</link>
        <guid isPermaLink="true">https://shellsharks.com/devlog/site-search</guid>
        
        <category>devlog</category>
        
      </item>
    
      <item>
        <title>Build Then Smile</title>
        <author>mike@shellsharks.com (Mike)</author>
        <shark:summary><p>Having a personal website is <em>incredibly</em> rewarding. It’s not always easy, but that’s what makes it all the more satisfying - seeing what you’ve worked so hard on, what you yourself have <strong>built</strong>, come to life on the web. Here’s a list of the things I am most proud of on this site.</p>
</shark:summary>
        <description>&lt;p&gt;Having a personal website is &lt;em&gt;incredibly&lt;/em&gt; rewarding. It’s not always easy, but that’s what makes it all the more satisfying - seeing what you’ve worked so hard on, what you yourself have &lt;strong&gt;built&lt;/strong&gt;, come to life on the web. Here’s a list of the things I am most proud of on this site.&lt;/p&gt;

&lt;p&gt;(Listed &lt;em&gt;kinda&lt;/em&gt; chronologically, in the order it was added to the site.)&lt;/p&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#the-artwork&quot; id=&quot;markdown-toc-the-artwork&quot;&gt;The Artwork&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#designer-vulnerabilities&quot; id=&quot;markdown-toc-designer-vulnerabilities&quot;&gt;Designer Vulnerabilities&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#the-enchiridion-of-impetus-exemplar&quot; id=&quot;markdown-toc-the-enchiridion-of-impetus-exemplar&quot;&gt;The Enchiridion of Impetus Exemplar&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#hamburger-menu&quot; id=&quot;markdown-toc-hamburger-menu&quot;&gt;Hamburger Menu&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#theme-toggle&quot; id=&quot;markdown-toc-theme-toggle&quot;&gt;Theme Toggle&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#activity-feed&quot; id=&quot;markdown-toc-activity-feed&quot;&gt;Activity Feed&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#note-card&quot; id=&quot;markdown-toc-note-card&quot;&gt;Note Card&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#style-page&quot; id=&quot;markdown-toc-style-page&quot;&gt;Style Page&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#scrolls&quot; id=&quot;markdown-toc-scrolls&quot;&gt;Scrolls&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#home-page-circa-2025&quot; id=&quot;markdown-toc-home-page-circa-2025&quot;&gt;Home Page (circa 2025)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#shark-fin-hr&quot; id=&quot;markdown-toc-shark-fin-hr&quot;&gt;Shark Fin &amp;lt;hr&amp;gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;the-artwork&quot;&gt;The Artwork&lt;/h2&gt;

&lt;p&gt;I &lt;span class=&quot;shellsharks&quot;&gt;LOVE&lt;/span&gt; the artwork on this site. Some of it was made by &lt;a href=&quot;https://shellsharks.com/about&quot;&gt;yours truly&lt;/a&gt;, but there’s many things that were designed by others!&lt;/p&gt;

&lt;p&gt;I can take credit for the &lt;a href=&quot;https://shellsharks.com/shellsharks-logo&quot;&gt;main logo&lt;/a&gt; and related &lt;a href=&quot;https://shellsharks.com/shellsharks-doodles&quot;&gt;doodles&lt;/a&gt;, the blinking &lt;mark&gt;SHELLSHARKS &amp;gt;_&lt;/mark&gt; title logo, and &lt;a href=&quot;https://shellsharks.com/podcast&quot;&gt;The Shellsharks Podcast&lt;/a&gt; logo. Finally, I made the li’l shark shiver you see at the bottom of most pages.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/avatar.png&quot; alt=&quot;splash&quot; width=&quot;125px&quot; /&gt;
&lt;img src=&quot;https://shellsharks-images.s3.amazonaws.com/captains-log/2021/theshellsharkspodcast.png&quot; alt=&quot;podshark&quot; width=&quot;125px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Past that, everything else I’ve gotta shout out others for…&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href=&quot;https://www.instagram.com/angryrolypoly/&quot;&gt;angryrolypoly&lt;/a&gt;&lt;/strong&gt; is a long-time friend, a super gifted artist, and an awesome person! He’s also responsible for a lot of lovable characters hanging out around the site…&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://shellsharks-images.s3.amazonaws.com/surfshark.png&quot; alt=&quot;surfshark&quot; width=&quot;125px&quot; /&gt;
&lt;img src=&quot;/assets/img/derpshark.png&quot; alt=&quot;derpshark&quot; width=&quot;125px&quot; /&gt;
&lt;img src=&quot;https://shellsharks-images.s3.amazonaws.com/2021/sorcerer-shark.png&quot; alt=&quot;sorcerershark&quot; width=&quot;125px&quot; /&gt;
&lt;img src=&quot;/assets/img/Scroll.png&quot; width=&quot;125px&quot; /&gt;
&lt;img src=&quot;/assets/img/sharks-circling.png&quot; alt=&quot;shiver&quot; width=&quot;125px&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally, thanks to &lt;strong&gt;&lt;a href=&quot;https://iwonaskibaart.wixsite.com/iwonaskiba&quot;&gt;Iwona Skiba&lt;/a&gt;&lt;/strong&gt;, who whipped up my &lt;a href=&quot;https://shellsharks.com/pro&quot;&gt;PRO&lt;/a&gt; logo.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://shellsharks-images.s3.amazonaws.com/pro/Red+fin+logo+gif+max.gif&quot; alt=&quot;shellsharkspro&quot; width=&quot;125px&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;designer-vulnerabilities&quot;&gt;Designer Vulnerabilities&lt;/h2&gt;

&lt;p&gt;There are two ideas which form the genesis of this site. First, I wanted to thoroughly respond to everyone who was asking me (back in 2019) “&lt;em&gt;&lt;a href=&quot;https://shellsharks.com/getting-into-information-security&quot;&gt;how to get into infosec&lt;/a&gt;&lt;/em&gt;”, and second, I wanted to create a running list of all &lt;em&gt;named&lt;/em&gt; / “&lt;a href=&quot;https://shellsharks.com/designer-vulnerabilities&quot;&gt;Designer” vulnerabilities&lt;/a&gt;. These of course were posts one and two respectively on the site. Nearly &lt;a href=&quot;https://shellsharks.com/notes/2024/01/05/named-vuln-counts-by-year&quot;&gt;6 years&lt;/a&gt; later, I’m still keeping the designer vulns list up-to-date, and am closing in on ~600 named vulns. &lt;em&gt;Wow!&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;the-enchiridion-of-impetus-exemplar&quot;&gt;The Enchiridion of Impetus Exemplar&lt;/h2&gt;

&lt;p&gt;I wish I remembered if there was a specific reason &lt;em&gt;why&lt;/em&gt; I decided to build the monumental &lt;a href=&quot;https://shellsharks.com/threat-modeling&quot;&gt;Enchiridion of Impetus Exemplar&lt;/a&gt;, but alas, if there was one, it is lost to time. What I &lt;em&gt;can&lt;/em&gt; say is that I put an incredible amount of time into researching and writing that piece. It’s also one of, if not &lt;em&gt;the&lt;/em&gt; post I personally reference the most. I get a lot of great feedback on it too, and is the &lt;em&gt;post&lt;/em&gt; I think I am most proud of.&lt;/p&gt;

&lt;p&gt;I have plans to continue expanding it too, but like other posts I’ve had grand-addition-plans for, it just hasn’t happpened yet.&lt;/p&gt;

&lt;h2 id=&quot;hamburger-menu&quot;&gt;Hamburger Menu&lt;/h2&gt;

&lt;p&gt;Implementing the aptly named “&lt;a href=&quot;https://shellsharks.com/notes/2023/07/19/hello-hamburger-menu&quot;&gt;hamburger menu&lt;/a&gt;” was (in my memory) a real pain. I’m also confident that I’ve committed a vast array of HTML, CSS and JavaScript crimes in order to get what you see today. &lt;em&gt;But&lt;/em&gt;, if it works, it works &lt;em&gt;right&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;Here’s my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;menu.html&lt;/code&gt; code with all the &lt;em&gt;hamburger-iness&lt;/em&gt; in it. (As you can see, I got the code from &lt;u&gt;Erik&lt;/u&gt;, but it seems I’ve lost the link.)&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;c&quot;&gt;/*
 * Made by Erik Terwan
 * 24th of November 2015
 * MIT License
 *
 *
 * If you are thinking of using this in
 * production code, beware of the browser
 * prefixes.
 */&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;#menuToggle&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;block&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  
  &lt;span class=&quot;nl&quot;&gt;z-index&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  
  &lt;span class=&quot;nl&quot;&gt;-webkit-user-select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;py&quot;&gt;user-select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;#menuToggle&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;a&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;text-decoration&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;  
  &lt;span class=&quot;nl&quot;&gt;transition&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0.3s&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;ease&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;l&quot;&gt;--contrast-font-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.menu_section&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;l&quot;&gt;--light-font-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;font-weight&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;900&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.menu_section&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:nth-of-type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;n&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nl&quot;&gt;margin-top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;20px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;#menuToggle&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:hover&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;l&quot;&gt;--link-hover-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;#menuToggle&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;input&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;block&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;40px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;32px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;absolute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;c&quot;&gt;/*top: -7px;*/&lt;/span&gt;
  &lt;span class=&quot;c&quot;&gt;/*left: -5px;*/&lt;/span&gt;
  
  &lt;span class=&quot;nl&quot;&gt;cursor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;pointer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  
  &lt;span class=&quot;nl&quot;&gt;opacity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;/* hide this */&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;z-index&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;/* and place it over the hamburger */&lt;/span&gt;
  
  &lt;span class=&quot;nl&quot;&gt;-webkit-touch-callout&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;/*
 * Just a quick hamburger
 */&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;#menuToggle&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;span&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;block&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;27px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;margin-bottom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;4px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;margin-top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;4px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  
  &lt;span class=&quot;nl&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;l&quot;&gt;--font-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;3px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  
  &lt;span class=&quot;nl&quot;&gt;z-index&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  
  &lt;span class=&quot;nl&quot;&gt;transform-origin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;4px&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  
  &lt;span class=&quot;nl&quot;&gt;transition&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;transform&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0.5s&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;cubic-bezier&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.77&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.05&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1.0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
              &lt;span class=&quot;n&quot;&gt;background&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0.5s&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;cubic-bezier&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.77&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.05&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1.0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
              &lt;span class=&quot;nf&quot;&gt;opacity&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0.55s&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;ease&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;#menuToggle&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;span&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:first-child&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;transform-origin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0%&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nf&quot;&gt;#menuToggle&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;span&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:nth-last-child&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;transform-origin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0%&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;100%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;/* 
 * Transform all the slices of hamburger
 * into a crossmark.
 */&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;#menuToggle&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:checked&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;~&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;span&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;opacity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;rotate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;45deg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;translate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-2px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;-1px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;l&quot;&gt;--link-hover-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;/*
 * But let&apos;s hide the middle one.
 */&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;#menuToggle&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:checked&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;~&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;span&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:nth-last-child&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;opacity&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;rotate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0deg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;scale&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;/*
 * Ohyeah and the last one should go the other direction
 */&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;#menuToggle&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:checked&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;~&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;span&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:nth-last-child&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;rotate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-45deg&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;translate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;-1px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;/*
 * Make this absolute positioned
 * at the top left of the screen
 */&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;#menu&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;absolute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;-10px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;200px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;/*fit-content;*/&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;margin-top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;c&quot;&gt;/*display:none;*/&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;l&quot;&gt;--light-background-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;l&quot;&gt;--font-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;list-style-type&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;-webkit-font-smoothing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;antialiased&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;max-height&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;calc&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;80vh&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;py&quot;&gt;overscroll-behavior&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;contain&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;border-radius&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;5px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;c&quot;&gt;/* to stop flickering of text in safari */&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;/*
 * And let&apos;s slide it in from the left
 */&lt;/span&gt;
&lt;span class=&quot;nf&quot;&gt;#menuToggle&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;input&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:checked&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;~&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;ul&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;block&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.hidden&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;

&lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;role=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;navigation&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;hamburger&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;menuToggle&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;input&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;type=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;checkbox&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;span&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;ul&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;menu&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;hidden&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
      {% include nav-links.html %}
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&amp;lt;img&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/assets/img/avatar.png&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;height=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;50&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;style=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;position: relative; display: block; margin:auto; margin-top:20px; margin-bottom:20px;&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Also in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;menu.html&lt;/code&gt; is the following JavaScript code which has the click &amp;amp; toggling-related event listeners.&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;menuButton&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;menuToggle&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;menu&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;links&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;querySelectorAll&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;menuButton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;toggle&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;hidden&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;menuButton&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;contains&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;menu&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;classList&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;hidden&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;menuToggle&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;checked&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;menuToggle&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;checked&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;menuToggle&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;checked&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;links&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;#hamburger&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nav-links.html&lt;/code&gt; (included in &lt;em&gt;menu.html&lt;/em&gt;) loops through a data array in my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt; file converting said data into the list of items you see in the menu!&lt;/p&gt;

&lt;div class=&quot;language-liquid highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
&amp;lt;li class=&quot;menu_section&quot;&amp;gt;Main&amp;lt;/li&amp;gt;
&lt;span class=&quot;cp&quot;&gt;{%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;site&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;mainlinks&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%}&lt;/span&gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;&quot; &lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;&amp;gt;&amp;lt;i class=&quot;&lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;icon&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;&quot;&amp;gt;&amp;lt;/i&amp;gt; &lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&lt;span class=&quot;cp&quot;&gt;{%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;endfor&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%}&lt;/span&gt;
&amp;lt;li id=&quot;themetoggler&quot;&amp;gt;&amp;lt;i class=&quot;ph ph-swatches&quot; id=&quot;themetoggle&quot;&amp;gt;&amp;lt;/i&amp;gt; Toggle theme&amp;lt;/li&amp;gt;
&amp;lt;li class=&quot;menu_section&quot;&amp;gt;Site Nav&amp;lt;/li&amp;gt;
&lt;span class=&quot;cp&quot;&gt;{%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;site&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;sitelinks&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%}&lt;/span&gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;&quot; &lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;&amp;gt;&amp;lt;i class=&quot;&lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;icon&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;&quot;&amp;gt;&amp;lt;/i&amp;gt; &lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&lt;span class=&quot;cp&quot;&gt;{%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;endfor&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%}&lt;/span&gt;
&amp;lt;li class=&quot;menu_section&quot;&amp;gt;Other&amp;lt;/li&amp;gt;
&lt;span class=&quot;cp&quot;&gt;{%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;site&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;otherlinks&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%}&lt;/span&gt;
    &amp;lt;li&amp;gt;&amp;lt;a href=&quot;&lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;&quot; &lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;&amp;gt;&amp;lt;i class=&quot;&lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;icon&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;&quot;&amp;gt;&amp;lt;/i&amp;gt; &lt;span class=&quot;cp&quot;&gt;{{&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;link&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;}}&lt;/span&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&lt;span class=&quot;cp&quot;&gt;{%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;endfor&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;But before that, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;nav.html&lt;/code&gt; (which calls &lt;em&gt;nav-links.html&lt;/em&gt;) is called from my &lt;em&gt;page&lt;/em&gt; layout.&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;ul&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;id=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;nav_menu&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;style=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;list-style-type:none;padding-left: 10px;&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    {% include nav-links.html %}
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;E-z-p-z right?&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;theme-toggle&quot;&gt;Theme Toggle&lt;/h2&gt;

&lt;p&gt;I prefer a &lt;u&gt;dark&lt;/u&gt; theme, but not necessarily the &lt;em&gt;super-contrasty&lt;/em&gt; dark mode that you sometimes see. Others may prefer that, or maybe they’re a &lt;em&gt;sicko&lt;/em&gt; light-mode type of person. Y’know I &lt;em&gt;try&lt;/em&gt; not to judge. WIth this in mind, I wanted to create a theme toggle switcher that could iterate over &lt;em&gt;three&lt;/em&gt; distinct themes. In my case, &lt;em&gt;dark&lt;/em&gt;, &lt;em&gt;light&lt;/em&gt;, and &lt;em&gt;classic&lt;/em&gt;. The “classic” theme is basically the (dark-mode-ish) color scheme that &lt;a href=&quot;https://shellsharks.com/notes/2024/02/15/shellsharks-a-visual-history#shellsharks-20-early-2021&quot;&gt;my site has been rocking&lt;/a&gt; since &lt;em&gt;~2021&lt;/em&gt;. You can see the current &lt;a href=&quot;https://shellsharks.com/style#color-palette&quot;&gt;color palettes&lt;/a&gt; for each theme on my Style page.&lt;/p&gt;

&lt;p&gt;So, how did I achieve the 3-mode theme switcher? It took some googlin’ around, and sifting through a lot of results that were for 2-mode implementations, which seemed to always employ a hidden HTML check box, but I eventually &lt;a href=&quot;https://dev.to/ananyaneogi/create-a-dark-light-mode-switch-with-css-variables-34l8&quot;&gt;found my solution&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A sanitized (I took the colors out, you can look at them on my &lt;a href=&quot;https://shellsharks.com/style#color-palette&quot;&gt;Style page&lt;/a&gt;) version of my CSS code relevant to the theme switcher toggle is below.&lt;/p&gt;

&lt;div class=&quot;language-css highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nd&quot;&gt;:root&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;py&quot;&gt;--accent-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;#CA3342&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;c&quot;&gt;/* OTHER COLORS */&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;/* themes */&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;data-theme&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;dark&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;py&quot;&gt;--accent-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;#FA7575&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;c&quot;&gt;/* OTHER COLORS */&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;data-theme&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;light&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;py&quot;&gt;--accent-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;#96000f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;c&quot;&gt;/* OTHER COLORS */&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;data-theme&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&quot;classic&quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;py&quot;&gt;--accent-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;#FA7575&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;c&quot;&gt;/* OTHER COLORS */&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then, there’s some JavaScript code which does the switching when you press the &lt;mark&gt;&lt;i class=&quot;ph-fill ph-moon&quot;&gt;&lt;/i&gt; Toggle theme&lt;/mark&gt; button (located in the &lt;a href=&quot;#hamburger-menu&quot;&gt;Hamburger menu&lt;/a&gt;).&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;switchTheme&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;dark&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;light&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;localStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;light&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;themetoggle&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;ph ph-moon&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;light&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;classic&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;localStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;classic&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;themetoggle&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;ph-fill ph-moon&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;classic&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;dark&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;localStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;dark&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;themetoggle&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;ph ph-sun&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;dark&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nx&quot;&gt;localStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;dark&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
      &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getElementById&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;themetoggle&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;ph ph-sun&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; 
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nx&quot;&gt;toggleSwitch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;switchTheme&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The final piece of this theme-switching puzzle is the code below which resides on each page. I’ve added it to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;default.html&lt;/code&gt; layout in the ‘_layouts’ directory of my Jekyll site. Basically, it gets and sets the theme in a browsers localStorage. It also uses the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;prefers-color-scheme&lt;/code&gt; directive to take advantage of users preferred dark vs light mode setting on their device(s). &lt;em&gt;Cool!&lt;/em&gt;&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  &lt;span class=&quot;nt&quot;&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;currentThemeX&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;localStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;localStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;getItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;currentThemeX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;documentElement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;data-theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;currentThemeX&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;matchMedia&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;(prefers-color-scheme: light)&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;matches&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;localStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;light&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;if &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;matchMedia&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;(prefers-color-scheme: dark)&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;matches&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;localStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;classic&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;localStorage&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setItem&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;theme&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;classic&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;activity-feed&quot;&gt;Activity Feed&lt;/h2&gt;

&lt;p&gt;I’ve previously discussed &lt;a href=&quot;https://shellsharks.com/creating-an-activity-feed&quot;&gt;how I built&lt;/a&gt; the &lt;strong&gt;&lt;a href=&quot;https://shellsharks.com/activity&quot;&gt;Activity Feed&lt;/a&gt;&lt;/strong&gt;, and &lt;a href=&quot;https://shellsharks.com/notes/2024/04/08/the-activity-feed&quot;&gt;where I got the inspiration&lt;/a&gt;. It’s just a really fun way to visualize everything I am writing and sharing, chronologically &lt;a href=&quot;https://shellsharks.com/notes/2025/02/06/did-i-inspire-tapestry&quot;&gt;weaved&lt;/a&gt; together.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://shellsharks-images.s3.us-east-1.amazonaws.com/notes/2025/activity_snapshot.png&quot; alt=&quot;activity feed&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;note-card&quot;&gt;Note Card&lt;/h2&gt;

&lt;p&gt;The “&lt;a href=&quot;https://shellsharks.com/notebook&quot;&gt;Notebook&lt;/a&gt;” is where I file away short-form-style content (“&lt;a href=&quot;https://shellsharks.com/multiplicity-of-writing#notes&quot;&gt;notes&lt;/a&gt;”), including &lt;a href=&quot;https://shellsharks.com/notes/2024/04/02/reverse-syndication-pesos&quot;&gt;PESOS&lt;/a&gt;‘ed social media posts. After creating &lt;em&gt;notes&lt;/em&gt; as a unique collection type, with a theme reminiscent of a social media post, I had the idea to create a capability to “embed” a note in another post, similar to how other social networks have &lt;a href=&quot;https://fedi.tips/how-to-embed-mastodon-posts-on-a-website/&quot;&gt;embed code&lt;/a&gt;. The result is below…&lt;/p&gt;

&lt;div style=&quot;max-width:650px; margin: auto; font-size:.85em;&quot;&gt;

&lt;article class=&quot;post h-entry&quot;&gt;

    &lt;div id=&quot;ncard&quot; class=&quot;containbox&quot; style=&quot;margin:auto; position:relative; margin-top: 20px; margin-bottom:20px; width:100%; background-color: color-mix(in srgb, var(--mastodon-color) 10%, var(--background-color));&quot;&gt;
      
      
        &lt;div style=&quot;float:left;&quot;&gt;&lt;a href=&quot;https://shellsharks.com/about&quot; class=&quot;p-author&quot;&gt;&lt;img class=&quot;profilepic&quot; src=&quot;https://shellsharks-images.s3.amazonaws.com/surfshark.png&quot; width=&quot;60&quot; alt=&quot;author-image&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
        &lt;div style=&quot;float:left;&quot;&gt;&lt;span id=&quot;author&quot; style=&quot;font-weight:bold;&quot;&gt;Mike Sass&lt;/span&gt;&lt;br /&gt;&lt;span id=&quot;handle&quot; style=&quot;color:var(--light-font-color);&quot;&gt;@shellsharks&lt;/span&gt;&lt;/div&gt;
      
      &lt;div style=&quot;float:right;padding:10px 0px 0px 0px;&quot;&gt;&lt;i class=&quot;ph ph-clock-counter-clockwise&quot; title=&quot;Backdated&quot;&gt;&lt;/i&gt; &lt;i class=&quot;ph ph-calendar-dot&quot;&gt;&lt;/i&gt; &lt;span id=&quot;date&quot; style=&quot;font-size:0.75em;&quot; class=&quot;dt-published&quot;&gt;11/17/22 08:11&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
    
      &lt;div class=&quot;post-content e-content&quot;&gt;
      &lt;p&gt;“If you find yourself alone, riding in green fields with the sun on your face, do not be troubled. For you are on Mastodon, and not on Twitter!” - &lt;em&gt;Mastodonius Decimus Meridius&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;#Gladiator is the best movie of all time. I can’t be convinced otherwise.&lt;/p&gt;

      &lt;/div&gt;
      &lt;div style=&quot;bottom:-5px; text-align:right;font-size:0.75em;&quot;&gt;&lt;i class=&quot;ph ph-pencil&quot;&gt;&lt;/i&gt; 45&lt;/div&gt;
    
    &lt;hr style=&quot;opacity:35%;margin-top: 10px;margin-bottom: 10px;width:75%;&quot; /&gt;

    &lt;div id=&quot;info&quot; class=&quot;wrapper&quot;&gt;
      &lt;div class=&quot;box 1&quot; style=&quot;background-color:color-mix(in srgb, var(--mastodon-color) 10%, var(--background-color));&quot;&gt;
    
    
    &lt;div&gt;&lt;i class=&quot;ph ph-map-pin-area&quot; title=&quot;Posted from&quot;&gt;&lt;/i&gt; &lt;span id=&quot;posted-from&quot; style=&quot;font-size:0.75em;&quot;&gt;Metatext&lt;/span&gt;&lt;/div&gt;
    
    
      &lt;div&gt;&lt;i class=&quot;ph ph-broadcast&quot;&gt;&lt;/i&gt;&lt;span style=&quot;font-size:0.75em;&quot;&gt; Syndication:&lt;/span&gt;&lt;/div&gt;
      &lt;div style=&quot;font-size:1.5em;&quot;&gt;&lt;span id=&quot;syndicate-to&quot;&gt;
      
      &lt;span style=&quot;padding:0px 3px 0px 3px;&quot;&gt;&lt;a href=&quot;https://infosec.exchange/@shellsharks/109359547429626251&quot;&gt;&lt;i class=&quot;ph ph-mastodon-logo&quot; title=&quot;Mastodon&quot;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;
      
      &lt;/span&gt;&lt;/div&gt;
    
  &lt;/div&gt;
  
  &lt;div class=&quot;box2&quot; style=&quot;bottom:0;&quot;&gt;
    &lt;div style=&quot;text-align:right; padding:5px 5px 5px 5px;&quot;&gt;&lt;a class=&quot;u-url&quot; href=&quot;https://shellsharks.com/notes/2022/11/17/gladiator&quot;&gt;&lt;i class=&quot;ph ph-link&quot; title=&quot;Permalink&quot;&gt;&lt;/i&gt;&lt;/a&gt; &lt;a href=&quot;https://shellsharks.com/notebook&quot;&gt;&lt;i class=&quot;ph ph-book-open&quot; title=&quot;Notebook&quot;&gt;&lt;/i&gt;&lt;/a&gt; &lt;a href=&quot;https://shellsharks.com/&quot;&gt;&lt;i class=&quot;ph ph-house&quot; title=&quot;Home&quot;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/div&gt;
    &lt;div style=&quot;font-size:0.75em;color:var(--light-font-color);padding:5px 5px 0px 5px;text-align:right;&quot;&gt;&lt;i class=&quot;ph ph-tag&quot;&gt;&lt;/i&gt; 
    
        &lt;span id=&quot;tags&quot; style=&quot;padding:0px 3px 0px 3px;&quot;&gt;#life&lt;/span&gt;
      
        &lt;span id=&quot;tags&quot; style=&quot;padding:0px 3px 0px 3px;&quot;&gt;#movies&lt;/span&gt;
      &lt;/div&gt;
    
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/article&gt;

&lt;/div&gt;

&lt;style&gt;
    .wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    }
    img {max-width:100%}
  &lt;/style&gt;

&lt;p&gt;Here’s the &lt;a href=&quot;https://shopify.github.io/liquid/&quot;&gt;Liquid&lt;/a&gt; code I use to embed a note.&lt;/p&gt;

&lt;div class=&quot;language-liquid highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
&lt;span class=&quot;cp&quot;&gt;{%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;assign&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;note&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;site&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;notes&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;where&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;slug&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Gladiator&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%}&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;{%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;assign&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;note_type&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;note&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;syndicate-to&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;last&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;downcase&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;remove&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;.&apos;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%}&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;{%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;note_type&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;==&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;&apos;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%}{%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;assign&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;note_type&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;none&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%}{%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;endif&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%}&lt;/span&gt;
&lt;span class=&quot;cp&quot;&gt;{%&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;include&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;note-card.html&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cp&quot;&gt;%}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The “note card” (as I call it) is just a Jekyll &lt;em&gt;include&lt;/em&gt; with markup that is effectively the same as the &lt;strong&gt;note&lt;/strong&gt; layout markup. (You can see the HTML/CSS structure by viewing source on the div &lt;em&gt;id&lt;/em&gt; = ‘ncard’.)&lt;/p&gt;

&lt;h2 id=&quot;style-page&quot;&gt;Style Page&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;&lt;a href=&quot;https://shellsharks.com/style&quot;&gt;Style page&lt;/a&gt;&lt;/strong&gt; is just a cool, relatively unique addition to this site’s abundance of &lt;a href=&quot;https://shellsharks.com/slashes&quot;&gt;neat pages&lt;/a&gt;. What’s more, it is &lt;em&gt;actually&lt;/em&gt; pretty helpful when I’m &lt;a href=&quot;https://shellsharks.com/notes/2025/01/28/tinkering-with-the-site-again&quot;&gt;tinkering&lt;/a&gt; with the CSS or other design aspects of the site. &lt;a href=&quot;https://www.patrickweaver.net/blog/a-blog-post-with-every-html-element/&quot;&gt;This post from Patrick Weaver&lt;/a&gt; was fundamental in the development of my Style page.&lt;/p&gt;

&lt;p&gt;* All credit for this idea thought to &lt;span class=&quot;flamedfury-com&quot;&gt;fLaMEd&lt;/span&gt; 🔥 (check out their &lt;a href=&quot;https://flamedfury.com/styleguide/&quot;&gt;Style Guide&lt;/a&gt;).&lt;/p&gt;

&lt;h2 id=&quot;scrolls&quot;&gt;Scrolls&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;newsletter&lt;/strong&gt; is an idea I had had for a while before launching the first edition of &lt;span class=&quot;shellsharks&quot; style=&quot;font-weight:bold;&quot;&gt;Scrolls&lt;/span&gt;. You see, week after week I spend a good bit of time &lt;span class=&quot;shellsharks&quot;&gt;scrolling&lt;/span&gt; &lt;em&gt;a lot&lt;/em&gt; of &lt;a href=&quot;https://shellsharks.com/notes/2023/11/06/keeping-current-in-infosec&quot;&gt;different feeds&lt;/a&gt;. In doing so, I come across a lot of cool stuff. Things that I save, some stuff I may share, things that I end up writing about, etc… I realized that I was putting quite a bit of work into this, and what I was &lt;em&gt;producing&lt;/em&gt; as a result of all that work, was so little. &lt;em&gt;So&lt;/em&gt;, my idea was to convert, with really not that much more added effort, all the work I was doing by reading through and saving cool stuff across my feeds into something for &lt;em&gt;everyone&lt;/em&gt;.&lt;/p&gt;

&lt;div class=&quot;containbox&quot;&gt;
&lt;center&gt;
&lt;img src=&quot;/assets/img/Scroll.png&quot; width=&quot;150px&quot; style=&quot;position:relative; right:5px; margin:-5px;&quot; /&gt;&lt;br /&gt;
&lt;span class=&quot;shellsharks&quot; style=&quot;font-style:italic;&quot;&gt;Arcane curation from the IndieWeb, Fediverse and Cybersecurity realms&lt;/span&gt;
&lt;/center&gt;
&lt;/div&gt;

&lt;p&gt;This is a project I’m &lt;em&gt;very&lt;/em&gt; excited about. I’ve always said that &lt;a href=&quot;https://shellsharks.com/notes/2023/11/05/security-is-magic&quot;&gt;security is magic&lt;/a&gt;. I also believe in the magic of the &lt;a href=&quot;https://shellsharks.com/indieweb&quot;&gt;IndieWeb&lt;/a&gt; and of the &lt;a href=&quot;https://shellsharks.com/fediverse&quot;&gt;Fediverse&lt;/a&gt;. Scrolls is centered around these three distinct topics, which is why it’s been imbued with a kindred dollop of magic and whimsy.&lt;/p&gt;

&lt;h2 id=&quot;home-page-circa-2025&quot;&gt;Home Page (circa 2025)&lt;/h2&gt;

&lt;p&gt;I write about my &lt;a href=&quot;https://shellsharks.com/whats-a-home-page&quot;&gt;home page revamp here&lt;/a&gt;. The &lt;strong&gt;home page&lt;/strong&gt; has gone through (&lt;em&gt;at least&lt;/em&gt;) &lt;strong&gt;4&lt;/strong&gt; major &lt;a href=&quot;https://shellsharks.com/notes/2024/02/15/shellsharks-a-visual-history&quot;&gt;revisions&lt;/a&gt; since 2019, &lt;a href=&quot;https://shellsharks.com/notes/2024/05/30/5-years&quot;&gt;when I first started&lt;/a&gt; the site.&lt;/p&gt;

&lt;p&gt;I had major reservations about moving away from the &lt;a href=&quot;https://shellsharks.com/home/feed&quot;&gt;classic&lt;/a&gt;, simple, clean, chronological list-of-posts aesthetic that I had been rocking &lt;a href=&quot;https://shellsharks.com/notes/2024/02/15/shellsharks-a-visual-history#shellsharks-10-may-2019&quot;&gt;since the beginning&lt;/a&gt;. But it only took a few minutes for me to realize not only how much more utility the new design had, but also how much better it did in telling folks what this site is about, what it has to offer, and what matters to me. I also think it looks &lt;em&gt;awesome&lt;/em&gt;!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://shellsharks-images.s3.us-east-1.amazonaws.com/notes/2024/home-page-2025-02.png&quot; alt=&quot;Home Page 2025&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;shark-fin-hr&quot;&gt;Shark Fin &amp;lt;hr&amp;gt;&lt;/h2&gt;

&lt;p&gt;I talk all about &lt;em&gt;how&lt;/em&gt; I built the &lt;strong&gt;shark fin&lt;/strong&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;hr&amp;gt;&lt;/code&gt; &lt;a href=&quot;https://shellsharks.com/devlog/shark-fin-hr&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;But &lt;em&gt;why&lt;/em&gt; did I do this? &lt;em&gt;Sure yeah&lt;/em&gt;, I like sharks. But it ain’t really that. It’s more my love for little &lt;em&gt;whimsical&lt;/em&gt; touches. I love the idea of having little easter eggs sprinkled throughout the site. Things that will surprise and delight not only my “readers”, but more importantly, &lt;em&gt;me&lt;/em&gt;. I spend a lot of time just browsing around the pages of &lt;u&gt;shellsharks&lt;/u&gt;, and these little touches make the experience all the better.&lt;/p&gt;

&lt;p&gt;&lt;i&gt;So build cool things, and remember to look upon those things and &lt;b&gt;smile&lt;/b&gt;&lt;/i&gt;.&lt;/p&gt;
</description>
        <pubDate>Sun, 23 Feb 2025 00:43:00 -0500</pubDate>
        <link>https://shellsharks.com/devlog/build-then-smile</link>
        <guid isPermaLink="true">https://shellsharks.com/devlog/build-then-smile</guid>
        
        <category>devlog</category>
        
        <category>shellsharks</category>
        
        <category>technology</category>
        
      </item>
    
      <item>
        <title>Shark Fin &amp;lt;hr&amp;gt;</title>
        <author>mike@shellsharks.com (Mike)</author>
        <shark:summary><p>You may have noticed that I have a <em>bit</em> of a shark theme goin’ on across the site. It’s not <em>overwhelmingly</em> shark-<i>ey</i>, but there’s certainly a shark or two sprinkled about - and I think that’s just <strong>fun</strong>. To this end, I had another fun li’l idea. What if I could change the usual boring ‘ol <code class="language-plaintext highlighter-rouge">&lt;hr&gt;</code> tag (<a href="https://www.w3schools.com/tags/tag_hr.asp">horizontal rule</a>) and have a shark dorsal fin coming out of it? <em>Sounds cool right?</em> Right.</p>
</shark:summary>
        <description>&lt;p&gt;You may have noticed that I have a &lt;em&gt;bit&lt;/em&gt; of a shark theme goin’ on across the site. It’s not &lt;em&gt;overwhelmingly&lt;/em&gt; shark-&lt;i&gt;ey&lt;/i&gt;, but there’s certainly a shark or two sprinkled about - and I think that’s just &lt;strong&gt;fun&lt;/strong&gt;. To this end, I had another fun li’l idea. What if I could change the usual boring ‘ol &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;hr&amp;gt;&lt;/code&gt; tag (&lt;a href=&quot;https://www.w3schools.com/tags/tag_hr.asp&quot;&gt;horizontal rule&lt;/a&gt;) and have a shark dorsal fin coming out of it? &lt;em&gt;Sounds cool right?&lt;/em&gt; Right.&lt;/p&gt;

&lt;p&gt;I had this &lt;a href=&quot;https://shellsharks.com/ideas&quot;&gt;idea&lt;/a&gt; months or even years ago, I filed it away for another day, thinking it too hard for me to accomplish myself. It would have to be something that I’d need to learn a lot of arcane HTML/CSS to do or maybe I’d just need to hire someone to make it for me. Yesterday, for whatever reason, I decided to try and take it on. I’m going to walk through a bit of my &lt;a href=&quot;#trial-and-error&quot;&gt;trial and error&lt;/a&gt;, and then get into how I finally &lt;a href=&quot;#shark-fin-hr&quot;&gt;pulled it off&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;trial-and-error&quot;&gt;Trial and Error&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Let me tell you&lt;/em&gt;, getting this to work probably took me 4-5 hours of just sittin’ in my chair, hammering away. Though I can safely say I &lt;em&gt;&lt;a href=&quot;#future-improvements&quot;&gt;mostly&lt;/a&gt;&lt;/em&gt; figured out everything to get it to work, I also can say I figured out lots of ways it &lt;em&gt;doesn’t&lt;/em&gt; work.&lt;/p&gt;

&lt;p&gt;The way I thought this would work originally, and thus the way I approached it at first, was to use HTML’s &lt;a href=&quot;https://www.w3schools.com/html/html5_canvas.asp&quot;&gt;Canvas Graphics&lt;/a&gt; to draw a shark fin &lt;em&gt;and&lt;/em&gt; a line, and just use that instead of the normal &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;hr&amp;gt;&lt;/code&gt; tags. Of course I know nothing about drawing with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt;, and I absolutely wasn’t going to try and learn it well enough to do it myself, so naturally I googled for an answer. It wasn’t long into this search that I realized maybe drawing with straight CSS would be a better option. So, I searched for that instead. Google came up pretty dry once again, but there was one &lt;em&gt;potential&lt;/em&gt; &lt;a href=&quot;https://alvaromontoro.com/blog/68021/drawing-a-shark-with-css&quot;&gt;splash of luck&lt;/a&gt;.&lt;sup id=&quot;fnref:1&quot;&gt;&lt;a href=&quot;#fn:1&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot; role=&quot;doc-noteref&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; Alvaro had managed to draw a (&lt;em&gt;adorably cute&lt;/em&gt;) shark entirely with HTML and CSS. &lt;em&gt;Cool!&lt;/em&gt; But could I use it somehow? I &lt;em&gt;cmd+C &amp;amp; cmd+V’ed&lt;/em&gt; the code and tried ripping out stuff to get to just the fin. I figured if I could isolate the fin, I could tweak it a bit to be what I wanted. I was &lt;em&gt;wrong&lt;/em&gt;. I gave up on that after like 10 min.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So now what?&lt;/em&gt; I got a bit desperate, from there I tried…&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Searching for web tools that would convert drawings to CSS code&lt;/li&gt;
  &lt;li&gt;Searching for vector libraries&lt;/li&gt;
  &lt;li&gt;I even used ChatGPT to try and make it (here’s what it came up with - &lt;em&gt;sorry&lt;/em&gt; I can’t get the &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox&quot;&gt;viewBox&lt;/a&gt; to behave)&lt;/li&gt;
&lt;/ul&gt;

&lt;svg width=&quot;100&quot; height=&quot;100&quot; viewBox=&quot;0 0 100 100&quot; fill=&quot;none&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
    &lt;path d=&quot;M50 150 C100 20, 180 80, 160 160 L50 160 Z&quot; fill=&quot;#CA3342&quot; /&gt;
&lt;/svg&gt;

&lt;p&gt;Fresh off of humiliating myself by thinking AI could be useful, I came across some &lt;em&gt;actually&lt;/em&gt; useful info. Basically, I learned that I could customize &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;hr&amp;gt;&lt;/code&gt; tags with a character, &lt;em&gt;or image&lt;/em&gt; using the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;::after&lt;/code&gt; &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/CSS/::after&quot;&gt;pseudo-element&lt;/a&gt;.&lt;sup id=&quot;fnref:2&quot;&gt;&lt;a href=&quot;#fn:2&quot; class=&quot;footnote&quot; rel=&quot;footnote&quot; role=&quot;doc-noteref&quot;&gt;2&lt;/a&gt;&lt;/sup&gt; &lt;em&gt;Neat!&lt;/em&gt;. This seemed like a more elegant solution. I could still use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;hr&amp;gt;&lt;/code&gt; tags, just with a class specifier rather than importing some janky inline-svg + html + css abomination each time I wanted the effect. So, like any seasoned developer, I borrowed the code from the &lt;a href=&quot;https://stackoverflow.com/questions/14202089/custom-hr-with-image-character-in-the-center&quot;&gt;stack overflow&lt;/a&gt; page and started tweaking from there. But then I ran into my next issue, I needed an image to import! And not just any image, I needed something I could move along the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;hr&amp;gt;&lt;/code&gt; continuum, something I could size up and down, and something I could change the color of. First place I went to was &lt;em&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/SVG&quot;&gt;.svg&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;I spent some time googling around for shark fin &lt;em&gt;.svgs&lt;/em&gt; and came across a number of things that would work for me.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/sharkfin.svg&quot; /&gt; &lt;img src=&quot;/assets/img/shark-fin-silhouette.svg&quot; /&gt; &lt;img src=&quot;/assets/img/shark-fin-notch.svg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The xml syntax within an SVG file is kinda strange, and it took me a while to grok, but eventually I figured out how to change the fill color, resize it to my liking and generate a mirror image so that the shark fin can point both left and right.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/img/sharkfin-reverse.svg&quot; /&gt; &lt;img src=&quot;/assets/img/shark-fin-silhouette-reverse.svg&quot; /&gt; &lt;img src=&quot;/assets/img/shark-fin-notch-reverse.svg&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So, let me give you the &lt;a href=&quot;#shark-fin-hr&quot;&gt;final result&lt;/a&gt;…&lt;/p&gt;

&lt;h2 id=&quot;shark-fin-hr&quot;&gt;Shark Fin &amp;lt;hr&amp;gt;&lt;/h2&gt;

&lt;p&gt;Here’s how I finally put together my current v1.0 &lt;b&gt;Shark Fin &amp;lt;hr&amp;gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Within the SVG, you can resize by changing the ‘width’ property in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; tag. You can change the fill color with the ‘fill’ property in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;path&amp;gt;&lt;/code&gt; tag. Finally, for mirroring the image across the Y-axis, you can add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;transform=&quot;scale (-1, 1)&quot; transform-origin=&quot;center&quot;&lt;/code&gt; to the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;path&amp;gt;&lt;/code&gt; tag as well (as shown below). I also had to toy around with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;viewBox&lt;/code&gt; to take out unneccessary white-space/padding.&lt;/p&gt;

&lt;div class=&quot;language-xml highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;svg&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;...&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;width=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;35px&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;viewBox=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0 0 1000 1000&quot;&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;path&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;fill=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;#CA3342&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;transform=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;scale (-1, 1)&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;transform-origin=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;center&quot;&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;...&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;My CSS for the ‘fin’ class…&lt;/p&gt;

&lt;div class=&quot;language-css highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;nd&quot;&gt;:root&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;py&quot;&gt;--hrfin-position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;40%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;py&quot;&gt;--hrfin-content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&apos;/assets/img/shark-fin-notch.svg&apos;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;hr&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;.fin&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;margin-top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;40px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;/* compensating for height of the fin */&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;margin-bottom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;40px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;/* making the bottom margin the same as the top */&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;border-top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;l&quot;&gt;--accent-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;/* the color that I want the hr tag to be */&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;border-bottom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;l&quot;&gt;--accent-color&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;hr&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;.fin&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:after&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;l&quot;&gt;--hrfin-content&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;/* Loading the SVG url from :root */&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;l&quot;&gt;--hrfin-position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;/* Setting the position of the fin along the rule */&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;relative&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nl&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;29px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;/* Moves the fin closer to the line - it&apos;s 6px less than the svg width */&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So why am I setting the ‘left’ position and loading the svg from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:root&lt;/code&gt; instead of directly? Well that’s because I wanted to randomize the fin’s position along the rule on page load. So I have some JavaScript that does this.&lt;/p&gt;

&lt;div class=&quot;language-js highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;root&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:root&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;//grabbing the root element&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rand&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;floor&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fins&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;url( &apos;/assets/img/shark-fin-notch.svg&apos; )&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;url( &apos;/assets/img/shark-fin-notch-reverse.svg&apos; )&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fins_rand&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;round&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;Math&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;random&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;());&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fins&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fins_rand&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setProperty&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;--hrfin-position&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rand&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;%&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;setProperty&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;--hrfin-content&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;fins&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fins_rand&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So what do I get in the end? &lt;strong&gt;This!&lt;/strong&gt; *&lt;em&gt;cue &lt;a href=&quot;https://www.youtube.com/watch?v=BePfzCOMRZQ&quot;&gt;the music&lt;/a&gt;&lt;/em&gt;*&lt;/p&gt;

&lt;hr class=&quot;fin&quot; /&gt;

&lt;p&gt;&lt;em&gt;OK&lt;/em&gt;, this &lt;u&gt;rules&lt;/u&gt;. Try reloading the page a few times and see it change positions and directionality. &lt;em&gt;Niiiiice!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;What’s cool too is that even if I shorten the width of the rule, the shark will stay along it.&lt;/p&gt;

&lt;hr class=&quot;fin&quot; width=&quot;50%&quot; /&gt;

&lt;p&gt;You can now call me the Poseidon (&lt;em&gt;or Aquaman&lt;/em&gt;) of HTML, as I summon forth a shiver of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;hr&amp;gt;&lt;/code&gt; sharks!&lt;/p&gt;

&lt;h3 id=&quot;future-improvements&quot;&gt;Future Improvements&lt;/h3&gt;

&lt;p&gt;But things aren’t &lt;em&gt;exactly&lt;/em&gt; how I’d like to see them. There are some improvements to be made in future iterations. A wish list of things I’d like to see it do in the future…&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Given the way I am loading the SVG, I can’t dynamically change the color of the fin, it is statically set in the SVG itself. I’m fine with the compromise for now but would like to address this later.&lt;/li&gt;
  &lt;li&gt;The fin position (X-axis), set by the CSS ‘left’ directive is the same for all fin-class &lt;em&gt;hrs&lt;/em&gt; on the page. Notice how all of them on this page are at the same point on the line. It’d be cool to randomize the position for each instance of the rule on a single page.&lt;/li&gt;
  &lt;li&gt;I’m pretty happy with the shark fin SVG I’ve landed on (Thanks &lt;a href=&quot;https://www.creativefabrica.com/product/shark-fin-silhouette-svg-shark-fin-svg/&quot;&gt;Creative Fabrica&lt;/a&gt;!), but could see myself getting something a bit more customized in the future.&lt;/li&gt;
  &lt;li&gt;If I wanted to get crazy, maybe I’d have the fins animate in some way, like an actual shark swimmin’ around the rules.&lt;/li&gt;
  &lt;li&gt;Another compromise was having to use JavaScript to randomize the svg file and position. Modern/supported versions of CSS don’t have any way to produce a &lt;em&gt;random&lt;/em&gt; value. There are some &lt;a href=&quot;https://css-tricks.com/random-numbers-css/&quot;&gt;hacky ways&lt;/a&gt; to achieve this, but I couldn’t figure them out. It’d be cool to have this not be .js-dependent in the future.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://ioc.exchange/@ApisNecros/114037149158829016&quot;&gt;Suggested to me&lt;/a&gt; was the idea to have the ‘left’ position determined by scroll position, so the shark would look like it was swimming as one scrolled. Interesting idea!&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&quot;footnotes&quot; role=&quot;doc-endnotes&quot;&gt;
  &lt;ol&gt;
    &lt;li id=&quot;fn:1&quot;&gt;
      &lt;p&gt;&lt;a href=&quot;https://alvaromontoro.com/blog/68021/drawing-a-shark-with-css&quot;&gt;Drawing kawaii sharks and sea life with HTML and CSS&lt;/a&gt; &lt;a href=&quot;#fnref:1&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
    &lt;li id=&quot;fn:2&quot;&gt;
      &lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/14202089/custom-hr-with-image-character-in-the-center&quot;&gt;Custom &amp;lt;hr&amp;gt; with image/character in the center | Stack Overflow&lt;/a&gt; &lt;a href=&quot;#fnref:2&quot; class=&quot;reversefootnote&quot; role=&quot;doc-backlink&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
</description>
        <pubDate>Thu, 20 Feb 2025 09:51:00 -0500</pubDate>
        <link>https://shellsharks.com/devlog/shark-fin-hr</link>
        <guid isPermaLink="true">https://shellsharks.com/devlog/shark-fin-hr</guid>
        
        <category>devlog</category>
        
        <category>css</category>
        
        <category>shark</category>
        
        <category>whimsy</category>
        
        <category>technology</category>
        
      </item>
    
      <item>
        <title>Pagination Nation</title>
        <author>mike@shellsharks.com (Mike)</author>
        <shark:summary><p>In the <a href="/devlog/collection-all-the-things">last Devlog</a>, I talked about <a href="https://jekyllrb.com/docs/collections/">Jekyll collections</a> and how I’m using them. As your site grows older, and you write more and more things, across a variety of collections, your pages which list-out content become more and more unwieldy, thus necessitating things like <strong><a href="https://jekyllrb.com/docs/pagination/">pagination</a></strong>. I encountered this issue some time ago - notably, with my <a href="/notebook">Notebook</a>, <a href="/changelog">Changelog</a> &amp; <a href="/activity">Activity</a> pages, each having 100’s of entries respectively. When not paginated, this results in not only very long pages that require quite a bit of scrolling to navigate, but also yielded pages that were very ill-performant, especially on mobile. My iPhone would nearly freeze trying to load, render or navigate away from these huge pages. So how can I mitigate this? <em>Pagination of course</em>!</p>
</shark:summary>
        <description>&lt;p&gt;In the &lt;a href=&quot;https://shellsharks.com/devlog/collection-all-the-things&quot;&gt;last Devlog&lt;/a&gt;, I talked about &lt;a href=&quot;https://jekyllrb.com/docs/collections/&quot;&gt;Jekyll collections&lt;/a&gt; and how I’m using them. As your site grows older, and you write more and more things, across a variety of collections, your pages which list-out content become more and more unwieldy, thus necessitating things like &lt;strong&gt;&lt;a href=&quot;https://jekyllrb.com/docs/pagination/&quot;&gt;pagination&lt;/a&gt;&lt;/strong&gt;. I encountered this issue some time ago - notably, with my &lt;a href=&quot;https://shellsharks.com/notebook&quot;&gt;Notebook&lt;/a&gt;, &lt;a href=&quot;https://shellsharks.com/changelog&quot;&gt;Changelog&lt;/a&gt; &amp;amp; &lt;a href=&quot;https://shellsharks.com/activity&quot;&gt;Activity&lt;/a&gt; pages, each having 100’s of entries respectively. When not paginated, this results in not only very long pages that require quite a bit of scrolling to navigate, but also yielded pages that were very ill-performant, especially on mobile. My iPhone would nearly freeze trying to load, render or navigate away from these huge pages. So how can I mitigate this? &lt;em&gt;Pagination of course&lt;/em&gt;!&lt;/p&gt;

&lt;p&gt;Pagination is great, but unfortunately, if you are using &lt;a href=&quot;https://pages.github.com&quot;&gt;GitHub Pages&lt;/a&gt; and building/deploying via the classic &lt;em&gt;Deploy-from-a-branch&lt;/em&gt; method, you are limited to the legacy &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jekyll-paginate&lt;/code&gt; plugin, which can only paginate on a single page within your site, specifically on the root level &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;index.html&lt;/code&gt; page. &lt;em&gt;Ouch&lt;/em&gt;. Since I need the ability to paginate a variety of collections on multiple distinct pages, I needed something else - enter &lt;strong&gt;&lt;a href=&quot;https://github.com/sverrirs/jekyll-paginate-v2/tree/master&quot;&gt;jekyll-paginate-v2&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Jekyll-paginate-v2&lt;/code&gt; seemed to satisfy my requirements, but unfortunately, vanilla GitHub Pages does not support many plugins, this being one of them. Honestly, at this point I flirted with the idea of re-writing my entire blog using something like &lt;a href=&quot;https://www.11ty.dev&quot;&gt;11ty&lt;/a&gt;. I still might do this one day, but really I just want my current site to work the way I want, without having to scrap it. &lt;em&gt;So…&lt;/em&gt; the other solution is changing the way I build &amp;amp; deploy the site. Fortunately, GitHub gives you the option to switch from the classic Pages Deploy-from-a-branch method to one based on &lt;a href=&quot;https://github.com/features/actions&quot;&gt;GitHub Actions&lt;/a&gt;. I’m not going to explain what Actions is, but in the context of this writeup, just know it lets me use the full suite of &lt;a href=&quot;https://jekyllrb.com/docs/plugins/&quot;&gt;Jekyll plugins&lt;/a&gt;, not just the limited selection that GitHub Pages supports. &lt;em&gt;Woo!&lt;/em&gt;&lt;/p&gt;

&lt;h1 id=&quot;configuring-github-actions-for-github-pages-build--deploy&quot;&gt;Configuring GitHub Actions for GitHub Pages Build &amp;amp; Deploy&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Alright&lt;/em&gt;. So how can I switch from the classic build+deploy method to the Actions-based one? Jekyll actually has a doc for &lt;a href=&quot;https://jekyllrb.com/docs/continuous-integration/github-actions/&quot;&gt;exactly this&lt;/a&gt;. The steps as written are very simple and very straight-forward, &lt;em&gt;or so I thought…&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;After creating the new action, Pages tried to build my site but quickly ran into an error with the Ruby setup. The traceback ended as follows…&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;In Gemfile:
  github-pages was resolved to 209, which depends on
    jekyll-mentions was resolved to 1.6.0, which depends on
      html-pipeline was resolved to 2.14.0, which depends on
        nokogiri
Error: The process &apos;/opt/hostedtoolcache/Ruby/3.1.6/x64/bin/bundle&apos; failed with exit code 5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I’ll admit, I was pretty stumped at first, and didn’t really know how to troubleshoot. You see, even though I’ve been running this Jekyll site for over &lt;a href=&quot;https://shellsharks.com/notes/2024/05/30/5-years&quot;&gt;5 years&lt;/a&gt;, I really haven’t learned much about Ruby, &lt;em&gt;hah&lt;/em&gt;! Looks like that needed to change, so I persist. After browsing around, I started to home in on the root problem - it seemed like I had some dependency issues stemming from my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Gemfile.lock&lt;/code&gt; and/or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Gemfile&lt;/code&gt; files. &lt;em&gt;Ok&lt;/em&gt;, nice! Let’s add &lt;em&gt;Gemfile.lock&lt;/em&gt; to my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.gitignore&lt;/code&gt; and then swap out &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gem &apos;github-pages&apos;&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gem &quot;jekyll&quot;, &quot;~&amp;gt; 4.2&quot;&lt;/code&gt; in my &lt;em&gt;Gemfile&lt;/em&gt;. Commit the repo and then about a minute later, a green check in my workflow record! &lt;em&gt;It worked!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Another troubleshooting thing to consider is whether the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ruby-version&lt;/code&gt; in the &lt;em&gt;jekyll.yml&lt;/em&gt; file is up-to-date.&lt;/p&gt;

&lt;h1 id=&quot;configuring-jekyll-paginate-v2&quot;&gt;Configuring Jekyll-Paginate-V2&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;OK&lt;/em&gt;, now that my site can successfully be built &amp;amp; deployed &lt;a href=&quot;#configuring-github-actions-for-github-pages-build--deploy&quot;&gt;via GitHub Actions&lt;/a&gt;, I need to get the &lt;strong&gt;&lt;a href=&quot;https://github.com/sverrirs/jekyll-paginate-v2/tree/master&quot;&gt;jekyll-paginate-v2&lt;/a&gt;&lt;/strong&gt; plugin enabled and setup. Ultimately, it’s pretty simple to get set up and surprisingly backwards-compatible (with the classic &lt;a href=&quot;https://jekyllrb.com/docs/pagination/&quot;&gt;jekyll-paginate&lt;/a&gt; plugin), but there’s a few bugs and other little tidbits to know so you don’t pull your hair out…&lt;/p&gt;

&lt;h6 id=&quot;caching-bug&quot;&gt;Caching Bug&lt;/h6&gt;

&lt;p&gt;The most insidious bug with getting the &lt;a href=&quot;https://github.com/sverrirs/jekyll-paginate-v2&quot;&gt;Jekyll-Paginate-V2&lt;/a&gt; plugin to work is the “&lt;strong&gt;caching bug&lt;/strong&gt;”. This is described here - &lt;a href=&quot;https://www.adamsdesk.com/posts/jekyll-paginate-v2-caching-bug-fix/&quot;&gt;Resolve the Jekyll Paginate V2 Caching Bug&lt;/a&gt;. To fix, go to your &lt;em&gt;Gemfile&lt;/em&gt; and replace &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gem &apos;jekyll-paginate-v2&apos;&lt;/code&gt; to either…&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gem &apos;jekyll-paginate-v2&apos;, git: &apos;https://github.com/mohkale/jekyll-paginate-v2.git&apos;, branch: &apos;liquid-cache-bypass&apos;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;or&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gem &apos;jekyll-paginate-v2&apos;, git: &apos;https://github.com/jameshi16/jekyll-paginate-v2.git&apos;, branch: &apos;cache-mismatch-error&apos;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fixed!&lt;/strong&gt;&lt;/p&gt;

&lt;h6 id=&quot;set-indexpage--extension-to-nil&quot;&gt;Set indexpage &amp;amp; extension to nil&lt;/h6&gt;

&lt;p&gt;The second (&lt;em&gt;much more minor&lt;/em&gt;) issue I encountered was with how the plugin wants to tack on ‘index.html’ as the &lt;em&gt;default&lt;/em&gt; name for generated pages. This causes weird, often just &lt;em&gt;unsightly&lt;/em&gt; issues with how the page urls look for paginated pages. You’ll get pages that look like ‘&lt;em&gt;https://domain/paginatedpage/page/3/index.html&lt;/em&gt;’, instead of the cleaner ‘&lt;em&gt;https://domain/paginatedpage/page/3&lt;/em&gt;’. You can fix this by going into your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;config.yml&lt;/code&gt; file and making sure &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;indexpage&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;extension&lt;/code&gt; are set to &lt;em&gt;nil&lt;/em&gt; (as shown below).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  # Optional, the default file extension for generated pages (e.g html, json, xml).
  # Internally this is set to html by default
  extension: 

  # Optional, the default name of the index file for generated pages (e.g. &apos;index.html&apos;)
  # Without file extension
  indexpage: 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h6 id=&quot;understanding-the-v2-pagination-generator&quot;&gt;Understanding the V2 Pagination Generator&lt;/h6&gt;

&lt;p&gt;The last consideration is less of a bug and more of just a &lt;em&gt;need-to-know&lt;/em&gt;. From v1 to v2 pagination links and paginator object variables/methods are largely the same, so much of any existing pagination code/syntax you may have from using the classic &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jekyll-paginate&lt;/code&gt; plugin should continue to work. To enable pagination on other pages, specify the collection you want to load in via the pages front matter, and continue to use the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;paginator.posts&lt;/code&gt; directive (even though you might be using a non-‘post’ collection).&lt;/p&gt;

&lt;p&gt;Here’s more information on the v2 &lt;a href=&quot;https://github.com/sverrirs/jekyll-paginate-v2/blob/master/README-GENERATOR.md&quot;&gt;Pagination Generator&lt;/a&gt;.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;So at the end of the day, I figured it out! As a result, I’ve been able to paginate my &lt;a href=&quot;https://shellsharks.com/notebook&quot;&gt;Notes&lt;/a&gt;, my &lt;a href=&quot;https://shellsharks.com/activity&quot;&gt;Activity&lt;/a&gt; page and my &lt;a href=&quot;https://shellsharks.com/changelog&quot;&gt;Changelog&lt;/a&gt;, while keeping my &lt;a href=&quot;https://shellsharks.com/&quot;&gt;main page&lt;/a&gt; pagination of my blog posts the same. From here, I still want to add pagination for a few other, less-pressing pages, i.e. the &lt;a href=&quot;https://shellsharks.com/captains-log&quot;&gt;Captain’s Log&lt;/a&gt;, &lt;a href=&quot;https://shellsharks.com/podcast&quot;&gt;Podcasts&lt;/a&gt;, &lt;a href=&quot;https://shellsharks.com/tags&quot;&gt;Tags&lt;/a&gt;, &lt;a href=&quot;https://shellsharks.com/devlog&quot;&gt;Devlog&lt;/a&gt; and more!&lt;/p&gt;

&lt;h1 id=&quot;appendix&quot;&gt;Appendix&lt;/h1&gt;

&lt;h6 id=&quot;pagination-links-code&quot;&gt;Pagination Links Code&lt;/h6&gt;

&lt;p&gt;If you want to replicate my paginator trail, the code I use for the links is provided below.&lt;/p&gt;

&lt;div class=&quot;language-html highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- Pagination links --&amp;gt;&lt;/span&gt;

  {% if paginator.page_trail %}
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;ul&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;pagination pagination-sm&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;style=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;display: flex; justify-content:center;&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    {% if paginator.previous_page %}
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;{{ paginator.previous_page_path | prepend: site.baseurl | replace: &apos;//&apos;, &apos;/&apos; }}&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;ni&quot;&gt;&amp;amp;laquo;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;&lt;span class=&quot;ni&quot;&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/YOURPAGEHERE&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;First&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;&lt;span class=&quot;ni&quot;&gt;&amp;amp;nbsp;&amp;amp;nbsp;&lt;/span&gt;
    {% else %}
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;disabled&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;span&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;aria-hidden=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;ni&quot;&gt;&amp;amp;laquo;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;disabled&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;span&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;aria-hidden=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;ni&quot;&gt;&amp;amp;nbsp;&lt;/span&gt;First&lt;span class=&quot;nt&quot;&gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;&lt;span class=&quot;ni&quot;&gt;&amp;amp;nbsp;&amp;amp;nbsp;&lt;/span&gt;
    {% endif %}
    {% for trail in paginator.page_trail %}
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;
        {% if paginator.page == trail.num %}
          {{ trail.num }}
        {% else %}
          {% if trail.num == 1 %}
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/YOURPAGEHERE&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;{{ trail.num }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
          {% else %}
            &lt;span class=&quot;nt&quot;&gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/YOURPAGEHERE/page/{{trail.num}}&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;title=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;{{trail.title}}&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;{{ trail.num }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
          {% endif %}
        {% endif %}
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;ni&quot;&gt;&amp;amp;nbsp;&amp;amp;nbsp;&lt;/span&gt;
    {% endfor %}
    {% if paginator.next_page %}
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;/YOURPAGEHEREy/page/{{ paginator.total_pages }}/&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Last&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&lt;/span&gt; ({{paginator.last_page}})&lt;span class=&quot;ni&quot;&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;{{ paginator.next_page_path | prepend: site.baseurl | replace: &apos;//&apos;, &apos;/&apos; }}&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;ni&quot;&gt;&amp;amp;raquo;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    {% else %}
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;disabled&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;span&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;aria-hidden=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;Last&lt;span class=&quot;ni&quot;&gt;&amp;amp;nbsp;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
      &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;disabled&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&amp;lt;span&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;aria-hidden=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;true&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;ni&quot;&gt;&amp;amp;raquo;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
    {% endif %}
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
  {% endif %}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Wed, 29 Jan 2025 11:48:00 -0500</pubDate>
        <link>https://shellsharks.com/devlog/pagination-nation</link>
        <guid isPermaLink="true">https://shellsharks.com/devlog/pagination-nation</guid>
        
        <category>devlog</category>
        
        <category>development</category>
        
        <category>github</category>
        
        <category>actions</category>
        
        <category>jekyll</category>
        
        <category>technology</category>
        
      </item>
    
      <item>
        <title>Collection all the things!</title>
        <author>mike@shellsharks.com (Mike)</author>
        <shark:summary><p>This site is <a href="/architecture">built</a> using <a href="https://jekyllrb.com">Jekyll</a>, and one of Jekyll’s (and other SSGs I’m sure) most powerful features is <a href="https://jekyllrb.com/docs/collections/">Collections</a> - used to group related content together. When I was building the <a href="/activity">Activity</a> log page recently, I was looking for ways to pull in content from around the site to feature in that timeline. I already had <a href="/multiplicity-of-writing#posts">posts</a>, <a href="/multiplicity-of-writing#notes">notes</a> and <a href="/multiplicity-of-writing#captain-logs">logs</a> in their respective collections but <a href="/changelog">changes</a> and <a href="/podcast">podcasts</a> existed in singular page files, making it more difficult to pull individual records out without using some wacky JS/jQuery. It was then I had the idea to convert these monolithic pages, breaking them out into more atomic collection items. <em>So that’s what I did</em>!</p>
</shark:summary>
        <description>&lt;p&gt;This site is &lt;a href=&quot;https://shellsharks.com/architecture&quot;&gt;built&lt;/a&gt; using &lt;a href=&quot;https://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt;, and one of Jekyll’s (and other SSGs I’m sure) most powerful features is &lt;a href=&quot;https://jekyllrb.com/docs/collections/&quot;&gt;Collections&lt;/a&gt; - used to group related content together. When I was building the &lt;a href=&quot;https://shellsharks.com/activity&quot;&gt;Activity&lt;/a&gt; log page recently, I was looking for ways to pull in content from around the site to feature in that timeline. I already had &lt;a href=&quot;https://shellsharks.com/multiplicity-of-writing#posts&quot;&gt;posts&lt;/a&gt;, &lt;a href=&quot;https://shellsharks.com/multiplicity-of-writing#notes&quot;&gt;notes&lt;/a&gt; and &lt;a href=&quot;https://shellsharks.com/multiplicity-of-writing#captain-logs&quot;&gt;logs&lt;/a&gt; in their respective collections but &lt;a href=&quot;https://shellsharks.com/changelog&quot;&gt;changes&lt;/a&gt; and &lt;a href=&quot;https://shellsharks.com/podcast&quot;&gt;podcasts&lt;/a&gt; existed in singular page files, making it more difficult to pull individual records out without using some wacky JS/jQuery. It was then I had the idea to convert these monolithic pages, breaking them out into more atomic collection items. &lt;em&gt;So that’s what I did&lt;/em&gt;!&lt;/p&gt;

&lt;p&gt;For &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;changes&lt;/code&gt;, I’ve decided to go with a “change collection item” being 1 week in length, with a file for each week. For &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;podcasts&lt;/code&gt;, each podcast has its own record file and for now those files simply redirect to the Podbean permalink page where it is hosted. &lt;em&gt;But!&lt;/em&gt; since I have the full-text shownotes in each file, I can &lt;a href=&quot;https://shopify.github.io/liquid/tags/iteration/&quot;&gt;programmatically loop&lt;/a&gt; through each podcast collection item and populate the main &lt;a href=&quot;https://shellsharks.com/podcast&quot;&gt;Podcast&lt;/a&gt; page with a bulleted list of show descriptions, much like I’ve always had, but now it is no longer statically typed. &lt;em&gt;Woo!&lt;/em&gt; Similarly for changes, the Changelog still has some legacy changes listed in monolithic format (i.e. a &lt;em&gt;gigantic&lt;/em&gt; list of bulleted sections), but for all changes in 2024+, they are programatically pulled in from the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;changes&lt;/code&gt; collection and populated much the same way they’ve always been right inside the main &lt;a href=&quot;https://shellsharks.com/changelog&quot;&gt;Changelog&lt;/a&gt; page. &lt;em&gt;Nice!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;My takeaway here is to consider in the future (and now looking back) what repeated/similar content would make sense to exist as a collection rather than a single, giant file. I haven’t pored through everything in my site to see if there’s any worthy candidates for additional conversion &lt;em&gt;yet&lt;/em&gt; but eventually I will. Collections give you the ability to do &lt;strong&gt;multiple&lt;/strong&gt; things with the same set of data. As I’ve seen with both &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;changes&lt;/code&gt; &amp;amp; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;podcasts&lt;/code&gt;, I can now populate both their landing pages as well as the &lt;a href=&quot;https://shellsharks.com/activity&quot;&gt;Activity&lt;/a&gt; feed with minimal additional effort.&lt;/p&gt;
</description>
        <pubDate>Tue, 16 Apr 2024 12:23:00 -0400</pubDate>
        <link>https://shellsharks.com/devlog/collection-all-the-things</link>
        <guid isPermaLink="true">https://shellsharks.com/devlog/collection-all-the-things</guid>
        
        <category>devlog</category>
        
        <category>jekyll</category>
        
        <category>technology</category>
        
      </item>
    
      <item>
        <title>Devlog 1: initialization</title>
        <author>mike@shellsharks.com (Mike)</author>
        <shark:summary><p>As I introduced <a href="/multiplicity-of-writing#devlogs">here</a>, this is a new content series for the site dedicated to discussing/sharing code, how-to’s, resources and more - specific to how I am building this site and related Shellsharks properties (i.e. <a href="/podcast">podcast</a>, <a href="/fediverse">Fediverse</a>, etc…)</p>
</shark:summary>
        <description>&lt;p&gt;As I introduced &lt;a href=&quot;https://shellsharks.com/multiplicity-of-writing#devlogs&quot;&gt;here&lt;/a&gt;, this is a new content series for the site dedicated to discussing/sharing code, how-to’s, resources and more - specific to how I am building this site and related Shellsharks properties (i.e. &lt;a href=&quot;https://shellsharks.com/podcast&quot;&gt;podcast&lt;/a&gt;, &lt;a href=&quot;https://shellsharks.com/fediverse&quot;&gt;Fediverse&lt;/a&gt;, etc…)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://shellsharks.com/devlog&quot;&gt;&lt;i class=&quot;ph ph-code-block lg&quot;&gt;&lt;/i&gt;&lt;/a&gt;  &lt;a href=&quot;https://shellsharks.com/feeds/devlog-feed.xml&quot;&gt;&lt;i class=&quot;ph ph-rss lg&quot;&gt;&lt;/i&gt;&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Wed, 10 Apr 2024 09:33:00 -0400</pubDate>
        <link>https://shellsharks.com/devlog/initialization</link>
        <guid isPermaLink="true">https://shellsharks.com/devlog/initialization</guid>
        
        <category>devlog</category>
        
        <category>development</category>
        
        <category>technology</category>
        
        <category>nosearch</category>
        
      </item>
    
  </channel>
</rss>
