Skip to content

Commit

Permalink
update blog with categories for pages
Browse files Browse the repository at this point in the history
  • Loading branch information
hazelweakly committed Dec 10, 2024
1 parent 2a213b0 commit 4da1ae1
Show file tree
Hide file tree
Showing 14 changed files with 79 additions and 22 deletions.
25 changes: 25 additions & 0 deletions src/_includes/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,31 @@ <h1 id="{{ title | slugify }}" tabindex="-1">
><span>{{ title }}</span></a
>
</h1>
{% if tags %}
{% if (tags | select("equalto", "rant")) != "" %}
<p data-nosnippet>
<em>
I am normally nuanced and full of empathy for differing perspectives; I try very hard to present things in a balanced way and to steer away from inflamatory nonsense that doesn’t actually result in making things better.
</em>
<em>
However, this is a rant, because I am having feelings, and those feelings are going to be feel’d.
</em>
</p>
<div class="py-2"><hr></div>
{% endif %}

{% if (tags | select("equalto", "note")) != "" %}
<p data-nosnippet>
<em>
This is a note. Notes, for me, are something that didn't quite deserve as much length as a full blog post.
</em>
<em>
Allowing myself to write notes helps me write things without committing to a long and lengthy exposition :)
</em>
</p>
<div class="py-2"><hr></div>
{% endif %}
{% endif %}
{{ content | safe }}
</article>
<meta property="og:type" content="article" data-helmet="og:type" />
19 changes: 19 additions & 0 deletions src/_includes/tag-nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- [Posts](/blog){role=tab}
- [Notes](/tags/note){role=tab}
- [Rants](/tags/rant){role=tab}
- [External](/tags/external){role=tab}

{.cluster role=list}

