<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="https://mistress-of-my-domain.com//feed.xml" rel="self" type="application/atom+xml" /><link href="https://mistress-of-my-domain.com//" rel="alternate" type="text/html" /><updated>2026-03-16T22:57:08-07:00</updated><id>https://mistress-of-my-domain.com//feed.xml</id><title type="html">Mistress of My Domain</title><subtitle>Exploring web technology with a retired computer scientist.</subtitle><author><name>Carol Wang</name></author><entry><title type="html">The semantic web and schemas?</title><link href="https://mistress-of-my-domain.com//blog/best%20practices/semantic-web-and-schemas.html" rel="alternate" type="text/html" title="The semantic web and schemas?" /><published>2026-03-16T00:00:00-07:00</published><updated>2026-03-16T00:00:00-07:00</updated><id>https://mistress-of-my-domain.com//blog/best%20practices/semantic-web-and-schemas</id><content type="html" xml:base="https://mistress-of-my-domain.com//blog/best%20practices/semantic-web-and-schemas.html"><![CDATA[<p>TL;DR: how <a href="#rdfhtml">RDFaL and HTML</a> interact.</p>
<p>For a while now, I have been working on my Jekyll theme,
  <a href="http://struct.arghc.ca/">structRDFaL</a>, which is meant to
  make generating structured data in accordance with
  <a href="https://schema.org/">schema.org</a> easier.  As stated,
  improving SEO for your site is a secondary concern for paying
  attention to schemas.  It should be about best practices and being a
  good netizen with just a little bit more effort.</p>

<p>The "a little bit more effort" is key to my current dilemma.
  schema.org has lots of information and examples, but presented in a
  way that more or less expects that you know what is going on.  I
  have yet to find a bridge between the list of types and examples on
  a random schema page and the hard core (?) mostly unreadable (to me)
  <a href="https://www.w3.org/TR/rdf-schema/"
     title="just an example">technical standards type of
     documents</a>.  I would very much like to find a popsci type
  explainer/implementation describer on this topic.  I expect that
  part of the problem is that I chose to use
  <a href="https://www.w3.org/TR/rdfa-lite/">RDFa Lite</a> vs JSON
  which would not (?) have the "envelope" problems I have encountered.
  Thus, I continue to be a cut-and-paste keyboard monkey and not a
  properly informed technician.</p>
<p>The problem with being a keyboard monkey is the endless and
  repetitive testing by doing and checking the results, instead of
  knowing and doing (and then testing to see if it's been properly
  implemented 🥸).  In the midst of the Sisyphean coding by validation
  testing, I had a crisis of faith.  Why was I doing this?  If SEO is
  not the goal, then could/should I make do with proper structured
  HTML usage and call it a day?  What did the Semantic Web want in the
  first place???</p>
<p><a href="https://www.w3.org/2001/sw/BestPractices/">W3's Semantic
    Web Best Practices document</a> was not helpful.  More than half
  the links on the
  <a href="https://www.w3.org/2001/sw/BestPractices/Tutorials">tutorial
    page</a> are <span title="2026-03">currently</span> dead.  I'm not
  trying to make my own
  <a href="https://www.w3.org/TR/rdf-schema/">technical vocabulary</a>
  ... <a href="https://chineseknotting.org/glossary/"
	 title="Glossary section from my Chinese Knotting site">or am
    I???</a>.</p>
<p>In any case, I'm certainly not trying to help <strong>you</strong>
  (or anyone who might choose to use my structRDFaL Jekyll theme)
  write your own formal 'net recognized vocabulary.  So, why am I
  doing this?  schema.org schemas are not even proper standards type
  things!  Part of it, perhaps, is suffering from sunk cost (fallacy?)
  problems.  So much time already wasted trying to do this thing, so
  just finish it.  Most schemas like Blog or Book were relatively easy
  to implement (just a little more effort).  Trying to make a
  <a href="http://struct.arghc.ca"
     title="on my structRDFaL explainer site">generic HowTo tool</a> 
  has been a bear, though.  Are schemas actually useful to the
  semantic web or no?  What am I even doing and why??</p>
<p>This is my existential crisis, however, and you should not care. 😅
  So, let me share what I have discovered about
  <span title="RDFa Lite">RDFaL</span> for my fellow keyboard monkeys
  and leave it at that, for now.</p>
<section id="rdfhtml">
  <h2>RDFaL and HTML interaction</h2>
  <p>HTML element tags <em>envelope</em>/contain schema structures in
    what I find to be an inconsistent way.  Sometimes when you tag a
    schema property 2 layers down, it is not recognized as part of the
    same structure.
    <figure>
      <figcaption>Modified example from
	<a href="https://schema.org/HowTo">HowTo</a></figcaption>
      <pre>
&lt;div property="itemListElement" typeof="HowToDirection"&gt;
  &lt;meta property="position" content="1"/&gt;
  &lt;a href="more.html"&gt;
    &lt;p property="text"&gt;Turn on your hazard lights and set the
      flares.&lt;/p&gt;
  &lt;/a&gt;
&lt;/div&gt;
      </pre>
    </figure>
    <figure>
      <figcaption><a href="https://validator.schema.org/">https://validator.schema.org/</a>
	output</figcaption>
      <pre>
Detected               <span style="color: red;">1 ERROR</span>   0 WARNINGS  2 ITEMS
<em>Unspecified Type</em>       <span style="color: red;">1 ERROR</span>   0 WARNINGS  1 ITEM
HowTo                  0 ERRORS  0 WARNINGS  1 ITEM
      </pre>
      The ERROR is on the on the &lt;p&gt; line and says<br>
      <samp style="color: red"><em>Unspecified Type</em> (The @type is required and cannot be an empty string.)</samp>
    </figure>
  </p>
  <p>The broken-ness is not always an error.  Sometimes structures are
    recognized as separate fragments such as a howTo and 3 other
    howToDirections rather than a single howTo with however many
    sections, steps, and directions inside of it.</p>
  <p>Operating on the assumption that you must have schema tags in
    every layer in order to end up with a single complete structure
    instead of disparate fragments, I began testing.  I wanted to know
    what to do if I had an image that could expanded
    (<code>&lt;a&gt;</code>).  What to do if I were to tag a structure
    as a <code>&lt;figure&gt;</code> and what happens if an image was
    a <code>&lt;picture&gt;</code> vs <code>&lt;img&gt;</code>?</p>
  <p>Additionally, in the official example code, there is
    <figure>
      <figcaption>Tagging the img directly</figcaption>
      <pre>
&lt;div property="itemListElement" typeof="HowToDirection"&gt;
  &lt;meta property="position" content="1"/&gt;
  &lt;img alt="image showing positioning of jack" <strong>property="duringMedia" </strong>
    src="position-jack.jpg" /&gt;
  &lt;div property="text"&gt;Position the jack underneath the car, 
    next to the flat tire.&lt;/div&gt;
&lt;/div&gt;	
      </pre>
    </figure>
    as well as
    <figure>
      <figcaption>Tagging the img as an object</figcaption>
      <pre>
&lt;div property="itemListElement" typeof="HowToDirection"&gt;
  &lt;meta property="position" content="1"/&gt;
  &lt;div <strong>property="beforeMedia" typeof="ImageObject"&gt;</strong>
    &lt;img alt="image showing car while still on the ground" 
      <strong>property="contentUrl"</strong> src="car-on-ground.jpg" /&gt;
  &lt;/div&gt;
