<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>development on Ashley Kolodziej - Boston Freelance Web Designer</title><link>https://ashleykolodziej.com/categories/development/</link><description>Recent content in development on Ashley Kolodziej - Boston Freelance Web Designer</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><managingEditor>ashley@lastletterdesign.com (Ashley Kolodziej)</managingEditor><webMaster>ashley@lastletterdesign.com (Ashley Kolodziej)</webMaster><copyright>© 2009-2022 Ashley Kolodziej. All rights reserved.</copyright><lastBuildDate>Sun, 19 Jun 2022 22:00:00 +0000</lastBuildDate><atom:link href="https://ashleykolodziej.com/categories/development/index.xml" rel="self" type="application/rss+xml"/><item><title>How I added Webmentions support to my static website</title><link>https://ashleykolodziej.com/add-webmentions-to-static-site/</link><pubDate>Sun, 19 Jun 2022 22:00:00 +0000</pubDate><author>ashley@lastletterdesign.com (Ashley Kolodziej)</author><guid>https://ashleykolodziej.com/add-webmentions-to-static-site/</guid><description>&lt;p>Reading Miriam Suzanne&amp;rsquo;s &lt;a href="https://www.miriamsuzanne.com/2022/06/04/indiweb/">excellent article&lt;/a> on the complexity of implementing Webmentions got me thinking about the IndieWeb again. I stepped away from social media a while back, but the one thing I&amp;rsquo;ve consistently missed is having a way to record all the little moments that make up who I am. Since I&amp;rsquo;m on break from classes and teaching, I decided to challenge myself by adding Webmentions to my own site and documenting the process. Hopefully it&amp;rsquo;ll help someone else out!&lt;/p>
&lt;hr>
&lt;h2 id="step-one-choose-a-tech-stack">Step one: Choose a tech stack&lt;/h2>
&lt;p>&lt;a href="https://css-tricks.com/de-mystifying-indieweb-on-a-wordpress-site/">I&amp;rsquo;m told this is a lot easier if you use WordPress or a CMS&lt;/a>. That said, despite WordPress being my day-job-specialty, the last evidence of WordPress on my personal site is &lt;a href="https://web.archive.org/web/20161010003336/http://lastletterdesign.com/">over here on archive.org&lt;/a>. So here we are: the tough road. I promise it&amp;rsquo;s not as tough as it looks.&lt;/p>
&lt;p>These days (and by these days, I really mean &amp;ldquo;a decision I made six years ago that I haven&amp;rsquo;t had time to change yet&amp;rdquo;), I use &lt;a href="https://gohugo.io">Hugo&lt;/a> to generate a static site. I didn&amp;rsquo;t want to redesign my entire website to try out Webmentions, so I chose a few online services that paired nicely with my setup. Tech stacks are always a negotiation between personal preference, your current knowledge, how much rework you want to do, and in my case, the path of least pain. I feel very at home with HTML, CSS, &lt;a href="https://www.npmjs.com/">npm&lt;/a>, and GitHub Actions, so my tech stack is based around those:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://gohugo.io/">Hugo&lt;/a> (for site generation)&lt;/li>
&lt;li>&lt;a href="https://www.netlifycms.org/">Netlify CMS&lt;/a> (for content management)&lt;/li>
&lt;li>&lt;a href="https://indielogin.com/">IndieLogin&lt;/a> (for login)&lt;/li>
&lt;li>&lt;a href="https://en.wikipedia.org/wiki/RSS">RSS&lt;/a> (for syndication)&lt;/li>
&lt;li>&lt;a href="https://pages.github.com/">GitHub Pages&lt;/a> (for hosting - &lt;a href="https://cnly.github.io/2018/04/14/just-3-steps-adding-netlify-cms-to-existing-github-pages-site-within-10-minutes.html">this&lt;/a> is how I added Netlify CMS)&lt;/li>
&lt;li>&lt;a href="https://github.com/features/actions">GitHub Actions&lt;/a> (for deployment)&lt;/li>
&lt;li>&lt;a href="webmention.io/">Webmention.io&lt;/a> (for receiving and testing receiving)&lt;/li>
&lt;li>&lt;a href="https://webmention.app/">Webmention.app&lt;/a> (for sending)&lt;/li>
&lt;li>&lt;a href="https://webmention.rocks/">Webmention.rocks&lt;/a> (for testing sending)&lt;/li>
&lt;/ul>
&lt;p>If you&amp;rsquo;re on a static site generator, great! Keep reading, and swap out your generator, hosting, and deploy technologies as needed. The bones of this setup will still be helpful to you.&lt;/p>
&lt;h2 id="step-two-add-indielogin">Step two: Add IndieLogin&lt;/h2>
&lt;p>Logging into &lt;a href="webmention.io/">Webmention.io&lt;/a> is super easy - just use your URL! - &lt;em>if&lt;/em> you have IndieLogin set up. Fortunately, it&amp;rsquo;s super easy to &lt;a href="https://indielogin.com/setup">set up your site to work with IndieLogin&lt;/a>. Just add &lt;code>rel=&amp;quot;me&amp;quot;&lt;/code> to your social media links, and you&amp;rsquo;ll be able to authenticate with your existing social media services.&lt;/p>
&lt;h2 id="step-three-connect-webmentionio-to-your-site">Step three: Connect Webmention.io to your site&lt;/h2>
&lt;p>When you log in, you&amp;rsquo;ll find a settings page with some code somewhat like this, but specific to your username:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-html" data-lang="html">&lt;span style="display:flex;">&lt;span>&amp;lt;&lt;span style="color:#f92672">link&lt;/span> &lt;span style="color:#a6e22e">rel&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;webmention&amp;#34;&lt;/span> &lt;span style="color:#a6e22e">href&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;https://webmention.io/username/webmention&amp;#34;&lt;/span> /&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&amp;lt;&lt;span style="color:#f92672">link&lt;/span> &lt;span style="color:#a6e22e">rel&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;pingback&amp;#34;&lt;/span> &lt;span style="color:#a6e22e">href&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;https://webmention.io/username/xmlrpc&amp;#34;&lt;/span> /&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>I added my personalized version of that code into the head tag of my website.&lt;/p>
&lt;h2 id="step-four-test-that-a-webmention-elsewhere-shows-for-you">Step four: Test that a Webmention elsewhere shows for you&lt;/h2>
&lt;p>Luckily, &lt;a href="webmention.io/">Webmention.io&lt;/a> comes with a handy dandy form at the endpoint for you to test this with. Head on over to your personalized Webmention link from above, and you&amp;rsquo;ll see a simple form to send a happy little mention on over to yourself, Bob Ross-style.&lt;/p>
&lt;p>The source URL will be a page that mentions something about you, and the target URL will be the page that the Webmention should be associated with. Perhaps you already have a mention out there you&amp;rsquo;re aware of. If you are me, you don&amp;rsquo;t because you deleted all your social media and most people didn&amp;rsquo;t know you existed in the first place, making this without question the most difficult part of the entire IndieWeb implementation process.&lt;/p>
&lt;p>I digress.&lt;/p>
&lt;p>In these cases, perhaps it&amp;rsquo;s clearest to &lt;a href="https://ashleykolodziej.com/learning-to-love-hugo/">just Webmention yourself&lt;/a>. I wanted &lt;a href="https://github.com/voxpelli/node-webmention-testpinger">node-webmention-testpinger&lt;/a> to work so badly, but I couldn&amp;rsquo;t get it to work like I expected. Let me know if you can get it to work and how, because I love the variety of formats it tests.&lt;/p>
&lt;p>In my case, the source was this post&amp;rsquo;s URL, and the target was &lt;code>https://ashleykolodziej.com/learning-to-love-hugo/&lt;/code>. After you submit the form and see a &amp;ldquo;pending&amp;rdquo; message, give it a refresh. With luck, you&amp;rsquo;ll see it change to &amp;ldquo;Success&amp;rdquo;!&lt;/p>
&lt;p>Head back on over to your dashboard at &lt;a href="webmention.io/">Webmention.io&lt;/a>, and you&amp;rsquo;ll see a brandy-new Webmention.&lt;/p>
&lt;h2 id="step-five-add-microformat-classes-to-your-content">Step five: Add microformat classes to your content&lt;/h2>
&lt;p>I noticed many posts stop right around getting other people&amp;rsquo;s Webmentions to your website, which sure seems like the type of thing you could get away with doing if people knew about you. If, like me, your problems are more centered around people &lt;em>not&lt;/em> knowing about you, adding the ability to send Webmentions is one way to fix that. And to do that, we need to do some markup work so the right data is going out with these mentions.&lt;/p>
&lt;p>First, identify the type of content you&amp;rsquo;re likely to create a Webmention with, and then take a look at the &lt;a href="https://microformats.org/wiki/Main_Page#Specifications">Microformats specification&lt;/a> to see which microformat matches best. In my case, it&amp;rsquo;s a blog post, so I chose to use the &lt;a href="https://microformats.org/wiki/h-entry">h-entry microformat&lt;/a>. After taking a look at my markup, I needed to add an &lt;code>h-entry&lt;/code> class around my entire blog post, a &lt;code>p-name&lt;/code> class to my title, a &lt;code>p-author&lt;/code> to show that I am (indeed) the author of the post, an &lt;code>h-card&lt;/code> which talks a bit more about me (I&amp;rsquo;ll expand on that in a moment), a &lt;code>u-url&lt;/code> class as well as my permalink, and a &lt;code>dt-published&lt;/code> class.&lt;/p>
&lt;h2 id="step-six-add-an-h-card">Step six: Add an h-card&lt;/h2>
&lt;p>An h-card lets the web know (programmatically) who you are as a person. This standardized markup is what allows other websites using Webmentions to show your name and avatar next to mentions or comments. I used &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/microformats#h-card">MDN&amp;rsquo;s excellent h-card example&lt;/a> as a starting point for a card to add my own to the bottom of all my posts. It&amp;rsquo;s pretty simple to build and modify—just add any &lt;a href="https://microformats.org/wiki/h-card">h-card supported property&lt;/a> as a class to your HTML, and other IndieWeb users will get a nicely structured JSON object about you and who you are when you send a Webmention.&lt;/p>
&lt;p>I chose to leave out the physical address and keep my email discoverable, and add a &lt;code>rel=&amp;quot;author&amp;quot;&lt;/code> attribute since I use this website to write articles. I also followed &lt;a href="https://aaronparecki.com/2012/08/17/2/">Aaron Parecki&amp;rsquo;s lead regarding bios&lt;/a> by using the &lt;code>p-note&lt;/code> class to wrap around my entire bio.&lt;/p>
&lt;p>I was curious if the parser would pick up any data that is generally structured with these types of classes, so I added a &lt;code>p-pronouns&lt;/code> class, which isn&amp;rsquo;t officially supported, to see if it would.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-html" data-lang="html">&lt;span style="display:flex;">&lt;span>&amp;lt;&lt;span style="color:#f92672">aside&lt;/span> &lt;span style="color:#a6e22e">class&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;p-author h-card&amp;#34;&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">h2&lt;/span>&amp;gt;About the author&amp;lt;/&lt;span style="color:#f92672">h2&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">img&lt;/span> &lt;span style="color:#a6e22e">class&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;u-photo&amp;#34;&lt;/span> &lt;span style="color:#a6e22e">src&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;https://ashleykolodziej.com/img/profile.jpg&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">alt&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;A white woman with with glasses and long, curled blonde hair at a
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> park, wearing a colorful dress and smiling.&amp;#34;&lt;/span> /&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">p&lt;/span> &lt;span style="color:#a6e22e">class&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;p-note&amp;#34;&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">a&lt;/span> &lt;span style="color:#a6e22e">rel&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;author&amp;#34;&lt;/span> &lt;span style="color:#a6e22e">class&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;p-name u-url&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a6e22e">href&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;https://ashleykolodziej.com&amp;#34;&lt;/span>&amp;gt;Ashley Kolodziej&amp;lt;/&lt;span style="color:#f92672">a&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> (&amp;lt;&lt;span style="color:#f92672">span&lt;/span> &lt;span style="color:#a6e22e">class&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;p-pronouns&amp;#34;&lt;/span>&amp;gt;she/her/hers&amp;lt;/&lt;span style="color:#f92672">span&lt;/span>&amp;gt;) is an
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">span&lt;/span> &lt;span style="color:#a6e22e">class&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;p-job-title&amp;#34;&lt;/span>&amp;gt;Associate Creative Director&amp;lt;/&lt;span style="color:#f92672">span&lt;/span>&amp;gt; in
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;&lt;span style="color:#f92672">a&lt;/span> &lt;span style="color:#a6e22e">href&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;https://www.bu.edu/interactive-design/&amp;#34;&lt;/span> &lt;span style="color:#a6e22e">class&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;p-org&amp;#34;&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> Boston University&amp;#39;s Interactive Design department&amp;lt;/&lt;span style="color:#f92672">a&lt;/span>&amp;gt;. She is
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> currently working on her Master&amp;#39;s degree in User-Centered Design
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> at Brandeis University and teaches classes in design and web
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> development. You can reach her at &amp;lt;&lt;span style="color:#f92672">a&lt;/span> &lt;span style="color:#a6e22e">class&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;u-email&amp;#34;&lt;/span> &lt;span style="color:#a6e22e">href&lt;/span>&lt;span style="color:#f92672">=&lt;/span>&lt;span style="color:#e6db74">&amp;#34;
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> mailto:ashley@lastletterdesign.com&amp;#34;&lt;/span>&amp;gt;ashley@lastletterdesign.com&amp;lt;/&lt;span style="color:#f92672">a&lt;/span>&amp;gt;.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;lt;/&lt;span style="color:#f92672">p&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&amp;lt;/&lt;span style="color:#f92672">aside&lt;/span>&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="step-seven-test-your-h-card">Step seven: Test your h-card&lt;/h2>
&lt;p>The &lt;a href="https://pin13.net/mf2/">pin13 microformats parser&lt;/a> lets you test either a live URL or the HTML. When I tested this blog post, I was excited to see that I was right—my pronouns were listed among the properties!&lt;/p>
&lt;p>It&amp;rsquo;s up to the folks who implement webmentions on their websites what they want to do with the data from here, and as always, you should check if something existing can be used in the spec to mark up your data. But I didn&amp;rsquo;t see anything at a glance that seemed appropriate for pronouns, so I&amp;rsquo;m happy to leave it. It&amp;rsquo;s also neat to see that the parser automatically grabbed the &lt;code>src&lt;/code> and &lt;code>alt&lt;/code> attributes from my photo and structured them nicely in the JSON.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;items&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;type&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;h-card&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;properties&amp;#34;&lt;/span>: {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;note&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;Ashley Kolodziej (she/her/hers) is an Associate
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> Creative Director in Boston University&amp;#39;s Interactive
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> Design department. She is currently working on her
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> Master&amp;#39;s degree in User-Centered Design at Brandeis
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> University and teaches classes in design and web
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> development. You can reach her at
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> ashley@lastletterdesign.com.&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;name&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;Ashley Kolodziej&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;pronouns&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;she/her/hers&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;job-title&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;Associate Creative Director&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;org&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;Boston University&amp;#39;s Interactive Design department&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;photo&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;value&amp;#34;&lt;/span>: &lt;span style="color:#e6db74">&amp;#34;https://ashleykolodziej.com/img/
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> profile.jpg&amp;#34;&lt;/span>,
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;alt&amp;#34;&lt;/span>: &lt;span style="color:#e6db74">&amp;#34;A white woman with with glasses and long,
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> curled blonde hair at a park, wearing a
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#e6db74"> colorful dress and smiling.&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;url&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;https://ashleykolodziej.com&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">&amp;#34;email&amp;#34;&lt;/span>: [
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#e6db74">&amp;#34;mailto:ashley@lastletterdesign.com&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> }
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ],
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="step-eight-add-rss-support-if-you-dont-have-it">Step eight: Add RSS support, if you don&amp;rsquo;t have it&lt;/h2>
&lt;p>You&amp;rsquo;ll need an RSS feed for the next step. Since I&amp;rsquo;m using Hugo, I followed &lt;a href="https://digitaldrummerj.me/hugo-create-rss-feed/">Justin James&amp;rsquo;s excellent instructions&lt;/a> to add an RSS feed template to my Hugo theme. Adding the default template will enable a feed for every content type, &lt;a href="https://ashleykolodziej.com/index.xml">like so&lt;/a>, and it will also automatically enable feeds based on a category, such as &lt;a href="https://ashleykolodziej.com/categories/design/index.xml">this site&amp;rsquo;s design RSS feed&lt;/a>. Right now, I don&amp;rsquo;t have images in the feed. I&amp;rsquo;ll add images to my RSS feed later, since I don&amp;rsquo;t need that to test Webmentions.&lt;/p>
&lt;h2 id="step-nine-set-up-automatic-webmentions-notifications">Step nine: Set up automatic Webmentions notifications&lt;/h2>
&lt;p>A good next step is to test that your new Webmentions functionality shows up properly for someone else. I took inspiration from &lt;a href="https://jamesmead.org/blog/2020-10-13-sending-webmentions-from-a-static-website">James Mead&amp;rsquo;s awesome instructions&lt;/a> to do this with &lt;a href="https://webmention.app/">https://webmention.app/&lt;/a>.&lt;/p>
&lt;p>In his instructions, James abstracted the sending script to &lt;a href="https://github.com/floehopper/send-webmentions">its own GitHub repo&lt;/a> and watched for changes to the RSS feed. But since I&amp;rsquo;m already &lt;a href="https://gohugo.io/hosting-and-deployment/hosting-on-github/#build-hugo-with-github-action">building Hugo with a GitHub Action to host on GitHub Pages&lt;/a>, I know exactly when my RSS feed has been rebuilt, and it&amp;rsquo;s at the end of my action. That&amp;rsquo;s the approach I&amp;rsquo;m going to take here.&lt;/p>
&lt;p>First, install the webmention.app CLI by running &lt;code>npm install @remy/webmention --save-dev&lt;/code> in your project&amp;rsquo;s folder. I used this to test Webmentions locally before adding them to the GitHub action.&lt;/p>
&lt;p>Then, run &lt;code>npx webmention https://your-rss-link-here.xml --limit 1 --debug&lt;/code> using your RSS feed URL to see if your latest post has a valid webmention without actually sending it. Once you&amp;rsquo;ve verified you have valid Webmentions to send out, you can add the CLI command to your GitHub Actions script.&lt;/p>
&lt;p>The action itself is very simple—just add the same commands you&amp;rsquo;d run locally. Don&amp;rsquo;t forget to switch out the URL if you&amp;rsquo;re an avid copy/paster like I am.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yml" data-lang="yml">&lt;span style="display:flex;">&lt;span>- &lt;span style="color:#f92672">name&lt;/span>: &lt;span style="color:#ae81ff">Install Dependencies&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">run&lt;/span>: &lt;span style="color:#ae81ff">npm install&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>- &lt;span style="color:#f92672">name&lt;/span>: &lt;span style="color:#ae81ff">Test Webmentions&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">run&lt;/span>: &lt;span style="color:#ae81ff">npx webmention https://your-rss-link-here.xml --limit 1 --send&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="step-ten-test-that-your-webmention-shows-elsewhere">Step ten: Test that your Webmention shows elsewhere&lt;/h2>
&lt;p>To test if the Webmention actually shows on test content, I used &lt;a href="https://webmention.rocks">https://webmention.rocks&lt;/a>. Each of the links on their homepage tests a different type of HTML that could be used to create a Webmention. I used Test 1 to find out if my test post correctly sent a Webmention through Webmention.io. It went through completely smoothly and without a hitch right away.&lt;/p>
&lt;p>Kidding.&lt;/p>
&lt;p>Realistically, this took me several tries to figure out. My advice is to take a close look at your microformats, and use the &lt;a href="https://pin13.net/mf2/">pin13 microformats parser&lt;/a> to help with debugging. One thing I found out as a result of this is that it looks like Webmentions don&amp;rsquo;t duplicate if you push them out multiple times using webmention.app—they just update.&lt;/p>
&lt;h2 id="bonus-time-add-support-to-hugo-for-inline-attributes">Bonus time: Add support to Hugo for inline attributes&lt;/h2>
&lt;p>If you want to add classes to your Markdown, you can update &lt;a href="https://gohugo.io/getting-started/configuration-markup#goldmark">Hugo&amp;rsquo;s Markdown renderer, Goldmark&lt;/a>, to do that. Set &lt;code>block&lt;/code> to &lt;code>true&lt;/code>, and then add your attributes or classes to any block you like in your Markdown. I&amp;rsquo;m considering using this to add &lt;code>h-cite&lt;/code> and &lt;code>u-in-reply-to&lt;/code> classes to &lt;a href="https://indieweb.org/in-reply-to">add context around my mentions&lt;/a> where it makes sense, such as where I&amp;rsquo;m extending an idea. My thinking is this is generally similar to displaying a tweet. I don&amp;rsquo;t know if this is actually a good idea since this is my first time trying this out, though. If you&amp;rsquo;ve got any thoughts on that, let me know.&lt;/p>
&lt;h2 id="but-wait-webmentions-arent-showing-on-this-site-yet">But wait, Webmentions aren&amp;rsquo;t showing on this site yet!&lt;/h2>
&lt;p>That&amp;rsquo;s absolutely right! I&amp;rsquo;m not at the point where I am actually showing the data for Webmentions on my site yet. That&amp;rsquo;s because Webmentions can cover a myrid of types of interactions you might take on a social media site. Liking, retweeting, bookmarking, citing, referencing, replying, commenting&amp;hellip; the list goes on, and the data can too. Some of these deserve a slightly different user interface treatment, and I don&amp;rsquo;t know what that is for me yet. I do know it deserves its own post, and from here, you can choose how your mentions show on your website. Happy mentioning!&lt;/p></description></item><item><title>Why excellent markup is the foundation of accessible content</title><link>https://ashleykolodziej.com/why-excellent-markup-is-the-foundation-of-accessible-content/</link><pubDate>Fri, 21 May 2021 17:18:10 +0000</pubDate><author>ashley@lastletterdesign.com (Ashley Kolodziej)</author><guid>https://ashleykolodziej.com/why-excellent-markup-is-the-foundation-of-accessible-content/</guid><description>&lt;p>Happy Global Accessibility Awareness day, my friends!&lt;/p>
&lt;p>One of the things I didn&amp;rsquo;t learn until late in my career as a frontend developer was just how important HTML is to accessibility. When I first started learning to write code, HTML felt like a means to an end - something I just needed to get out of the way in order to be able to write CSS.&lt;/p>
&lt;p>How wrong I was.&lt;/p>
&lt;p>This post is for all the newbies out there who might be tempted to skip the fundamentals of HTML. Today, we&amp;rsquo;re going to look at what exactly it is HTML does, and why that&amp;rsquo;s so important for making your websites accessible.&lt;/p>
&lt;h2 id="what-is-html-really">What is HTML, really?&lt;/h2>
&lt;p>HTML is a language of intent - the bridge between what you mean to say, and how the computer interprets it.&lt;/p>
&lt;p>Okay, I realize that sounds a little weird. But hear me out. As a markup language, HTML is all about telling a computer how your content is structured.&lt;/p>
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
&lt;iframe src="https://www.youtube.com/embed/-8yYuRSkSdo" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video">&lt;/iframe>
&lt;/div>
&lt;hr>
&lt;h2 id="why-should-you-care-about-how-a-computer-understands-your-content">Why should you care about how a computer understands your content?&lt;/h2>
&lt;p>Computers are the interface between your content and the rest of the world. This comes up in two contexts: search engine optimization, and accessibility.&lt;/p>
&lt;p>Search engines and screen readers are both computer-based interfaces that help people access information they might not otherwise be able to access. They do two different jobs, and are aimed at two different use cases, but fundamentally, they are the same: computers that interpret human intent in content. This is why so many best practices for accessibility also happen to coincide with good SEO practice.&lt;/p>
&lt;p>Using semantic HTML tags in your layout helps these tools understand your intent in organizing the content, and how to navigate it.&lt;/p>
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
&lt;iframe src="https://www.youtube.com/embed/zM1ZBY1ieuw" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video">&lt;/iframe>
&lt;/div>
&lt;hr>
&lt;h2 id="think-about-what-its-like-to-navigate-a-new-neighborhood">Think about what it&amp;rsquo;s like to navigate a new neighborhood.&lt;/h2>
&lt;p>Imagine if you suddenly placed in an unfamiliar neighborhood that you&amp;rsquo;ve never been in, and needed to find out how to get to the nearest store to buy a drink.&lt;/p>
&lt;p>You might ask someone for directions.&lt;/p>
&lt;p>You might think about some rules you know are usually true - the sun sets in the west. Streets are normally in a grid pattern. Usually, they intersect about once every block.&lt;/p>
&lt;p>You might look for street signs, or traffic signals. These help you understand where you are.&lt;/p>
&lt;hr>
&lt;h2 id="why-is-html-so-important-for-accessibility">Why is HTML so important for accessibility?&lt;/h2>
&lt;p>HTML provides these types of rules and structure to make it possible to navigate content using a computer. Using a screen reader, you can ask HTML for directions - landmarks around the content. Where&amp;rsquo;s the nearest &lt;code>main&lt;/code> content? What are some of the most important pieces of information in this &lt;code>article&lt;/code>, and where can I find them?&lt;/p>
&lt;p>HTML also has some rules that are usually true. Well-formatted HTML headings are always ordered from &lt;code>h1&lt;/code> to &lt;code>h6&lt;/code>, without skipping levels. Skipping a level is kind of like when a road you thought was straight suddenly veers off into a bunch of confusing curves. It can make it difficult to understand where you are in the neighborhood, relative to where you started.&lt;/p>
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
&lt;iframe src="https://www.youtube.com/embed/enP0e5oS9Z8" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video">&lt;/iframe>
&lt;/div>
&lt;hr>
&lt;h2 id="how-do-i-write-more-semantic-html">How do I write more semantic HTML?&lt;/h2>
&lt;p>The simple answer is to always ask yourself if your &lt;em>non-semantic&lt;/em> HTML elements are really the best choice for your content&amp;rsquo;s meaning. Could your &lt;code>div&lt;/code> be a &lt;code>section&lt;/code> instead? In some cases, you need to add HTML to style something in a purely decorative way, and that tag doesn&amp;rsquo;t have any new meaning. But in many cases, &lt;code>section&lt;/code>, &lt;code>aside&lt;/code>, and other elements are much better choices.&lt;/p>
&lt;p>There are &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element">over 100 elements in HTML&lt;/a> - it&amp;rsquo;s easy to get overwhelmed. The videos above will introduce you to the most common semantic HTML elements, so if you&amp;rsquo;re not sure where to start, start with those.&lt;/p>
&lt;hr>
&lt;p>&lt;strong>I&amp;rsquo;m always happy to connect!&lt;/strong>&lt;/p>
&lt;p>🐰 &lt;a href="https://twitter.com/ashleykolodziej">@ashleykolodziej on Twitter&lt;/a>
🐰 &lt;a href="https://www.youtube.com/channel/UCEH9yYZu65uFf9CEB-aH7tg">Professor K Explains on YouTube&lt;/a>&lt;/p></description></item><item><title>The Golden Rules of Code Review Etiquette, as explained by teeny tiny bunnies</title><link>https://ashleykolodziej.com/the-golden-rules-of-code-review-etiquette-as-explained-by-teeny-tiny-bunnies/</link><pubDate>Tue, 18 May 2021 17:21:25 +0000</pubDate><author>ashley@lastletterdesign.com (Ashley Kolodziej)</author><guid>https://ashleykolodziej.com/the-golden-rules-of-code-review-etiquette-as-explained-by-teeny-tiny-bunnies/</guid><description>&lt;p>Inspired by this &lt;a href="https://twitter.com/hashtag/DevDiscuss?src=hashtag_click">#DevDiscuss&lt;/a> on Twitter:&lt;/p>
&lt;blockquote class="twitter-tweet">&lt;p lang="en" dir="ltr">Time for &lt;a href="https://twitter.com/hashtag/DevDiscuss?src=hash&amp;amp;ref_src=twsrc%5Etfw">#DevDiscuss&lt;/a>!&lt;br>&lt;br>Tonight’s topic is… improving code reviews.&lt;br>&lt;br>- Any tips on giving effective feedback in code reviews with someone you don&amp;#39;t know well?&lt;br>- Have you ever felt embarrassed after a code review? How did you handle it? &lt;br>- How do you handle feedback anxiety? &lt;a href="https://t.co/rd0PTAo6ew">pic.twitter.com/rd0PTAo6ew&lt;/a>&lt;/p>&amp;mdash; DEV Community 👩‍💻👨‍💻 (@ThePracticalDev) &lt;a href="https://twitter.com/ThePracticalDev/status/1394820139347070978?ref_src=twsrc%5Etfw">May 19, 2021&lt;/a>&lt;/blockquote>
&lt;script async src="https://platform.twitter.com/widgets.js" charset="utf-8">&lt;/script>
&lt;p>This is the advice I gave folks in my department when starting our code review process up, and three years later, it&amp;rsquo;s still going strong.&lt;/p>
&lt;p>Bunny gifs are critical to the messages that follow and are included here for improved understanding of the rules.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://ashleykolodziej.com/img/8sijp46.jpg" alt="Tiny gray rabbit sitting inside in a one cup measuring cup. The ears are extra smol.">&lt;/p>
&lt;h2 id="keep-your-review-requests-small-and-focused">Keep your review requests small and focused.&lt;/h2>
&lt;p>This helps your reviewer get feedback to you in a timely manner.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://ashleykolodziej.com/img/9yv5.gif" alt="Medium sized tan rabbit binkying on a mattress. This bun has the energy.">&lt;/p>
&lt;h2 id="try-to-get-to-a-review-the-same-day-it-is-requested">Try to get to a review the same day it is requested.&lt;/h2>
&lt;p>Most folks depend on code for upcoming meetings, releases, and to keep moving on our ideas. Don’t let review requests sit.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://ashleykolodziej.com/img/bunny-shower.gif" alt="Small brown rabbit being showered by human. The bun looks confused and uncomfortable.">&lt;/p>
&lt;h2 id="approve-or-request-changes-but-never-comment-only">Approve or request changes, but never comment only.&lt;/h2>
&lt;p>Comments don’t give the author clear direction on whether or not they can move forward. They’re great for discussion, but it’s important to be clear about next steps too.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://ashleykolodziej.com/img/46e5347c715b3a89941adcdf4143c246.gif" alt="Teeny tiny brown rabbit tries to escape a coffee mug it is stuck in by wiggling back and forth. A white rabbit is nearby, completely ignoring the brown rabbit.">&lt;/p>
&lt;h2 id="be-clear-about-what-needs-addressing">Be clear about what needs addressing.&lt;/h2>
&lt;p>If you request changes, be clear about what types of changes are required for approval, and what aren’t, in the overall description for your review.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://ashleykolodziej.com/img/ocwm40ylsixbpruspuckflpvjsn-ek1pzg9oucyo1bgbjvyipytuq6dr_ce3saaa_unpytn0e3rsyckwtj3uflqbaxxbtvgwb7-2lesry44l1oncv4py.gif" alt="White rabbit with floppy ears hops down hallway, carrying a soft rabbit stuffed toy.">&lt;/p>
&lt;h2 id="review-with-teaching-in-mind">Review with teaching in mind.&lt;/h2>
&lt;p>Code review is about helping each other and sharing our knowledge. Phrase your feedback and ideas in a way that helps others around you to learn more about your area of expertise! Don’t make assumptions or get frustrated. Help your coworkers improve instead.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://ashleykolodziej.com/img/et8w8rn.gif" alt="Teeny tiny baby white bunny nuzzles into an opened hand. The ears are roughly the size of your thumb.">&lt;/p>
&lt;h2 id="review-with-empathy">Review with empathy.&lt;/h2>
&lt;p>Deadlines are hard. Being new is hard. Learning is hard. We are all working to be the best people we can be, so take extra care to call out the cool ideas you see and be positive with your feedback. Use fun and appropriate emoji liberally! 🐰 Be aware of your voice and tone - humor is easily misinterpreted in text.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://ashleykolodziej.com/img/tenor.gif-itemid-7362463.gif" alt="Dark gray rabbit runs up and rudely surprises unsuspecting medium gray rabbit from behind, causing the gray rabbit to hop directly into the air.">&lt;/p>
&lt;h2 id="review-with-common-sense">Review with common sense.&lt;/h2>
&lt;p>If you get a review the same morning as a meeting or the week of launch, approve it, but leave your feedback anyway for when the designer or developer won’t be scrambling to improve things. Be deliberate about what’s okay to leave for later.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://ashleykolodziej.com/img/zomg-its-bunday.gif" alt="Medium rabbit runs all over bed, throughout room, and straight out the door.">&lt;/p>
&lt;h2 id="be-aware-that-changes-introduce-bugs">Be aware that changes introduce bugs.&lt;/h2>
&lt;p>Each change that has to be made can impact the stability of the code. Keep this in mind as you review around tight deadlines.&lt;/p>
&lt;hr>
&lt;p>&lt;img src="https://ashleykolodziej.com/img/original.gif" alt="Two teeny tiny fluffy white buns. One falls over backwards, as if it is absolutely, positively over this nonsense.">&lt;/p>
&lt;h2 id="dont-require-perfection">Don’t require perfection.&lt;/h2>
&lt;p>Your job as a reviewer is to act in the best interest of the code and the people you’re working with. Early on, asking someone to refactor repetitive or overly complex CSS or JS is a good call. During QA, it is not.&lt;/p>
&lt;hr>
&lt;p>This list was taken from a code review training I ran for my department a few years ago. &lt;a href="https://docs.google.com/presentation/d/12J3eghKvTDq6dZ7EBVveDEEn6jdEF9nLt-XRGeZjjW8/edit?usp=sharing">Check out the full training on Google Slides.&lt;/a>&lt;/p>
&lt;div class="google-slides-container" id="container"
style="padding-bottom:61.6%; position:relative; display:block; width: 100%">
&lt;iframe id="googleSlideIframe"
width="100%" height="100%"
src="https://docs.google.com/presentation/d/e/2PACX-1vS1uRHzFoxgQ5cjcs910y8Fc2JYCOiHCpNlw8LUS20XRCYVA45958mOjiucHmVZEwVWO89llPZjOUqB/embed?start=false&amp;amp;loop=false&amp;amp;delayms=3000"
frameborder="0" allowfullscreen=""
style="position:absolute; top:0; left: 0">&lt;/iframe>
&lt;/div></description></item><item><title>Seven HTML debugging tips for complete beginners</title><link>https://ashleykolodziej.com/seven-html-debugging-tips-for-complete-beginners/</link><pubDate>Sat, 15 May 2021 17:15:01 +0000</pubDate><author>ashley@lastletterdesign.com (Ashley Kolodziej)</author><guid>https://ashleykolodziej.com/seven-html-debugging-tips-for-complete-beginners/</guid><description>&lt;p>I teach introductory web development classes to students who don&amp;rsquo;t have any programming experience whatsoever, and one of the questions I always get is - how do I debug my code when I don&amp;rsquo;t even really know how to write it just yet?&lt;/p>
&lt;p>Debugging can be overwhelming if you&amp;rsquo;re new to coding or a particular language. Luckily, you don&amp;rsquo;t need to know a language by heart to debug your code. Debugging is just a method of thinking and checking things step by step, one at a time, until you&amp;rsquo;ve discovered what&amp;rsquo;s happening. Anyone can do it with the right checklist!&lt;/p>
&lt;p>So with that in mind, here are my tips for debugging in HTML, including a practice problem and video explanation at the end.&lt;/p>
&lt;h2 id="tip-1-talk-through-what-you-expected">Tip 1: Talk through what you expected&lt;/h2>
&lt;p>When you&amp;rsquo;re stuck, one of the best things you can do is to try talking through what you expected to see, step by step. Talking through what you expected is a great way to start identifying some of the places something might have gone wrong in your code. You can also try writing down some key words while you talk so you don&amp;rsquo;t forget them, such as what elements aren&amp;rsquo;t working like you thought they would. This will help you down the road if you need to Google it.&lt;/p>
&lt;h2 id="tip-2-make-sure-your-code-is-properly-indented">Tip 2: Make sure your code is properly indented&lt;/h2>
&lt;p>Once you&amp;rsquo;ve identified the problem and talked through what you expected to see, the next thing that you can do to help get unstuck is to make sure all your code is properly indented. This is a great step to take because it will force you to go line by line and make sure everything makes sense to you, and it will naturally get you to work on the next tip, which is&amp;hellip;&lt;/p>
&lt;h2 id="tip-3-make-sure-all-tags-are-closed">Tip 3: Make sure all tags are closed&lt;/h2>
&lt;p>There&amp;rsquo;s nothing like a missing close tag in HTML to throw you off! When styles are applying to more of the page than you think they should, or your layout is acting especially wonky with no clear reason in the CSS, a missing close tag is almost always the culprit. The best time to check this is while you are fixing your indentation.&lt;/p>
&lt;h2 id="tip-4-check-for-syntax-errors">Tip 4: Check for syntax errors&lt;/h2>
&lt;p>HTML is pretty permissive when it comes to syntax, but you can still run into trouble if you don&amp;rsquo;t have quotes around your attribute values, or you forget an equals sign, or even miss a closing &lt;code>&amp;gt;&lt;/code> on a tag. These types of errors are called &lt;strong>syntax errors&lt;/strong> - errors that stop your code from running correctly (or in some cases, from working altogether!). The w3c has a &lt;a href="https://www.w3.org/community/webed/wiki/HTML/Training/Tag_syntax">simple explanation of HTML syntax&lt;/a> that can help you double check for these types of errors.&lt;/p>
&lt;h2 id="tip-5-use-an-html-validator">Tip 5: Use an HTML validator&lt;/h2>
&lt;p>Tips 1 through 4 will get the majority of HTML problems solved if you have sharp eyes. But what if you miss something, or you&amp;rsquo;ve written a tag that is syntactically correct, but doesn&amp;rsquo;t actually exist in HTML? This is where a validator can really help you out. Validators automatically check for things like missing close tags, syntax errors, and even tags that don&amp;rsquo;t exist.&lt;/p>
&lt;p>So why not just jump straight to a validator? You can, but you might find some of the errors a little daunting at first. Going through these other preliminary steps can help get you in the right mindset to read and understand error messages in a validator.&lt;/p>
&lt;p>&lt;a href="https://validator.w3.org/">The w3c&amp;rsquo;s validator service&lt;/a> is a great tool for this that you&amp;rsquo;ll want to bookmark.&lt;/p>
&lt;h2 id="tip-6-if-the-error-looks-weird-and-unfamiliar-double-check-your-approach">Tip 6: If the error looks weird and unfamiliar, double check your approach&lt;/h2>
&lt;p>If an error comes up in the validator that just plain does not make sense to you, it might be a good time to start doing some Googling and double checking your approach. Do you understand what the code is doing? Can you explain it line by line? You may have inadvertently used the wrong kind of tag. It&amp;rsquo;s surprisingly easy to do!&lt;/p>
&lt;p>Alternately, you may find there are no syntax errors, in which case, it&amp;rsquo;s time for&amp;hellip;&lt;/p>
&lt;h2 id="tip-7-use-rubber-ducky-debugging">Tip 7: Use rubber ducky debugging&lt;/h2>
&lt;p>If worse comes to worse and you just don&amp;rsquo;t know what&amp;rsquo;s going on, try explaining the problem to your nearest inanimate object - or friend. Even if they don&amp;rsquo;t know how to write HTML, if you can explain your problem to someone who knows nothing about what you&amp;rsquo;re doing, it might help you discover a &lt;strong>logical error&lt;/strong> - or an error in the way that your code is built that isn&amp;rsquo;t necessarily wrong or broken, but also doesn&amp;rsquo;t solve the problem you intended to solve in the first place. If you&amp;rsquo;ve ever heard the term &lt;a href="https://en.wikipedia.org/wiki/Rubber_duck_debugging">&amp;ldquo;rubber ducky debugging&amp;rdquo;&lt;/a>, this is what that is!&lt;/p>
&lt;h2 id="code-along-and-practice-debugging">Code along and practice debugging&lt;/h2>
&lt;p>The best way to learn debugging is to practice and see how others debug. If you want to try some of these steps out, check out my video, &lt;a href="https://youtu.be/1Q-eYG1tCG8">7 Beginner-Friendly Tips for HTML Debugging on YouTube&lt;/a>. I&amp;rsquo;ve included a CodePen practice problem in the description, and I recorded myself explaining these tips step by step as I solve the problem. Try debugging your way first, and then compare it with how I did it, and see how far you can get in solving it.&lt;/p>
&lt;p>Happy coding!&lt;/p>
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
&lt;iframe src="https://www.youtube.com/embed/1Q-eYG1tCG8" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video">&lt;/iframe>
&lt;/div></description></item><item><title>Use the WordPress code editor to pass attributes to your Gutenberg block variations</title><link>https://ashleykolodziej.com/wordpress-gutenberg-block-variation-editing/</link><pubDate>Sat, 10 Apr 2021 22:15:00 +0000</pubDate><author>ashley@lastletterdesign.com (Ashley Kolodziej)</author><guid>https://ashleykolodziej.com/wordpress-gutenberg-block-variation-editing/</guid><description>&lt;p>I’ve been learning Gutenberg block development lately, and one of the things I was struggling with was trying to figure out what parameters I could pass on to blocks defined in block variations. I was looking all over the place for documentation on the parameters each block takes, such as font size and color. Little did I know I had all the documentation I needed right in front of me, in the form of the WordPress code editor.&lt;/p>
&lt;h2 id="wait-whats-a-variation">Wait, what’s a variation?&lt;/h2>
&lt;p>A block variation is an easy way of leveraging WordPress core blocks (and even custom blocks you build) to create your own sets of blocks without writing any React code. You’ll need to write a bit of JavaScript, but it’s a lot like writing an array or object. If you can do that, you can write a block variation.&lt;/p>
&lt;p>I like using block variations to create recommended sets of content and help guide my users in content entry. You can nest blocks in block variations, and do things like pre-set the background or font size on them.&lt;/p>
&lt;h2 id="use-the-editor-to-speed-up-block-variation-development">Use the editor to speed up block variation development&lt;/h2>
&lt;p>My new workflow with block variations is to build the variation just the way I like it in the visual editor, and then switch over to the code editor to grab the attributes I need from there. This lets me set hard-to-remember parameters the right way, like gradients, without having to guess and check, like so:&lt;/p>
&lt;p>&lt;img src="https://ashleykolodziej.com/img/m8hg7bjq1pk76zj8q5ae.jpeg" alt="The attributes in the code editor are between curly braces, and can be used in block variations.">&lt;/p>
&lt;p>Once you identify the block you want to model your variation off of in the code editor, just grab those attributes and bring them back into your block variations code. &lt;a href="https://github.com/ashleykolodziej/professorkexplains-block-variations/blob/solution-code/src/variations/index.js#L61">Here’s what that looks like in my final code.&lt;/a>&lt;/p>
&lt;p>&lt;img src="https://ashleykolodziej.com/img/v6s03fvk2bs6j9ma3hzt.jpeg" alt="Code example demonstrating attributes being passed to a block variation using the attributes parameter.">&lt;/p>
&lt;p>This works for both your variations and your &lt;code>innerBlocks&lt;/code>. &lt;a href="https://github.com/ashleykolodziej/professorkexplains-block-variations/blob/solution-code/src/variations/index.js#L28">Here’s an example in my final code of how I used this in a nested block.&lt;/a>&lt;/p>
&lt;p>&lt;img src="https://ashleykolodziej.com/img/z5pl3yxmaj8qh82eopv9.jpeg" alt="Code example demonstrating attributes being passed to inner blocks in a block variation.">&lt;/p>
&lt;p>Block variations are a low key way to get into Gutenberg block development and get familiar with the ecosystem without getting into React or the more complicated bits. Check it out if you’re new to Gutenberg and looking for a place to start.&lt;/p>
&lt;h2 id="full-tutorial">Full tutorial&lt;/h2>
&lt;p>If you’re new to JavaScript or Gutenberg, I recorded my full process of building block variations using this method in a beginner-friendly way here. I also put together &lt;a href="https://github.com/ashleykolodziej/professorkexplains-block-variations">sample code in GitHub&lt;/a> you can use to get started with a new block variation.&lt;/p>
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
&lt;iframe src="https://www.youtube.com/embed/m6IH-G286DU" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video">&lt;/iframe>
&lt;/div></description></item><item><title>Let's Just Build It: Seven Years of Framework Development at Boston University</title><link>https://ashleykolodziej.com/lets-just-build-it-seven-years-framework-development-boston-university/</link><pubDate>Mon, 23 Jan 2017 00:00:00 +0000</pubDate><author>ashley@lastletterdesign.com (Ashley Kolodziej)</author><guid>https://ashleykolodziej.com/lets-just-build-it-seven-years-framework-development-boston-university/</guid><description>&lt;p>From the teaser:&lt;/p>
&lt;p>The inside look at how the four most terrifying words ever uttered in development history have worked out for Boston University. We’ll cover seven years of successes and lessons learned in framework development, including enforcing brand guidelines in the site, when to allow customization and when to say no, and how on earth to make one codebase flexible enough to accommodate the requests we foresee – and the ones we don’t. If you’ve ever considered using a theme framework to power your WordPress sites, this is the case study for you.&lt;/p>
&lt;p>Presented with Steve Rudolfi at &lt;a href="https://online.wpcampus.org/schedule/seven-years-of-framework-development-at-boston-university/">WPCampus Online 2017&lt;/a>.&lt;/p>
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
&lt;iframe src="https://www.youtube.com/embed/crxriLsBwZ8" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allowfullscreen title="YouTube Video">&lt;/iframe>
&lt;/div></description></item><item><title>First Impressions: Hugo</title><link>https://ashleykolodziej.com/learning-to-love-hugo/</link><pubDate>Mon, 15 Feb 2016 11:21:48 -0500</pubDate><author>ashley@lastletterdesign.com (Ashley Kolodziej)</author><guid>https://ashleykolodziej.com/learning-to-love-hugo/</guid><description>&lt;p>I&amp;rsquo;ve been writing in Markdown for a few months now, and it&amp;rsquo;s been amazing. I mean, anything that enables my Sublime Text habit is going to make me pretty happy, but I know me, and at heart I&amp;rsquo;m a designer. If you give me the ability to design, I will design. Markdown prevents me from doing that so I actually write.&lt;/p>
&lt;p>So when I finally decided to tackle the long overdue task of redoing my portfolio, a static site generator seemed like the natural choice. Because let&amp;rsquo;s be honest - I haven&amp;rsquo;t logged into my Wordpress backend in months.&lt;/p>
&lt;h2 id="why-static">Why static?&lt;/h2>
&lt;p>I&amp;rsquo;ll be the first to admit that static site generators sounded like some flaky fad when I heard about them a year or two ago. Why do I need that? I have Wordpress! This sounds like a lot of work. The list of complaints goes on.&lt;/p>
&lt;p>For me, the ability to write in Markdown in my code editor is the big selling point. Markdown was easy for me to pick up and there was no going back once I got the hang of it. But as I thought more, I realized there were some other really nice benefits too:&lt;/p>
&lt;ul>
&lt;li>In the end, all I&amp;rsquo;m uploading is HTML, CSS, and Javascript, which means I don&amp;rsquo;t have to worry about Wordpress security for my site.&lt;/li>
&lt;li>I can work on my site offline. You can do this with Wordpress as well, but it&amp;rsquo;s a bit messier to set up.&lt;/li>
&lt;li>I can easily version control my entire site, including content.&lt;/li>
&lt;/ul>
&lt;p>To static it was.&lt;/p>
&lt;h2 id="attempt-1-jekyll">Attempt 1: Jekyll&lt;/h2>
&lt;p>I actually gave static site generators a try a few months ago. A coworker of mine was waxing romantic on Jekyll, so that was the first place I stopped. I didn&amp;rsquo;t stick with it. Part of this was likely that I wasn&amp;rsquo;t writing in Markdown regularly yet, but I had a tough time with a lot of other stuff:&lt;/p>
&lt;ul>
&lt;li>Getting set up was difficult. I&amp;rsquo;m not sure if I was looking at the wrong documentation or what, but it took me a solid hour or two just to get things working.&lt;/li>
&lt;li>Installing a theme was painful, and then I still had to try and figure out how to edit it. As &amp;ldquo;skeleton&amp;rdquo; as the theme was, it still had styling that was in my way.&lt;/li>
&lt;li>It felt worse than trying to work in Wordpress. Significantly worse.&lt;/li>
&lt;/ul>
&lt;p>I can really stick it out when I&amp;rsquo;m trying to figure out a code or design problem, but when it comes to tools and UI, I have a very low tolerance for things not going smoothly. Jekyll just wasn&amp;rsquo;t right for me, and I set the issue aside for a while to deal with the holiday season.&lt;/p>
&lt;h2 id="next-hugo">Next: Hugo&lt;/h2>
&lt;p>As I write this, I&amp;rsquo;m actually working in Hugo - I only started work on the new site last night - and love it. Some quick notes on what&amp;rsquo;s working really well for me:&lt;/p>
&lt;ul>
&lt;li>Very quick and easy setup. Completely painless and I had a site up in less than five minutes.&lt;/li>
&lt;li>No assumptions made about how you want to structure your content. I was able to get my dream content structure together in about a night.&lt;/li>
&lt;li>No assumptions made about styling your content - there is even a built in function to create a new skeleton theme, and true to form it only creates the basic directories. You&amp;rsquo;re responsible for creating markup and outputting content.&lt;/li>
&lt;li>Easy livereload and watch support (I&amp;rsquo;m aware Jekyll has this too, but I was never able to get that far)&lt;/li>
&lt;li>Templating for content! The &lt;code>render&lt;/code> function makes it super easy to define a template for a small bit of content you might use in multiple places around the site. I use it to share markup for listing my related posts across different templates.&lt;/li>
&lt;/ul>
&lt;p>The only real issue I&amp;rsquo;ve run into is getting a reference of functions I have access to in Hugo all in one place. Everything is by example, which means I&amp;rsquo;ve had a smooth process getting things going quickly, but I&amp;rsquo;m ready to do some more creative work and wish I had a reference to see all of what I have available to me.&lt;/p>
&lt;p>So far though? Hugo gets an A+ for me. I&amp;rsquo;m excited to dive in and learn more.&lt;/p></description></item><item><title>Faking Watercolor Bleed Using a Simple PNG</title><link>https://ashleykolodziej.com/faking-watercolor-bleed/</link><pubDate>Sat, 13 Feb 2016 20:11:28 -0500</pubDate><author>ashley@lastletterdesign.com (Ashley Kolodziej)</author><guid>https://ashleykolodziej.com/faking-watercolor-bleed/</guid><description>&lt;!-- raw HTML omitted -->
&lt;p>I have a confession to make. That watercolor bleed effect on Marcia Deihl? Nothing more than a simple PNG.&lt;/p>
&lt;p>I just didn&amp;rsquo;t have the time to learn &lt;code>&amp;lt;canvas&amp;gt;&lt;/code> this time around.&lt;/p>
&lt;p>After I finished animating in the journal entries for The Good Life of Marcia Deihl, I found the article just needed a little something else. I wished I had a nice watercolor bleed effect to go with the watercolor background of the journals. Something to bring each item in and tie the whole article together, you know?&lt;/p>
&lt;p>I saw a few ideas out there using &lt;code>&amp;lt;canvas&amp;gt;&lt;/code>, but I needed something quick and reliable. I took a close look at what the real effects did, thought about it, and realized what makes a watercolor bleed look like a watercolor bleed is two things: a fade in, and the bleed stopping at irregular points with a brushlike texture.&lt;/p>
&lt;p>Enter the PNG: master of brushy textures.&lt;/p>
&lt;p>I ended up going with animating in a PNG mask using the same watercolor brush as the edges of each watercolor photo, but in slightly different places. I gave it the same background color as my main article, but with an alpha value of something like .75 so you could see a bit of the image behind it. When you scroll any image into view, the mask scales and out until it no longer covers the image, and animates that alpha value down to 0. That combination of fading in and the mask &amp;ldquo;stopping&amp;rdquo; uncovering the watercolor paper beneath it at different times did the trick for giving the impression of watercolor bleeding in.&lt;/p>
&lt;p>Voila! Watercolor bleed. You could theoretically even acheive this with plain ol&amp;rsquo; CSS and HTML, if you didn&amp;rsquo;t mind the effect happening on load.&lt;/p></description></item><item><title>Realistic SVG Handwriting</title><link>https://ashleykolodziej.com/realistic-svg-handwriting/</link><pubDate>Sat, 13 Feb 2016 19:34:59 -0500</pubDate><author>ashley@lastletterdesign.com (Ashley Kolodziej)</author><guid>https://ashleykolodziej.com/realistic-svg-handwriting/</guid><description>&lt;p>&lt;a href="http://www.bu.edu/bostonia/winter-spring16/marcia-deihl-cambridge/">&lt;em>View the live article here.&lt;/em>&lt;/a>&lt;/p>
&lt;p>Fact: SVG letters will never look like real handwriting.&lt;/p>
&lt;p>I knew I wanted a handwriting effect, and I knew you could animate SVGs. Some quick Googling led me to the most common technique - animate the stroke dash.&lt;/p>
&lt;p>Here&amp;rsquo;s the idea: if you can find the length of a line, and make a dash so large it takes up the entire length of the line, you can animate the length of that dash so it looks like it&amp;rsquo;s being drawn in. Neat!&lt;/p>
&lt;p>The trouble with this is you get very neat lines, and handwriting isn&amp;rsquo;t neat&amp;hellip; especially handwriting from a diary. There&amp;rsquo;s texture, ink bleed, and variation in width and saturation of the ink depending on how quickly you write. No SVG stroke will ever have all these things. And without these things, you get very dead, very not-handwritten looking type. Trust me, I tried. After about a half hour of tracing in Illustrator (and an undisclosed number of horrifying flashbacks to my design school days) with upsettingly bad results, I realized this was not going to work.&lt;/p>
&lt;h3 id="same-stroke-dasharray-different-angle">Same stroke-dasharray, different angle&lt;/h3>
&lt;p>I really needed to be using the original source handwriting, and I needed it to look real. Not traced. I looked at my image, which nearly had a flat color background if you weren&amp;rsquo;t looking too closely.&lt;/p>
&lt;p>You know what else has a flat color? My SVG stroke! What if instead of animating in&amp;hellip; I animated &lt;em>out&lt;/em>? A quick Codepen trial with a similar image, and I realized I was on to something.&lt;/p>
&lt;!-- raw HTML omitted -->
&lt;p>All I needed to do was get the color close enough to the background of my image for the SVG to blend in and act as a mask. As the SVG stroke animates out, it reveals the letters in the image hidden behind it. As an added bonus, I didn&amp;rsquo;t have to make the mask look good in Illustrator. All it had to do was cover the letters sufficiently. Quicker &lt;em>and&lt;/em> better results. I couldn&amp;rsquo;t have asked for more.&lt;/p>
&lt;h3 id="making-peace-with-layer-order-and-animation-order">Making peace with layer order and animation order&lt;/h3>
&lt;p>Now, if you&amp;rsquo;re paying attention to that Codepen, you might have noticed that final t in Ballpoint doesn&amp;rsquo;t look so hot, since the mask for the final cross on that t sits over the main line. Obviously that&amp;rsquo;s not how writing works. What I ended up doing was determining - if you were writing - which areas you would &amp;ldquo;go over&amp;rdquo; twice, and creating a separate png layer for those areas. Anywhere there is a ligature, crossbar, or anything of that nature, I&amp;rsquo;ve carefully layered the PNG parts for that letter and the stroke that goes with it so that this doesn&amp;rsquo;t happen. On the smallest bits of handwriting, it&amp;rsquo;s not noticeable, but it was crucial for the header area.&lt;/p>
&lt;p>What I realized when that happened was that the way I needed things layered in Illustrator for this to work correctly was not the same way I wanted them animated. Take, for example, an A. You can break that into two parts: something like an upside down V, and a crossbar. I need that V over the crossbar. If you know the DOM, you know that means that the SVG is going to put the crossbar first in code, and the V after, so that it is naturally on top. And if you go looking for lines in the SVG and putting them in an array to be animated, it&amp;rsquo;s going to say animate the crossbar first and the upside down V second, which is not how we write.&lt;/p>
&lt;p>The simple solution to this is just to reverse the array so the order of animation is correct, but it was sort of neat, and something I wasn&amp;rsquo;t expecting to run into. Now I know, right?&lt;/p>
&lt;h3 id="keeping-it-realistic">Keeping it realistic&lt;/h3>
&lt;p>What&amp;rsquo;s the difference between a name and a scribble to my code? The speed at which you animate each stroke. It was pretty easy to turn this approach from my header into a small function. Loop through the SVG, find all the lines, animate them using the timing I like for that particular item. This made it very easy to create all the animations that followed. Everything from the scribbles, to the margin writing, to the diary after was as simple as quickly masking the letters in Illustrator and giving them a class of &amp;ldquo;animate&amp;rdquo;.&lt;/p>
&lt;p>I used Waypoints to call that function once the item scrolls just into view. Since some of the animations take some time, it was better to start it earlier than later.&lt;/p></description></item><item><title>#OneBU</title><link>https://ashleykolodziej.com/onebu/</link><pubDate>Thu, 20 Nov 2014 00:00:00 +0000</pubDate><author>ashley@lastletterdesign.com (Ashley Kolodziej)</author><guid>https://ashleykolodziej.com/onebu/</guid><description>&lt;p>A tumblr theme for a photo contest held by Boston University Public Relations. I relied heavily on &lt;a href="https://ifttt.com/">IFTTT&lt;/a> to grab photos from a variety of sources, including Facebook, Twitter, Weibo, RenRen, Google Plus, and Instagram.&lt;/p>
&lt;p>See more at: &lt;a href="http://onebuphoto.tumblr.com/">http://onebuphoto.tumblr.com/&lt;/a>&lt;/p>
&lt;div class="portfolio-scroll">
&lt;div class="portfolio-image" style="max-width: 1920px;">
&lt;img src="https://ashleykolodziej.com/img/screenshot-2022-06-26-at-19-13-59-onebu.png" alt="A Tumblr theme for a photo contest for Boston University. Features a clean, minimal, Pinterest-like design where each photo is laid out to create the best use of space. The top has a slightly blurred image of Boston University in the fall, with the leaves on the trees turning yellow.">
&lt;/div>
&lt;/div></description></item></channel></rss>