<style data-helmet="blog">
[role="tab"],
[role="tab"]:focus,
[role="tab"]:hover {
border-width: 0;
border-style: double;
border-color: hsl(var(--color-bg));
border-bottom-width: var(--space-0-5);
border-bottom-color: hsl(var(--color-bg));
cursor: pointer;
}
</style>
2 changes: 1 addition & 1 deletion src/_meta/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const parseAsMarkdown = (data) => markdownLibrary.render(data);
// Ok fine I'll use an HTML parser. Ugh, whatever.
const excerpt = (post) => {
const doc = new jsdom.JSDOM(post);
const content = [...doc.window.document.querySelectorAll("h1 ~ *")]
const content = [...doc.window.document.querySelectorAll("h1 ~ *:not([data-nosnippet])")]
.map((x) => x.textContent.trim())
.join(" ")
.replace(/[\r\n]+/g, " ");
Expand Down
3 changes: 2 additions & 1 deletion src/_meta/transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export const markdownLibrary = markdownIt({
.use(markdownItAttrs, {
leftDelimiter: "{",
rightDelimiter: "}",
allowedAttributes: ["id", "class", /^data-.*$/],
allowedAttributes: ["id", "class", /^data-.*$/, /^role.*$/],
})
.use(markdownItAnchor, {
level: 2,
Expand Down Expand Up @@ -334,6 +334,7 @@ const blog = (api) =>
api
.getFilteredByTag("_blog")
.filter((p) => !p?.data?.draft)
.filter(p => p?.data?.tags?.every(t => t !== "note" && t !== "rant"))
.sort((a, b) => +a?.data?.order - +b?.data?.order);

const headerPages = (api) =>
Expand Down
7 changes: 1 addition & 6 deletions src/blog/bpac-best-practices-as-code.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
---
title: "BPaC: Best Practices As Code"
date: 2024-02-25
description: Infrastructure as code is great and all, but why is it that we've completely failed as an industry when it comes to best practices as code?
---

_I am normally nuanced and full of empathy for differing perspectives; I try very hard to present things in a balanced way and to steer away from inflamatory nonsense that doesn't actually result in making things better._
_However, this is a rant, because I am having feelings, and those feelings are going to be feel'd._

tags: [rant]
---

Infrastructure as code is great and all, but why is it that we've completely failed as an industry when it comes to best practices as code?
Expand Down
8 changes: 1 addition & 7 deletions src/blog/i-just-want-the-simple-thing.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
---
title: "I Just Want The Simple Thing"
date: 2024-06-10
description: >-
*snorts line of code* HAVE YOU EVER WANTED TO DO ONE SIMPLE THING BUT INSTEAD YOU ENDED UP NEEDING TO RUN AN ENTIRE COMPUTE CLUSTER?
---

_I am normally nuanced and full of empathy for differing perspectives; I try very hard to present things in a balanced way and to steer away from inflamatory nonsense that doesn't actually result in making things better._
_However, this is a rant, because I am having feelings, and those feelings are going to be feel'd._

tags: [rant]
---

\*snorts line of code\* **_HAVE YOU EVER WANTED TO DO ONE SIMPLE THING THAT COULD BE ACCOMPLISHED BY A WELL DEFINED LIBRARY + 200 LINES OF CODE BUT INSTEAD YOU ENDED UP NEEDING TO RUN AN ENTIRE KUBERNETES CLUSTER?_**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: "OpenTelemetry Challenges: Handling Long-Running Spans"
date: 2024-10-10
external: https://thenewstack.io/opentelemetry-challenges-handling-long-running-spans/
tags: [external]
---

> Long running spans are one of my biggest "we don't really actually have a good standard solution for this" issues in opentelemetry.
Expand Down
1 change: 1 addition & 0 deletions src/blog/overengineering-isn-t-real.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Overengineering Isn't Real"
date: 2024-01-20
tags: [note]
---

I find it fascinating that we talk about overengineering as if it's a thing in software engineering.
Expand Down
8 changes: 1 addition & 7 deletions src/blog/scale-down-to-scale-up.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
---
title: "Scale Down to Scale Up"
date: 2024-02-19
description: >-
"If your service can't be run on a laptop, your service doesn't deserve to be ran in a cluster" - Marilyn Monroe
---

_I am normally nuanced and full of empathy for differing perspectives; I try very hard to present things in a balanced way and to steer away from inflamatory nonsense that doesn't actually result in making things better._
_However, this is a rant, because I am having feelings, and those feelings are going to be feel'd._

tags: [rant]
---

> "If your service can't be run on a laptop, your service doesn't deserve to be ran in a cluster" - Marilyn Monroe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "The 4 Evolutions of Your Observability Journey"
date: 2024-10-03
external: https://thenewstack.io/the-4-evolutions-of-your-observability-journey/
tags: [external]
---

> When going on an observability journey, there tends to be a few concrete phases that every company goes through.
Expand Down
1 change: 1 addition & 0 deletions src/blog/the-overloaded-output-cliff.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "The Overloaded Output Cliff"
date: 2023-12-15
tags: [note]
---

There's this thing about group work which is really interesting and somewhat hard to quantify, but it's something I've been spending a lot of effort fixing in my team lately.
Expand Down
1 change: 1 addition & 0 deletions src/blog/why-i-do-what-i-do.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Why I Do What I Do"
date: 2024-08-13
tags: [note]
---

I thought today about why I do what I do.
Expand Down
2 changes: 2 additions & 0 deletions src/pages/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ eleventyImport:
collections: ["blog"]
---

{% include "tag-nav.html" %}

{% for post in collections.blog | reverse %}

- [{{ post.data.title }}]({{ post.url }}){.font-heading .text-3}
Expand Down
21 changes: 21 additions & 0 deletions src/pages/tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
pagination:
data: collections
size: 1
alias: tag
permalink: /tags/{{ tag }}/
eleventyComputed:
title: "`{{ tag | capitalize }}`s"
eleventyExcludeFromCollections: true
---

{% include "tag-nav.html" %}

{% set taglist = collections[ tag ] %}
{% for post in taglist | reverse %}

- [{{ post.data.title }}]({{ post.url }}){.font-heading .text-3}
<time class="italic" datetime="{{ post.date.toISOString() }}">{{ post.date | postDate }}</time> {.bordered-box}

{% endfor %}
{.flow .flow-5}

0 comments on commit 4da1ae1

Please sign in to comment.