&lt;/div&gt;
      </pre>
    </figure>
    Are they both correct?  Is one actually a mistake?!?  🤷🏻‍♀️</p>
  <p>The following "work", but are they "correct"?  At least they
  validate with schema.org's validator: 
    <figure>
      <figcaption>Sequence tagging an <code>&lt;img&gt;</code></figcaption>
      <pre>
&lt;div property="itemListElement" typeof="HowToDirection"&gt;
  &lt;meta property="position" content="1"/&gt;
  &lt;<strong>img</strong> alt="..." <strong>property="duringMedia"</strong> src="position-jack.jpg" /&gt;
&lt;/div&gt;
      </pre>
    </figure>
   
    <figure>
      <figcaption>Generic <code>&lt;figure&gt;</code> tagging with
	sequence</figcaption> 
      <pre>
&lt;div property="itemListElement" typeof="HowToDirection"&gt;
  &lt;meta property="position" content="2"/&gt;
  &lt;figure <strong>property="beforeMedia" typeof="MediaObject"&gt;</strong>
    &lt;img alt="..." <strong>property="contentURL"</strong> src="car-on-ground.jpg" /&gt;
  &lt;/figure&gt;
&lt;/div&gt;
      </pre>
    </figure>

    <figure>
      <figcaption>Specific <code>&lt;figure&gt;</code> tagging with
	sequence</figcaption> 
      <pre>
&lt;div property="itemListElement" typeof="HowToDirection"&gt;
  &lt;meta property="position" content="3"/&gt;
  &lt;figure <strong>property="beforeMedia" typeof="ImageObject"&gt;</strong>
    &lt;img alt="..." <strong>property="image"</strong> src="car-on-ground.jpg" /&gt;
  &lt;/figure&gt;
&lt;/div&gt;
      </pre>
    </figure>

    <figure>
      <figcaption>Tagging text vs images</figcaption> 
      <pre>
&lt;div property="itemListElement" typeof="HowToDirection"&gt;
  &lt;meta property="position" content="4"/&gt;
  &lt;figure property="duringMedia" <strong>typeof="textObject"</strong>&gt;
    &lt;p <strong>property="text"</strong>&gt;...&lt;/p&gt;
  &lt;/figure&gt;
&lt;/div&gt;
      </pre>
    </figure>
    <figure>
      <figcaption>Media without a specified sequence can be used, but
	if for some reason you want/need a tag to fill in the layers
	you can use <code>AssociatedMedia</code> as a generic
	non-sequence <code>property</code>.  If your media is an
	image, the you can use <code>typeof="mediaObject"</code> if
	you don't care to get more specific and the
	<code>&lt;img&gt;</code> will take care of the
	<code>type</code>.  Unfortunately, not so in the case of
	<code>text</code>.  There you will need to add both a
	<code>typeof="textObject"</code> and a
	<code>property="text"</code>.</figcaption> 
      <pre>
&lt;div property="itemListElement" typeof="HowToDirection"&gt;
  &lt;meta property="position" content="5"/&gt;
  &lt;figure <strong>property="AssociatedMedia"</strong> typeof="textObject"&gt;
    &lt;p property="text"&gt;...&lt;/p&gt;
  &lt;/figure&gt;
&lt;/div&gt;
      </pre>
    </figure>
  </p>
  <p>Having struggled and wrangled to discover all that, I
    <em>recently</em> discovered that while an
    <code>&lt;a&gt;</code> layer disrupts the recognized structure of
    the schema, neither <code>&lt;figure&gt;</code> nor
    <code>&lt;picture&gt;</code> do.  In fact, you can use
    <em>both</em> <code>&lt;figure&gt;</code> and
    <code>&lt;picture&gt;</code> then just <code>property</code> tag
    the <code>&lt;img&gt;</code> within and it still works
    properly. 🤦🏻‍♀️
    <pre>
&lt;div property="itemListElement" typeof="HowToDirection"&gt;
  &lt;meta property="position" content="6"/&gt;
  &lt;figure&gt;
    &lt;picture&gt;
      &lt;img property="image" src="..." /&gt;
    &lt;/picture&gt;
  &lt;/figure&gt;
&lt;/div&gt;
    </pre>
  </p>
  <p>If linking an expanded image and you want the linking anchor
    (image) to be recognized in the data structure, then sequence
    tag the link and give the image anchor the <code>thumbnail</code>
    property.

    <figure>
      <figcaption>Just image</figcaption>  
      <pre>
&lt;a property="beforeMedia" href="bigger-before.jpg"&gt;
  &lt;img property="thumbnailURL" alt="..." src="before-thumb.jpg" /&gt;
&lt;/a&gt;
      </pre>
    </figure>
    <figure>
      <figcaption>Unnecessarily tagged picture layer because I don't
	understand what the <code>thumbnail</code> property is
	doing (it's certainly not recognized here but doesn't break
	anything if it's included?).</figcaption>
      <pre>
&lt;a property="duringMedia"  href="bigger-during.jpg"&gt;
  &lt;picture property="thumbnail"&gt;
    &lt;img property="thumbnailURL" alt="..." src="during-thumb.jpg" /&gt;
  &lt;/picture&gt;	
&lt;/a&gt;
      </pre>
    </figure>
    If you were to use them all in a single Direction, though, there
    is no particular recognition of association between a particular
    thumbnail to a particular media.  Is this therefore "wrong"??
    🤷🏻‍♀️
    <figure>
      <figcaption>Validator output.  Even though the
	before/during/after medias were coded in that order, the
	recognized structure doesn't see them that way?  What does it
	mean??</figcaption>
      <pre>
itemListElement
   @type                      HowToDirection
   position                   2
   text                       some instructional text
   afterMedia                 after text
   beforeMedia                https://example-test.site/bigger-before.jpg
   thumbnailUrl               https://example-test.site/before-thumb.jpg
   duringMedia                https://example-test.site/bigger-during.jpg
   thumbnailUrl               https://example-test.site/during-thumb.jpg	
      </pre>
    </figure>
  </p>    
</section>]]></content><author><name>Carol Wang</name></author><category term="blog" /><category term="best practices" /><category term="jekyll" /><category term="themes" /><category term="structured data" /><category term="semantic web" /><category term="schemas" /><summary type="html"><![CDATA[TL;DR: how RDFaL and HTML interact. For a while now, I have been working on my Jekyll theme, structRDFaL, which is meant to make generating structured data in accordance with schema.org easier. As stated, improving SEO for your site is a secondary concern for paying attention to schemas. It should be about best practices and being a good netizen with just a little bit more effort.]]></summary></entry><entry><title type="html">Jekyll and Layout inheritance and data sharing</title><link href="https://mistress-of-my-domain.com//blog/jekyll/Jekyll-and-layout-inheritance.html" rel="alternate" type="text/html" title="Jekyll and Layout inheritance and data sharing" /><published>2026-01-28T00:00:00-08:00</published><updated>2026-01-28T00:00:00-08:00</updated><id>https://mistress-of-my-domain.com//blog/jekyll/Jekyll-and-layout-inheritance</id><content type="html" xml:base="https://mistress-of-my-domain.com//blog/jekyll/Jekyll-and-layout-inheritance.html"><![CDATA[<p>In my theme,
  <a href="https://github.com/arghc/structRDFaL">structRDFaL</a>, I
  have a <em>default</em> page layout and a <em>sitehome</em> layout
  which repeats most of what is in the <em>default</em>.  This is not 
  <a href="https://en.wikipedia.org/wiki/Don%27t_repeat_yourself"
     title="Don't Repeat Yourself">DRY</a> and I always felt foolish
  that <em>sitehome</em> could not inherit most of its processing from
  <em>default</em>.  I had a similar issue when implementing schemas,
  for instance the Book schema, and I wanted the flexibility to have a
  book page vs a book blog post.  This, as I remember doing but then
  later deleted for reasons I can't remember from 4 years ago, was
  accomplished by putting most of the processing into an include file.
  This felt inelegant and a failure of my ability to understand
  layouts.</p> 
<p>One problem was that the schema differences between
  webpage-of-a-thing vs webpage-that-is-a-blogposting-of-a-thing
  extended into the header stuff, so <em>default</em> being a complete
  page layout that would be used as the (duh) default layout for other
  pages caused issues similar to the ones that I was having
  with <em>sitehome</em>.</p>
<p>I could solve some of my problems if I could process some data and
  then pass a new page title or similar down to <em>default</em>.  An
  answer from 
  <a href="https://talk.jekyllrb.com/">Jekyll Talk</a> or
  <a href="https://stackoverflow.com/search?q=jekyll">Stack
    Overflow </a> that I can no longer find said variables defined in
  one layout could be accessed by another depending on order of
  inheritance.  That was a lie.  Variables
  (eg. <code>&lcub;% assign myvariable = "something" %&rcub;</code>)
  are not shared between layouts or even the page itself.  Order does
  not matter.  Custom variables
  (eg. <code>&lcub;&lcub; page.title&rcub;&rcub;</code>)
  cannot be assigned to outside of the front matter.  Further, front
  matter cannot handle liquid variables
  <pre>---
title: My Name - &lcub;&lcub; site.tag &rcub;&rcub;
---
This will not work.
</pre>
  A smattering of
  <a href="https://stackoverflow.com/questions/14487110/include-jekyll-liquid-template-data-in-a-yaml-variable">plugins</a>
  have been created to fix this lack, but I don't know what works with
  the current version of Jekyll and it seems that the powers that be
  have <a href="https://github.com/jekyll/jekyll/issues/6815">no
    interest</a> in ever adding liquid interpolation into front matter
  processing.</p>
<p>So, if you want to code in chunks in order to reuse bits and pieces
  <big><b>and</b></big> you want to use variables that change (and not
  just static variables you can insert into front matter) then the
  only answer is includes.  Include files are just merged into the
  text of the layout don't need to "share" data.  The main annoyance
  for me is that Liquid logic and flow control is so verbose.  It
  feels like if you were allowed to have data cascade through your
  inherited layouts it would not feel so much like amateur hour
  kludging.</p>
<p>For a less emotional illustration of the issue, imagine that you
  have 4 types of pages that require processing of the
  <code>&lt;header&gt;</code> in general plus the title
  <code>&lt;h1&gt;</code> differently, say, sitehome, bloghome, blog
  page, and standard page.  Footer, nav, and general page layout is
  the same which is put into a <em>default</em> layout. Obviously, you
  would need to code some switches into your <em>default</em> for the
  special cases but 4 is manageable.  Then you start adding new types
  like, say, gallery home and gallery page, catalog home and catalog
  page, forum home and forum page.  Databases or data files are
  involved so you can't just pass known text to the layout.  The code
  explodes into a massive blob of if-then-else special cases.
  Wouldn't it be nice if, instead, you could designate pages with
  a <em>gallery page</em> layout, access the database, do some
  processing and pass the title plus custom breadcrumbs
  to <em>default</em>?  Maybe <em>gallery page</em> and <em>catalog
    page</em> share some logic but access different databases so
  both <em>gallery</em> and <em>catalog</em> could share
  a <em>framed</em> layout which eventually slots
  into <em>default</em>. <strong>If only processed variables could be
    passed between layouts.</strong></p>
<p>The problem here is most intractable if <em>default</em> is
  inviolable.  If, say, you are using a theme that you don't want to
  re-clone or re-merge your customizations with each new release.</p>
<p>In any case, this is not to say that layout inheritance doesn't
  work or that it is useless.  It was, however, a little
  counter-intuitive when I was trying to map it all out for my own
  mental model and using non-standard fragments.  Let's say all your
  layouts are like this (except for <em>default</em> not having a
  further layout): 
  <pre>---
layout: default
---
1&lt;br&gt;
&lcub;&lcub; content &rcub;&rcub;
1&lt;br&gt;</pre>
  Then you get
  <pre>(default)
1
"page content"
1
(default)
</pre>
  Which is not how my mind's eye expects
  <code>[stuff] &lcub;&lcub; content &rcub;&rcub; [stuff]</code>
  to end up.  Part of it is no doubt due to thinking of the layouts as
  envelopes, so then you don't expect the basic/core envelope to be
  the outermost.</p>
<p>Another confusing factor is that I was using fragments (as
  previously mentioned) to test out ideas of having header pieces in a
  layout that would then be completed in the basic/default layout but
  Jekyll was oh-so helpfully adding a basic html page's skeleton
  because my default layout didn't have anything of the sort.
  Frustrating and boggling when I wasn't expecting it.  Further
  experimentation has shown, though, that if I at least put the
  <code>&lt;html>&lt;body>&lt;/body>&lt;/html></code> in myself,
  I <em>can</em> have layouts with wacky incomplete page
  fragments.</p>
<p>Now that I know exactly what my parameters are, I can decide for
  myself if I want to use the tools as intended or if shenanigans and
  tomfoolery will rule the day.</p>]]></content><author><name>Carol Wang</name></author><category term="blog" /><category term="jekyll" /><category term="liquid" /><summary type="html"><![CDATA[Passing varibles to layouts.]]></summary></entry><entry><title type="html">Jekyll: Writing a Theme, Part III: Gemming your theme</title><link href="https://mistress-of-my-domain.com//blog/jekyll/writing-a-theme.03.html" rel="alternate" type="text/html" title="Jekyll: Writing a Theme, Part III: Gemming your theme" /><published>2025-06-16T00:00:00-07:00</published><updated>2025-06-16T00:00:00-07:00</updated><id>https://mistress-of-my-domain.com//blog/jekyll/writing-a-theme.03</id><content type="html" xml:base="https://mistress-of-my-domain.com//blog/jekyll/writing-a-theme.03.html"><![CDATA[<p>Here's <a href="https://rossta.net/blog/how-to-specify-local-ruby-gems-in-your-gemfile.html">some
  advice</a> about how
  to <a href="https://sourcediving.com/use-bundler-local-repository-override-when-developing-your-git-gems-7beeea3818c0">let
  Bundler know where to find your gem</a> while you are developing on

  your local machine so that you don't need to develop in public by
  pushing your gem up to GitHub all the time <strong>and</strong>
  without telling Bundler that your gem is, in
  fact, <a href="https://stackoverflow.com/questions/4487948/how-can-i-specify-a-local-gem-in-my-gemfile#answer-4488110">local
    in your Gemfile</a>.
</p>
<p>Once your local development is done, here's my reference for pushing it out to the world: <a href="https://webdesign.tutsplus.com/how-to-create-and-publish-a-jekyll-theme-gem--cms-27475t">How to Create and Publish a Jekyll Theme Gem - David Darnes</a>.</p>
<p>I should really make a separation from the structRDFal demo site
  from the theme itself, even if that's just the background colours
  somewhere else...?</p>]]></content><author><name>Carol Wang</name></author><category term="blog" /><category term="jekyll" /><category term="themes" /><category term="gem" /><category term="git" /><category term="bundler" /><summary type="html"><![CDATA[Here's some advice about how to let Bundler know where to find your gem while you are developing on]]></summary></entry><entry><title type="html">Getting Started with 11ty … or not</title><link href="https://mistress-of-my-domain.com//blog/11ty/11ty-the-beginning-and-end.html" rel="alternate" type="text/html" title="Getting Started with 11ty … or not" /><published>2024-12-02T00:00:00-08:00</published><updated>2024-12-02T00:00:00-08:00</updated><id>https://mistress-of-my-domain.com//blog/11ty/11ty-the-beginning-and-end</id><content type="html" xml:base="https://mistress-of-my-domain.com//blog/11ty/11ty-the-beginning-and-end.html"><![CDATA[<p>It is time to start a new site and the question is should I use
  Jekyll, as all my other current sites use (those that aren't still
  hand-coded HTML) or try something new.  I've been wanting to try
  something new for a while but common sense (?) says that I should
  just use what I've been using, because why keep reinventing the
  wheel?  I'm not saying that I'm some sort of big industry or
  innovator, but I did write some plug-ins and generators for Jekyll
  and I liked being able to add/modify the functionality and wanted to
  continue to do so.</p>

<p>Based on occasional idle research, I decided that I was choosing
  between 11ty and Hugo.  They are the fastest static site generators
  (SSGs) and Jekyll was getting slow for my bigger sites.  Hugo uses
  the Go programming language (sometimes called Golang) which in my
  aged and judgmental opinion is a "real" language as it is based on
  C.  I learned Ruby for Jekyll, I could learn Go for Hugo.  11ty uses
  JavaScript which is an abomination that I have selectively blocked
  from browsers for decades.  My unreasoning hatred for JavaScript is
  why I have resisted 11ty for a number of years now (I
  don't <em>think</em> it was a thing when I first started work with
  Jekyll?), but so many developers who are my CSS reference sources
  are 11ty adherents so maybe I should???</p>
<p>Rooting for Hugo, I tried to take a logical and practical approach
  to deciding between the two.  Hugo reportedly has the edge in speed.
  Both are FOSS.  So much of 11ty's purported advantage is based on
  the idea that you already know JavaScript, which I do not.  In any
  case, the deciding factor was plugin documentation.  I found some
  <a href="https://github.com/gohugoio/hugo/issues/321">vague
    stuff</a> about plugins "could" be written for Hugo by writing
  modules in Go.  11ty's plugin authoring documentation
  is <a href="https://github.com/5t3ph/eleventy-plugin-template">less
    vague</a> and, while not as abundant as I remember Jekyll
  documentation being, at least exists.  A couple of videos that claim
  to be how-tos can be found on YouTube.  Instructions for what should
  be a text-heavy exercise does not belong in video format.</p>
<p>** Old bag yells at clouds (and prepares to learn JavaScript) **</p>
<hr>
<p>Following 11ty's own <a href="https://www.11ty.dev/docs/">getting
    started guide</a>, I had to insert a <code>brew install npm</code>
  *sigh*...  Finishing the page we end up with, basically, a "Hello,
  World" type of thing.  The first thing I want to change is the
  output going to <code>source-directory/_site</code>, where do I do
  that?  It takes a few minutes but there's no
  default <a href="https://www.11ty.dev/docs/config/">configuration
    file</a>.  That's stupid.  Sure, don't put anything in there that
  you don't need to keep things light, but in what universe would
  you not end up needing a configuration file?
  <span title="disgusted face">8-P</span></p>
<p>Configuration should be the easiest part, but I'm already in
  trouble in as much as there wasn't a default configuration
  file <em>and</em> the configuration file is not even remotely
  plaintext.  We are already programming in JavaScript <em>and</em>
  most of the getting started tutorials assume we know how to do that
  or don't cover configuration at all!  Add to this that there are (at
  least) two major formats of JavaScript itself (CommonJS and ESM) so
  the tutorials that do cover configuration don't match which cripples
  my default in-context contrast and compare learning style.  I just
  wanted to tweak an existing config file and get started with
  something basic.  Instead I have to learn how much JavaScript
  first?</p>
<p>Trying to find some ESM configuration file examples, I came
  across <a href="https://stackoverflow.com/questions/67647762/configure-eleventy-not-to-use-directories-for-output"
	    title="StackOverflow thread about link prettification">this</a>.
  Now, I can understand some graphic designer wanting
  "<a href="https://en.wikipedia.org/wiki/Clean_URL">pretty links</a>"
  if they are uninformed and afraid of the messiness, but a programmer
  enforcing that nonsense is just nausea-inducing and
  disqualifying.</p>
<p>Part of my eagerness to move away from Jekyll has to do with
  something I read about a redesign in which they intended to remove
  Pages as a content type.  That was a while ago and since it does not
  appear to have happened, perhaps I can stop worrying?  That or try
  harder to look for Hugo documentation about plugins?  
  <span title="shrug emoticon" class="emoticon">¯\_(ツ)_/¯</span></p>]]></content><author><name>Carol Wang</name></author><category term="blog" /><category term="11ty" /><category term="static" /><category term="plugins" /><summary type="html"><![CDATA[It is time to start a new site and the question is should I use Jekyll, as all my other current sites use (those that aren't still hand-coded HTML) or try something new. I've been wanting to try something new for a while but common sense (?) says that I should just use what I've been using, because why keep reinventing the wheel? I'm not saying that I'm some sort of big industry or innovator, but I did write some plug-ins and generators for Jekyll and I liked being able to add/modify the functionality and wanted to continue to do so.]]></summary></entry><entry><title type="html">To 11ty or not?</title><link href="https://mistress-of-my-domain.com//blog/11ty/11ty-or-not.html" rel="alternate" type="text/html" title="To 11ty or not?" /><published>2022-11-18T00:00:00-08:00</published><updated>2022-11-18T00:00:00-08:00</updated><id>https://mistress-of-my-domain.com//blog/11ty/11ty-or-not</id><content type="html" xml:base="https://mistress-of-my-domain.com//blog/11ty/11ty-or-not.html"><![CDATA[<p>So, I had noticed that <a href="https://thinkdobecreate.com/"
			     title="personal site">Stephanie
    Eckles</a>, respected <a href="https://moderncss.dev/">CSS</a>
  <a href="https://smolcss.dev/">figure</a> had
  mentioned <a href="https://www.11ty.dev/">11ty</a> (or Eleventy) as
  one of the <a href="https://11ty.rocks/">things she does</a>.  And
  once I started looking around, chatter about 11ty was
  everywhere.</p>

<p>Now, I was/(am?) deeply into
  <a href="/blog/categories/jekyll/"
     title="Jekyll tagged MoMD posts">Jekyll</a>,
  industriously building it out with plugins, generators, and such to
  create the perfect standards based, sematic webified, site engine.
  Why would I want to restart that sort of thing from scratch with
  11ty???  Other than the apparent momentum of people jumping ship
  from Jekyll to 11ty, many of whom I was using as guidance in my CSS
  adventures.  Why would I want to learn this new thing, now?</p>
<p>Two things caught my eye: 
  <ul>
    <li> 11ty is much faster</li>
    <li> better templating options
  </ul>
  So, my bigger sites, which I don't consider to be that big because 
  I've never been that faithful of a blogger, are taking an awful long
  time to process.  Creeping from seconds into minutes and that's both
  annoying and only going to get worse.  As for the templating thing,
  that's a big can of worms because I had already invested a bunch of
  time and energy into writing plugins and generators for Jekyll.
  Would it be easier or <em>more</em> painful to redo and add to those
  functions with 11ty?</p>
<p>11ty is Javascript based and that's an enormous red flag for me as
  I've spent most of my 'net life avoiding Javascript.  As a result,
  everyone's "11ty is based on Javascript, which you already know!" is
  just not true for me (or Node or Grunt or Gulp or ...).  Of course,
  I didn't know Ruby when I started with Jekyll either, so it's not
  like I can't learn... it's just that I don't want to.
  <span title="grouchy emoticon">( &gt;д&lt;)</span></p>
<p>Then there's the template thing.  11ty is very proud of all the  
  <a href="https://www.11ty.dev/docs/languages/"
     title="11ty on supported template languages">templating languages
    it supports</a>.  <a href="/blog/tags/liquid/">Liquid</a> is
  interesting if flawed and I've never used another templating
  language, so it is tempting to see what else is out there.  For a
  long time, I could not find any useful comparison reviews to help me
  decide on a templating language to try.  I didn't want to jump from
  Liquid to Nunjucks just because all those JS-lovers think it's
  great.  Finally I found a useful
  <a href="https://css-tricks.com/comparing-html-preprocessor-features/">comparison
    chart</a>.</p>
<p>I read through the whole post and based on that plus the 
  <a href="https://css-tricks.com/comparing-html-preprocessor-features/#aa-superchart">handy
    chart</a>, the list cuts down to ERB, Liquid, Twig, or Nunjucks.
  <a href="https://twig.symfony.com/">Twig</a> is PHP based and I'm
  already uninterested in PHP, so: No to
  Twig.  <a href="https://docs.ruby-lang.org/en/2.3.0/ERB.html"
	    title="Embedded RuBy">ERB</a> is actually a generic
  templating system written in Ruby that happens to do HTML.  I don't
  hate Ruby, but signing up for ERB would be signing up for even more
  Ruby <strong>and</strong> even more Javascript ... is there a point
  to that?</p> 
<p>Liquid, of course, I already know, except that Jekyll's Liquid is
  <a href="https://savjee.be/blog/migrating-this-blog-from-jekyll-to-eleventy/">not
   quite the same</a> as 11ty's Liquid.  So, is it better to make a
  clean break?  On the one hand, one of the strengths (?) of 11ty is
  that you can mix and match templating languages.  On the other hand,
  once I start converting tags, filters, plugins, and whatnot to
  filters, shortcodes and plugins would I be just doubling the work
  for myself?</p>
<p>If there were a "native" template language for 11ty it'd be
  Nunjucks... but then there's the whole
  <a href="https://11ty.rocks/posts/introduction-webc/"
     title="11ty rocks intro to">web component</a> "issue".  It's a 
  <a href="https://developer.mozilla.org/en-US/docs/Web/Web_Components"
     title="MDN on WebC">standard</a>, and so merits attention.  It
  also does what we would be using filters/plug-ins/shortcodes for, to
  a certain extent.  What would be best to use?  For my simple needs,
  is WebC a bonfire where a match would do?</p>]]></content><author><name>Carol Wang</name></author><category term="blog" /><category term="11ty" /><category term="html templates" /><category term="html preprocessors" /><category term="static site generators" /><summary type="html"><![CDATA[So, I had noticed that Stephanie Eckles, respected CSS figure had mentioned 11ty (or Eleventy) as one of the things she does. And once I started looking around, chatter about 11ty was everywhere.]]></summary></entry><entry><title type="html">The Semantic Web Rabbit Hole</title><link href="https://mistress-of-my-domain.com//blog/resources/semantic-web-rabbit-hole.html" rel="alternate" type="text/html" title="The Semantic Web Rabbit Hole" /><published>2022-09-08T00:00:00-07:00</published><updated>2022-09-08T00:00:00-07:00</updated><id>https://mistress-of-my-domain.com//blog/resources/semantic-web-rabbit-hole</id><content type="html" xml:base="https://mistress-of-my-domain.com//blog/resources/semantic-web-rabbit-hole.html"><![CDATA[<p>So, I was working on implementing
  the <a href="https://schema.org/Book">Book schema</a> and had gotten
  <a href="http://struct.arghc.ca/testbook.html"
     title="example book page for structRDFa">pages</a>
     and <a href="http://struct.arghc.ca/blog/testbook.html"
     title="example book post for structRDFa">posts</a> working with
     test data off the top of my head.  I had put a hook in for book
     lists and decided that this would be a good place to test
     out <a href="https://jekyllrb.com/docs/collections/">Jekyll
    collections</a>.</p>

<p>Now, I could fabricate more data, but since
  the <a href="https://chineseknotting.org/book/"
	 title="Chinese knotting bibliography page">inspiration for
  wanting book lists</a> in the first place was sitting right there,
  no need to imagine a list.  I'd take a few books from the page,
  create them as collection records, test out the whole collection
  stuff, decide how to template/style a list entry (I was already
  thinking about how to activate/deactivate fields for a nice listing
  format), and Bob's your uncle!  Of course, life is not so simple.</p>
<p>The second book (which in retrospect, I should maybe have skipped?)
  was one of the more complicated types you're likely to encounter: 
  <ol>
    <li> there are multiple editions
    <li> it is the translation of another book
    <li> many elements have multilingual versions
  </ol>
  But, you might say, good test case!  Nothing like "real world" data
  to test your code!  So I started making adjustments.  I'd want to
  have both title (and author name) and translated title show up for
  both the canonical listing of the English edition as well as the
  Chinese edition, <strong>but not</strong> taint things with more
  anglophone chauvinism than necessary due to an anglophone being the
  author of the theme.</p>
<p>Add more fields.  Define them inside the schema and just for the
  page. Book part, per se, done but then I have all this
  publication/publisher information that I wanted to retain.  You can.
  You can define a <code>publisher</code> as
  an <code>Organization</code> and then their <code>address</code> can 
  be a <code>PostalAddress</code> and, and, and... but do you need to?
  Examples on <code>schema.org</code>
  use <a href="https://www.worldcat.org/"
	 title="the world's library catalog">WorldCat</a>
  and <a href="https://viaf.org/" 
	 title="Virtual International Authority File">VIAF</a>
  as <code>resource</code>s.  If I could point to an official record
  somewhere with all the publisher information or even all the author
  information, then I wouldn't have to be storing or coding it myself:
  go there if you're curious or need to know for whatever.</p>
<p>VIAF is hideously confusing at first glance.  It was quick to
  narrow down from "author with this name" to "author of this book
  with this name".  The record had tonnes of other entries that
  I <em>believe</em> are librarians from various different instutions
  doing data entry ever so slightly differently, but no so much that
  the authority's software doesn't collate them together
  (<em>without</em> winnowing them down to a canonical <em>one</em>).
  But they only had one of her five books.</p>
<p>WorldCat on the other hand looked to have all of her books, but
  very few had the cover images, in particular the non-English
  editions making me less certain of my interpretation.  Also, in
  WorldCat, I was unable to winnow out the other authors with the same
  name, so... what to do???</p>
<p>I had hoped that the "official" sources of the world would save me
  from formally formatting a bunch of data and let me just point to
  the references but I have more data than they do, and I am
  begrudgingly willing to encode it.  If I go to the trouble, can I
  contribute it to the world's formatted data?  VIAF and WorldCat are
  library based places.  Of course, you don't want random mischievous
  users polluting your rigorously formatted formal data pool, but you
  still need help, no?  I found
  a <a href="https://acrl.ala.org/anss/index.php/publications/cataloging-qa/what-is-viaf/">document 
  that mentions</a> that VIAF takes "contributions"
  from <a href="https://www.wikidata.org/">WikiData</a>
  which <em>does</em> take user contributions... should I?</p>
<p>The lazy (correct??) voice in my soul says that I could retain this
  extraneous information, unstructured, in the description of my book
  data and call it a day (or even not bother retaining it, who
  cares?).  Does the publisher even exist anymore?  Would/will anyone
  ever need to make use of the information?  These are some of the
  thoughts that plague an info-pack rat.</p>]]></content><author><name>Carol Wang</name></author><category term="blog" /><category term="resources" /><category term="structured data" /><category term="semantic web" /><category term="schema.org" /><category term="Jekyll" /><category term="themes" /><summary type="html"><![CDATA[So, I was working on implementing the Book schema and had gotten pages and posts working with test data off the top of my head. I had put a hook in for book lists and decided that this would be a good place to test out Jekyll collections.]]></summary></entry><entry><title type="html">Jekyll and Hash/Associative Arrays</title><link href="https://mistress-of-my-domain.com//blog/jekyll/Jekyll-and-hash-arrays.html" rel="alternate" type="text/html" title="Jekyll and Hash/Associative Arrays" /><published>2022-09-03T00:00:00-07:00</published><updated>2022-09-03T00:00:00-07:00</updated><id>https://mistress-of-my-domain.com//blog/jekyll/Jekyll-and-hash-arrays</id><content type="html" xml:base="https://mistress-of-my-domain.com//blog/jekyll/Jekyll-and-hash-arrays.html"><![CDATA[<p>Having just once again suffered through the dimly remembered pain
  of learning about Jekyll, Liquid, and hash (associative) arrays, I
  am recording it here to save myself the next time I go for a few
  years between dealing with it.  Official documentation does not say
  this (enough?), I guess because they think, "They can't, so let's
  not bother talking about it."  This leaves the experienced
  programmer new to Liquid going "I should be able to do this, why
  can't I just <code>assign myHash = { one: 1, two: 2 }</code> or
  <code>["one" => "1", "two" => "2"]</code> or some combination of
  braces and quotes or other punctuation?  Do I just have the syntax
  wrong???"</p>

<p>You <strong><big><big>can't</big></big></strong>.  For some reason
  "they" don't want you to.</p>
<p>If you were trying to keep your data close to where you are using
  it in an <code>_include</code>, that's not possible because there's
  no front matter in <code>_include</code>s and you can't
  create/populate an associative array/hash table in regular code
  either.  Hash tables or dictionaries can only be created/defined in
  YML files or front matter.  So, define your hash array in the
  nearest <code>_layout</code> front matter,
  site <code>_config.yml</code>, or site <code>_data/</code> if what
  you really want is to put it in the front matter of
  an <code>_include</code>.</p>
<ol>
  <li> Hash arrays <strong>cannot</strong> be created within
    Jekyll+Liquid 
    <ul>
      <li> vector arrays can
      <li> hash arrays can be created in front matter
	or <code>.yml</code> files
    </ul>
</ol>
<hr>
<h2>Hash Arrays vs Dictionaries</h2>
<p>For some guidance on YML, there's the source from
  <a href="https://yaml.org/spec/1.2.2/#chapter-2-language-overview"
     title="YML syntax">yaml.org</a> and a
  <a href="https://docs.ansible.com/projects/ansible/latest/reference_appendices/YAMLSyntax.html">shorter
    YML guide</a>.  A caveat on the shorter guide, however, don't put
  a "-" in front of dictionary keys.  I'm not sure if that's a quirk
  of <a href="https://github.com/Shopify/liquid/wiki/Liquid-for-Designers/"
   title="more programmer oriented guide to Jekyll's Liquid">Jekyll-Liquid</a>/<a
   href="https://shopify.github.io/liquid/">Shopify Liquid</a>
  though.</p>
<p>To access 
<pre>dictionary:
  zero:
    number: "0"
  one:
    number: "1"
    adj: 
      - "first"
      - "unary"
    ordinal: "primary"
  two:  
    number: "2"
    adj: 
      - "second"
      - "dual"
      - "binary"
    ordinal: "secondary"</pre>
dictionary <code>{"zero"=>{"number"=>"0"}, "one"=>{"number"=>"1", "adj"=>["first", "unary"], "ordinal"=>"primary"}, "two"=>{"number"=>"2", "adj"=>["second", "dual", "binary"], "ordinal"=>"secondary"}}</code><br>

<p>Getting at the data within.  Note that the first thing we try
  doesn't work.<p> 

dictionary[0] <code></code><br>
dictionary.zero <code>{"number"=>"0"}</code><br>
dictionary["one"] <code>{"number"=>"1", "adj"=>["first", "unary"], "ordinal"=>"primary"}</code><br>
dictionary.two.adj[0] <code>second</code><br>
dictionary["two"]["adj"][1] <code>dual</code><br>
dictionary["two"].adj[2] <code>binary</code><br>
</p>]]></content><author><name>Carol Wang</name></author><category term="blog" /><category term="jekyll" /><category term="liquid" /><category term="arrays" /><summary type="html"><![CDATA[Having just once again suffered through the dimly remembered pain of learning about Jekyll, Liquid, and hash (associative) arrays, I am recording it here to save myself the next time I go for a few years between dealing with it. Official documentation does not say this (enough?), I guess because they think, "They can't, so let's not bother talking about it." This leaves the experienced programmer new to Liquid going "I should be able to do this, why can't I just assign myHash = { one: 1, two: 2 } or ["one" => "1", "two" => "2"] or some combination of braces and quotes or other punctuation? Do I just have the syntax wrong???"]]></summary></entry><entry><title type="html">Making a Tag Cloud</title><link href="https://mistress-of-my-domain.com//blog/jekyll/making-a-tag-cloud.html" rel="alternate" type="text/html" title="Making a Tag Cloud" /><published>2022-08-24T00:00:00-07:00</published><updated>2022-08-24T00:00:00-07:00</updated><id>https://mistress-of-my-domain.com//blog/jekyll/making-a-tag-cloud</id><content type="html" xml:base="https://mistress-of-my-domain.com//blog/jekyll/making-a-tag-cloud.html"><![CDATA[<p>Sometimes you decide that you just need a tag (and category)
  cloud.  The top search result was
  from <a href="https://superdevresources.com/tag-cloud-jekyll/">SuperDevResources</a>
  by <a href="https://superdevresources.com/author/kanishk/">Kanishk
    Kunal</a>, which worked pretty well, but I didn't like the sizes,
  and wanted to have fun colours.  Here's my version:

<figure class="highlight"><pre><code class="language-liquid" data-lang="liquid">&lt;section id="tag-cloud"&gt;
  &lt;h2&gt;Web Tech Blog Tag Cloud&lt;/h2&gt;
  &lt;nav&gt;
<span class="cp">{%</span><span class="w"> </span><span class="nt">assign</span><span class="w"> </span><span class="nv">sortedCats</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">site</span><span class="p">.</span><span class="nv">categories</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">sort</span><span class="w"> </span><span class="cp">%}</span>
<span class="cp">{%</span><span class="w"> </span><span class="nt">for</span><span class="w"> </span><span class="nv">category</span><span class="w"> </span><span class="nt">in</span><span class="w"> </span><span class="nv">sortedCats</span><span class="w"> </span><span class="cp">%}</span>
<span class="cp">{%</span><span class="w"> </span><span class="nt">assign</span><span class="w"> </span><span class="nv">cat</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">category</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="cp">%}</span>
  <span class="cp">{%-</span><span class="w"> </span><span class="nt">unless</span><span class="w"> </span><span class="nv">cat</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="s2">"blog"</span><span class="w"> </span><span class="cp">-%}</span>
    &lt;a class="category-cloud" href="<span class="cp">{{</span><span class="w"> </span><span class="nv">site</span><span class="p">.</span><span class="nv">blogPath</span><span class="w"> </span><span class="cp">}}</span>categories/<span class="cp">{{</span><span class="w"> </span><span class="nv">cat</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">slugify</span><span class="p">:</span><span class="w"> </span><span class="s1">'pretty'</span><span class="w"> </span><span class="cp">}}</span>"
        style="color: hsl(<span class="cp">{{</span><span class="w"> </span><span class="s2">"now"</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">date</span><span class="p">:</span><span class="w"> </span><span class="s2">"%N"</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">divided_by</span><span class="p">:</span><span class="w"> </span><span class="mi">400</span><span class="w"> </span><span class="cp">}}</span>, 100%, 40%); font-size: <span class="cp">{{</span><span class="w"> </span><span class="nv">category</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">last</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">size</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">logn</span><span class="w"> </span><span class="cp">}}</span>em"&gt;
            <span class="cp">{{</span><span class="w"> </span><span class="nv">cat</span><span class="w"> </span><span class="cp">}}</span>&lt;/a&gt;
  <span class="cp">{%</span><span class="w"> </span><span class="nt">endunless</span><span class="w"> </span><span class="cp">-%}</span>
<span class="cp">{%</span><span class="w"> </span><span class="nt">endfor</span><span class="w"> </span><span class="cp">%}</span>
<span class="cp">{%</span><span class="w"> </span><span class="nt">assign</span><span class="w"> </span><span class="nv">taglist</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">site</span><span class="p">.</span><span class="nv">tags</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">sort</span><span class="w"> </span><span class="cp">%}</span>
<span class="cp">{%</span><span class="w"> </span><span class="nt">for</span><span class="w"> </span><span class="nv">tagitem</span><span class="w"> </span><span class="nt">in</span><span class="w"> </span><span class="nv">taglist</span><span class="w"> </span><span class="cp">%}</span>
   <span class="cp">{%</span><span class="w"> </span><span class="nt">assign</span><span class="w"> </span><span class="nv">tag</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nv">tagitem</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="w"> </span><span class="cp">%}</span>
    &lt;a class="tag-cloud" href="<span class="cp">{{</span><span class="w"> </span><span class="nv">site</span><span class="p">.</span><span class="nv">blogPath</span><span class="w"> </span><span class="cp">}}</span>tags/<span class="cp">{{</span><span class="w"> </span><span class="nv">tag</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">slugify</span><span class="p">:</span><span class="w"> </span><span class="s1">'pretty'</span><span class="w"> </span><span class="cp">}}</span>"
        style="color: hsl(<span class="cp">{{</span><span class="w"> </span><span class="s2">"now"</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">date</span><span class="p">:</span><span class="w"> </span><span class="s2">"%N"</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">divided_by</span><span class="p">:</span><span class="w"> </span><span class="mi">400</span><span class="w"> </span><span class="cp">}}</span>, 100%, 40%); font-size: <span class="cp">{{</span><span class="w"> </span><span class="nv">tagitem</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">last</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">size</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">logn</span><span class="w"> </span><span class="cp">}}</span>em"&gt;
            <span class="cp">{{</span><span class="w"> </span><span class="nv">tag</span><span class="w"> </span><span class="cp">}}</span>&lt;/a&gt;
<span class="cp">{%</span><span class="w"> </span><span class="nt">endfor</span><span class="w"> </span><span class="cp">%}</span>
    &lt;/nav&gt;
&lt;/section&gt;</code></pre></figure>
</p>
<p>The code is very close to the same except
  that <code>site.blogPath</code> is something I defined for my stuff
  that won't exist for you.  Since everything is in
  the <code>blog</code> category, there didn't seem to be any point to
  including it in the cloud.</p>
<p>For fun, I set the colour
  with <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl">HSL</a>
  with a random hue.  Since the hue defaults to a number that
  represents a degree between 0-360 but larger numbers just act as
  more circuits around the circle, big numbers just add to the
  randomness.  So, I made a pseudorandom number generator by taking
  the current time in seconds and dividing by 400 and rounding to an
  integer.  It works well enough for me.  <span
    title="shrug">¯\_(ツ)_/¯</span>.</p>
<p>For the font sizes, I wanted more size variation, but with a size
  cap.  Obviously, I needed logarithmic math, so I had to make a
  filter like so:
<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="k">module</span> <span class="nn">Jekyll</span>
  <span class="k">module</span> <span class="nn">LogFilter</span>
    <span class="k">def</span> <span class="nf">logn</span><span class="p">(</span><span class="n">input</span><span class="p">)</span>
      <span class="nb">sprintf</span><span class="p">(</span><span class="s2">"%.2f"</span><span class="p">,</span> <span class="mi">1</span> <span class="o">+</span> <span class="no">Math</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="n">input</span><span class="p">,</span> <span class="mi">3</span><span class="p">))</span>
    <span class="k">end</span>
  <span class="k">end</span>
<span class="k">end</span>

<span class="no">Liquid</span><span class="o">::</span><span class="no">Template</span><span class="p">.</span><span class="nf">register_filter</span><span class="p">(</span><span class="no">Jekyll</span><span class="o">::</span><span class="no">LogFilter</span><span class="p">)</span></code></pre></figure>
</p>
<p>For style, I borrowed the basic layout
  from <a href="https://dev.to/alvaromontoro">Alvaro Montoro</a>
  on <a href="https://dev.to/alvaromontoro/create-a-tag-cloud-with-html-and-css-1e90">DEV
  Community</a> like so:
  
<figure class="highlight"><pre><code class="language-css" data-lang="css"><span class="nf">#tag-cloud</span> <span class="nt">h2</span><span class="p">{</span>
    <span class="nl">text-align</span><span class="p">:</span> <span class="nb">center</span><span class="p">;</span>
    <span class="nl">margin-top</span><span class="p">:</span> <span class="m">2em</span><span class="p">;</span>
    <span class="nl">margin-bottom</span><span class="p">:</span> <span class="m">0</span><span class="p">;</span>
<span class="p">}</span> 
<span class="nf">#tag-cloud</span> <span class="nt">nav</span> <span class="p">{</span>
    <span class="nl">display</span><span class="p">:</span> <span class="n">flex</span><span class="p">;</span>
    <span class="nl">flex-wrap</span><span class="p">:</span> <span class="n">wrap</span><span class="p">;</span>
    <span class="nl">align-items</span><span class="p">:</span> <span class="nb">center</span><span class="p">;</span>
    <span class="nl">justify-content</span><span class="p">:</span> <span class="nb">center</span><span class="p">;</span>
<span class="p">}</span>
<span class="nf">#tag-cloud</span> <span class="nt">a</span> <span class="p">{</span>
    <span class="nl">display</span><span class="p">:</span> <span class="nb">block</span><span class="p">;</span>
    <span class="nl">padding</span><span class="p">:</span> <span class="m">0.125rem</span> <span class="m">0.25rem</span><span class="p">;</span>
    <span class="nl">text-decoration</span><span class="p">:</span> <span class="nb">none</span><span class="p">;</span>
    <span class="nl">position</span><span class="p">:</span> <span class="nb">relative</span><span class="p">;</span>
<span class="p">}</span></code></pre></figure>
</p>]]></content><author><name>Carol Wang</name></author><category term="blog" /><category term="jekyll" /><category term="tag cloud" /><category term="pseudorandom" /><category term="plugins" /><category term="css" /><summary type="html"><![CDATA[Sometimes you decide that you just need a tag (and category) cloud. The top search result was from SuperDevResources by Kanishk Kunal, which worked pretty well, but I didn't like the sizes, and wanted to have fun colours. Here's my version:]]></summary></entry><entry><title type="html">Actually Static Comments</title><link href="https://mistress-of-my-domain.com//blog/jekyll/commentary-static.html" rel="alternate" type="text/html" title="Actually Static Comments" /><published>2022-08-23T00:00:00-07:00</published><updated>2022-08-23T00:00:00-07:00</updated><id>https://mistress-of-my-domain.com//blog/jekyll/commentary-static</id><content type="html" xml:base="https://mistress-of-my-domain.com//blog/jekyll/commentary-static.html"><![CDATA[<p>Many and varied are the ways to add comments to your static
  website.  Most of them involve subscribing to services which, if
  you're running your own domain on your own server, might strike you
  as the wrong solution.  "<strong>But</strong>," you might say, "if I
  want to have a comment system on my own site, it would not
  be <em>static</em>
  anymore.  <a href="https://httpd.apache.org/docs/2.4/howto/cgi.html">CGi</a>'s
  are so '90s and who needs the attack vector?"</p>

<p>In your searches, you may have come
  across <a href="https://staticman.net/">Staticman</a> which is open
  source and <em>promises</em> to be static... but the catch is that
  you need to be serving your site
  from <a href="https://github.com/">GitHub</a>.  Even if you can put
  your domain name on it (haven't bothered checking), you are
  definitely <strong>not</strong> running on your own server and, at
  least for me, serving from GitHub misses the point.</p>
<p>Some of my sites have comments
  that <a href="importing-drupal-comments-to-jekyll.html">were
  imported from Drupal</a>.  Obviously that mechanism is gone with the
  conversion to Jekyll, and even though I don't get many comments
  (that aren't spam) I still want the ability for my readers to
  comment.  I just don't want spammers and hackers to have any
  weaknesses to attack.</p>
<p>To be honest, if no one had the ability to comment, I doubt anyone
  would care.  I do have a contact form and my email address on all my
  pages if people want to connect.  But, I developed a comment file
  system and wrote a generator to render
  my <a href="http://struct.arghc.ca/blog/administrivia/hello.world.html">commented
  posts</a>, so why not finish out a system that would work with a
  real, live interactive readership?  My solution works for sites with
  small, calm readership because <em>they</em> need to
  email <em>you</em>, and wait for you read their email and then
  create a comment record by hand and add it to your site.</p>
<p>Having said that, I have no doubt that there are mechanisms that
  can be triggered by email to process a comment to add things to your
  site and cron jobs to process and push out your modified site, but
  that would be an exercise for the reader. <span
  title="grin">( ´ｖ｀)</span></p>]]></content><author><name>Carol Wang</name></author><category term="blog" /><category term="jekyll" /><category term="comments" /><category term="static" /><category term="plugins" /><summary type="html"><![CDATA[Many and varied are the ways to add comments to your static website. Most of them involve subscribing to services which, if you're running your own domain on your own server, might strike you as the wrong solution. "But," you might say, "if I want to have a comment system on my own site, it would not be static anymore. CGi's are so '90s and who needs the attack vector?"]]></summary></entry><entry><title type="html">Upgrading Jekyll and Ruby</title><link href="https://mistress-of-my-domain.com//blog/jekyll/upgrading-jekyll-for-ruby-3.html" rel="alternate" type="text/html" title="Upgrading Jekyll and Ruby" /><published>2022-08-19T00:00:00-07:00</published><updated>2022-08-19T00:00:00-07:00</updated><id>https://mistress-of-my-domain.com//blog/jekyll/upgrading-jekyll-for-ruby-3</id><content type="html" xml:base="https://mistress-of-my-domain.com//blog/jekyll/upgrading-jekyll-for-ruby-3.html"><![CDATA[<p>I was trying to do a simple math thing with Ruby when it occured to
  me that maybe it wasn't working because I wasn't using an up to date
  Ruby.  Since I was intending
  to <a href="https://jekyllrb.com/docs/upgrading/3-to-4/">upgrade
    Jekyll from 3.x to 4.x</a>, I thought "let's just do it
  all!!!"</p>


<p>I searched to see if there was a maximum Ruby version for Jekyll
  before blowing everything up, but only found
  "<a href="https://jekyllrb.com/docs/">Ruby version 2.5.0 or
    higher</a>".  It wasn't until much later (Sorry, I can't find the
  page anymore) that I found a page where someone was asking about
  Ruby versions and someone fairly official mentioning that Ruby 2.7
  (?) being the version that the Jekyll developers themselves
  use.  <a href="https://talk.jekyllrb.com/t/incompatible-with-the-current-version-ruby-3-0/5821/3">This 
  is not that page</a>.</p>
<p>Still, <a href="https://dev.to/michaelcurrin/upgrade-to-ruby-3-intro-184d">this
  series of articles</a> made it seem pretty easy.  Don't listen to
  Michael
  until <a href="https://dev.to/michaelcurrin/upgrade-to-ruby-3-update-projects-9id">part 
    4</a>, though... at least if you're using MacOS.  If you're on a
  Mac, <a href="https://mac.install.guide/ruby/13.html">do this
  instead</a>.  Prior to finding that article, I had done a lot of
  gem/bundle/brew updating without actually affecting the Ruby that
  was being
  used.  <a href="https://medium.com/@gratefulcheddar/installing-rbenv-and-updating-to-the-newest-ruby-version-22c465063450">rbenv
  was also involved</a>, so you can see that I was throwing all the
  spaghetti at the wall.</p>
<p>Of course, that's not the end of the story.  You also need to track
  through your Jekyll files to see where versions are being
  specified.  Check your Gemfile and delete your Gemfile.lock.
  Because I was also developing a theme as a gem, I had
  a <code>name-of-my-theme.gemspec</code> which had versions specified
  in there as well.  After I whack-a-mole'd all of those (and
  regenerated the theme gem), I did a <code>bundle install</code>
  and <code>bundle update</code> to get all the things, like Bundler
  itself, into versions that wanted to work together and
  then <code style="color: red;">Conversion error:
  Jekyll::Converters::Scss encountered an error while converting
    'assets/css/style.scss':</code></p>
<p>I then read a bunch of stuff about people having issues with Sass
  and Jekyll front matter processing or Liquid issues, but my problem
  <code style="color: red;">Error: "var(--nav-width)" is not a 
    number for `max' on line 93:15 of _sass/my-theme.scss, in function 
    `max`</code> made me think maybe it's not a Jekyll-Sass problem,
    but a Sass-modern CSS
  problem.  <a href="https://css-tricks.com/when-sass-and-new-css-features-collide/">Yahtzee</a>!</p>]]></content><author><name>Carol Wang</name></author><category term="blog" /><category term="jekyll" /><category term="ruby" /><category term="upgrading" /><summary type="html"><![CDATA[I was trying to do a simple math thing with Ruby when it occured to me that maybe it wasn't working because I wasn't using an up to date Ruby. Since I was intending to upgrade Jekyll from 3.x to 4.x, I thought "let's just do it all!!!"]]></summary></entry></feed>