mirror of
https://github.com/jbowdre/capsule.git
synced 2024-11-27 15:02:17 +00:00
Compare commits
4 commits
f068e40da1
...
4bc1ddbe4a
Author | SHA1 | Date | |
---|---|---|---|
|
4bc1ddbe4a | ||
5f9a52c36a | |||
|
b81c53e843 | ||
024459f560 |
6 changed files with 163 additions and 0 deletions
34
gemlog/adding-external-link-markers-in-hugo-and-bear.gmi
Normal file
34
gemlog/adding-external-link-markers-in-hugo-and-bear.gmi
Normal file
|
@ -0,0 +1,34 @@
|
|||
I tend to drop a lot of links in my posts. Some point to other posts/pages within the same site, but many point to external sites. As a *reader*, I like to know where a link is going to take me, but as a *writer*, I'm not always great about indicating that context within the text.
|
||||
|
||||
I mentioned in my inaugural "This Week" post[1] that I recently discovered how to use Hugo's link render-hook templates[2] to automatically apply a little `↗` marker to external links posted on runtimeterror[3]. All that took was creating `layouts/_default/_markup/render-link.html` with the following content to overwrite the default rendering:
|
||||
|
||||
=> /this-week-2024-06-29/ 1: inaugural "This Week" post
|
||||
=> https://gohugo.io/render-hooks/links/ 2: Hugo's link render-hook templates
|
||||
=> https://runtimeterror.dev 3: runtimeterror
|
||||
|
||||
```
|
||||
{{- $u := urls.Parse .Destination -}}
|
||||
|
||||
{{- with .Text | safeHTML }}{{ . }}{{ end -}}
|
||||
{{- if $u.IsAbs }}↗{{ end -}}
|
||||
|
||||
{{- /* chomp trailing newline */ -}}
|
||||
```
|
||||
|
||||
That works well with Hugo since the marker gets inserted into the HTML source code at build time. But what about here on Bear?
|
||||
|
||||
So I went looking for a CSS-based solution that would work here. It only took about 30 seconds of searching to find a post from Jake Bauer[1] with the relevant CSS bits.
|
||||
|
||||
=> https://www.paritybit.ca/blog/styling-external-links/ 1: a post from Jake Bauer
|
||||
|
||||
All I needed was to add this block to my Bear theme CSS:
|
||||
|
||||
```
|
||||
a[href^="http"]:where(:not([href*="blog.jbowdre.lol/"]))::after {
|
||||
content: "↗"
|
||||
}
|
||||
```
|
||||
|
||||
That was surprisingly easy, and today I learned you can use complex/compound selectors to perform pattern matching with CSS. Neat!
|
||||
|
||||
=> https://blog.jbowdre.lol/adding-external-link-markers-in-hugo-and-bear/ 📡 Originally posted on jbowdre's weblog
|
|
@ -0,0 +1,4 @@
|
|||
id: "urn:uuid:37aba3f9-8fe8-4356-a514-5ccb7b67a4c5"
|
||||
title: "Adding External Link Markers in Hugo and Bear"
|
||||
published: "2024-06-30T13:35:31.396110Z"
|
||||
updated: "2024-06-30T13:35:31.396110Z"
|
50
gemlog/this-week-2024-06-29.gmi
Normal file
50
gemlog/this-week-2024-06-29.gmi
Normal file
|
@ -0,0 +1,50 @@
|
|||
*These "week in review" posts seem to be pretty popular so I thought I'd jump on that trend, too. Also, I struggle to post regularly. I tell myself it's because I'm busy building things (and documenting things), but Robert Birming assures me that there is always time to write[1]. So let's give that a try.*
|
||||
|
||||
=> https://birming.com/no-time-write/ 1: always time to write
|
||||
|
||||
This was a busy week at work (that seems to be a trend of late), but I still managed to find time for some fun personal projects and self-improvement.
|
||||
|
||||
### Rocket Surgery
|
||||
|
||||
Last weekend, I started building[1] the LEGO Artemis Space Launch System model[2]. I was only able to drag out construction for a week, and I didn't go over budget, either. I really don't get why Boeing had such trouble with this build.
|
||||
|
||||
=> https://social.lol/@jbowdre/112662255926100056 1: started building
|
||||
=> https://www.lego.com/en-us/product/nasa-artemis-space-launch-system-10341 2: LEGO Artemis Space Launch System model
|
||||
|
||||
### ChillFeed
|
||||
|
||||
Last weekend I *also* began developing a lightweight feed aggregator based on my rather specific preferences. I used Claude[1] to help me rapidly prototype and iterate on my ideas, and had a working demo about two hours after the idea first popped into my head. It doesn't track read/unread status (unread indicators stress me out) and doesn't display the full text of any post (I'd rather see what the author wrote on their site than in a stripped-down form). It uses GitHub Actions to refresh the subscribed feeds and uses GitHub Pages to provide the web interface. And it's configured with YAML. I'm still doing a lot of tweaking but I've been quite pleased using ChillFeed[2] to follow blogs this week.
|
||||
|
||||
=> https://www.anthropic.com/claude 1: Claude
|
||||
=> https://github.com/chillfeed/chillfeed/ 2: ChillFeed
|
||||
|
||||
### Cycling
|
||||
|
||||
I (along with many others, apparently) picked up cycling during lockdown, and I've done a reasonably good job of keeping with it. I try to ride three times a week, and aim for at least 12 miles each ride. I had been doing those rides primarily on the multi-use paths near my home, but lately I'm doing more and more of those rides on the road. That seems to give me a much better workout, and this week I hit a few personal records along the way. It feels good, man!
|
||||
|
||||
### In other news...
|
||||
|
||||
- I moved some of the more personal (that is, about me rather than a piece of technology) slash pages from my runtimeterror blog[1] over here: namely, /uses[2] and /save[3]. My thinking is this blog will be a more logical place for stuff about me rather than just the technology I play with (though there's of course going to be a ton of crossover there).
|
||||
=> https://runtimeterror.dev/ 1: runtimeterror blog
|
||||
=> /uses/ 2: /uses
|
||||
=> /save/ 3: /save
|
||||
|
||||
- Semi-related, I finally figured out how to use Hugo's link render-hook templates[1] to flag external links with a little ↗ indicator so I implemented that on the other site. Maybe I can figure out a CSS-based approach to do that here too.
|
||||
- I built on last week's work[2] on using Cabin analytics to track upvotes on Bear posts and added a similar "kudos" function[3] to runtimeterror.
|
||||
- A fun side project at work this week was creating a GitHub Actions workflow to help us decide where we should go for lunch each day. It's another excuse for me to keep practicing building stuff with Go, and I think it's helping some of the other team members get a better understanding of how GitHub Actions workflows work.
|
||||
- I've been *s l o w l y* reading the O'Reilly Production Kubernetes[4] book for what seems like ages. I finally finished it last night.🎉 It gave me a lot of good insight and things to consider when it comes to building a production Kubernetes platform. My next "for learning" book will probably be something Go-related.
|
||||
|
||||
=> https://gohugo.io/render-hooks/links/ 1: Hugo's link render-hook templates
|
||||
=> /tracking-bear-upvotes-from-my-cabin/ 2: last week's work
|
||||
=> https://runtimeterror.dev/kudos-with-cabin/ 3: similar "kudos" function
|
||||
=> https://www.oreilly.com/library/view/production-kubernetes/9781492092292/ 4: O'Reilly Production Kubernetes
|
||||
|
||||
### Top scrobble
|
||||
|
||||
My most-played track of the week:
|
||||
|
||||
🎧 LoST by Bring Me The Horizon[1]
|
||||
|
||||
=> https://musicthread.app/link/2iaBglbchB4b8l55ZXioOHatRcO 1: LoST by Bring Me The Horizon
|
||||
|
||||
=> https://blog.jbowdre.lol/this-week-2024-06-29/ 📡 Originally posted on jbowdre's weblog
|
4
gemlog/this-week-2024-06-29.yaml
Normal file
4
gemlog/this-week-2024-06-29.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
id: "urn:uuid:ab399ddc-3e60-4764-9e92-5293bde75e2a"
|
||||
title: "This Week (2024-06-29)"
|
||||
published: "2024-06-30T03:49:33.195783Z"
|
||||
updated: "2024-06-30T03:49:33.195783Z"
|
34
markdown/adding-external-link-markers-in-hugo-and-bear.md
Normal file
34
markdown/adding-external-link-markers-in-hugo-and-bear.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
title: "Adding External Link Markers in Hugo and Bear"
|
||||
published: "2024-06-30T13:35:31.396110Z"
|
||||
updated: "2024-06-30T13:35:31.396110Z"
|
||||
---
|
||||
|
||||
I tend to drop a lot of links in my posts. Some point to other posts/pages within the same site, but many point to external sites. As a *reader*, I like to know where a link is going to take me, but as a *writer*, I'm not always great about indicating that context within the text.
|
||||
|
||||
I mentioned in my [inaugural "This Week" post](/this-week-2024-06-29/) that I recently discovered how to use [Hugo's link render-hook templates](https://gohugo.io/render-hooks/links/) to automatically apply a little `↗` marker to external links posted on [runtimeterror](https://runtimeterror.dev). All that took was creating `layouts/_default/_markup/render-link.html` with the following content to overwrite the default rendering:
|
||||
|
||||
```
|
||||
{{- $u := urls.Parse .Destination -}}
|
||||
|
||||
{{- with .Text | safeHTML }}{{ . }}{{ end -}}
|
||||
{{- if $u.IsAbs }}↗{{ end -}}
|
||||
|
||||
{{- /* chomp trailing newline */ -}}
|
||||
```
|
||||
|
||||
That works well with Hugo since the marker gets inserted into the HTML source code at build time. But what about here on Bear?
|
||||
|
||||
So I went looking for a CSS-based solution that would work here. It only took about 30 seconds of searching to find [a post from Jake Bauer](https://www.paritybit.ca/blog/styling-external-links/) with the relevant CSS bits.
|
||||
|
||||
All I needed was to add this block to my Bear theme CSS:
|
||||
|
||||
```
|
||||
a[href^="http"]:where(:not([href*="blog.jbowdre.lol/"]))::after {
|
||||
content: "↗"
|
||||
}
|
||||
```
|
||||
|
||||
That was surprisingly easy, and today I learned you can use complex/compound selectors to perform pattern matching with CSS. Neat!
|
||||
|
||||
=> https://blog.jbowdre.lol/adding-external-link-markers-in-hugo-and-bear/ 📡 Originally posted on jbowdre's weblog
|
37
markdown/this-week-2024-06-29.md
Normal file
37
markdown/this-week-2024-06-29.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
title: "This Week (2024-06-29)"
|
||||
published: "2024-06-30T03:49:33.195783Z"
|
||||
updated: "2024-06-30T03:49:33.195783Z"
|
||||
---
|
||||
|
||||
*These "week in review" posts seem to be pretty popular so I thought I'd jump on that trend, too. Also, I struggle to post regularly. I tell myself it's because I'm busy building things (and documenting things), but Robert Birming assures me that there is [always time to write](https://birming.com/no-time-write/). So let's give that a try.*
|
||||
|
||||
This was a busy week at work (that seems to be a trend of late), but I still managed to find time for some fun personal projects and self-improvement.
|
||||
|
||||
### Rocket Surgery
|
||||
|
||||
Last weekend, I [started building](https://social.lol/@jbowdre/112662255926100056) the [LEGO Artemis Space Launch System model](https://www.lego.com/en-us/product/nasa-artemis-space-launch-system-10341). I was only able to drag out construction for a week, and I didn't go over budget, either. I really don't get why Boeing had such trouble with this build.
|
||||
|
||||
### ChillFeed
|
||||
|
||||
Last weekend I *also* began developing a lightweight feed aggregator based on my rather specific preferences. I used [Claude](https://www.anthropic.com/claude) to help me rapidly prototype and iterate on my ideas, and had a working demo about two hours after the idea first popped into my head. It doesn't track read/unread status (unread indicators stress me out) and doesn't display the full text of any post (I'd rather see what the author wrote on their site than in a stripped-down form). It uses GitHub Actions to refresh the subscribed feeds and uses GitHub Pages to provide the web interface. And it's configured with YAML. I'm still doing a lot of tweaking but I've been quite pleased using [ChillFeed](https://github.com/chillfeed/chillfeed/) to follow blogs this week.
|
||||
|
||||
### Cycling
|
||||
|
||||
I (along with many others, apparently) picked up cycling during lockdown, and I've done a reasonably good job of keeping with it. I try to ride three times a week, and aim for at least 12 miles each ride. I had been doing those rides primarily on the multi-use paths near my home, but lately I'm doing more and more of those rides on the road. That seems to give me a much better workout, and this week I hit a few personal records along the way. It feels good, man!
|
||||
|
||||
### In other news...
|
||||
|
||||
- I moved some of the more personal (that is, about me rather than a piece of technology) slash pages from my [runtimeterror blog](https://runtimeterror.dev/) over here: namely, [/uses](/uses/) and [/save](/save/). My thinking is this blog will be a more logical place for stuff about me rather than just the technology I play with (though there's of course going to be a ton of crossover there).
|
||||
- Semi-related, I finally figured out how to use [Hugo's link render-hook templates](https://gohugo.io/render-hooks/links/) to flag external links with a little ↗ indicator so I implemented that on the other site. Maybe I can figure out a CSS-based approach to do that here too.
|
||||
- I built on [last week's work](/tracking-bear-upvotes-from-my-cabin/) on using Cabin analytics to track upvotes on Bear posts and added a [similar "kudos" function](https://runtimeterror.dev/kudos-with-cabin/) to runtimeterror.
|
||||
- A fun side project at work this week was creating a GitHub Actions workflow to help us decide where we should go for lunch each day. It's another excuse for me to keep practicing building stuff with Go, and I think it's helping some of the other team members get a better understanding of how GitHub Actions workflows work.
|
||||
- I've been *s l o w l y* reading the [O'Reilly Production Kubernetes](https://www.oreilly.com/library/view/production-kubernetes/9781492092292/) book for what seems like ages. I finally finished it last night.🎉 It gave me a lot of good insight and things to consider when it comes to building a production Kubernetes platform. My next "for learning" book will probably be something Go-related.
|
||||
|
||||
### Top scrobble
|
||||
|
||||
My most-played track of the week:
|
||||
|
||||
🎧 [LoST by Bring Me The Horizon](https://musicthread.app/link/2iaBglbchB4b8l55ZXioOHatRcO)
|
||||
|
||||
=> https://blog.jbowdre.lol/this-week-2024-06-29/ 📡 Originally posted on jbowdre's weblog
|
Loading…
Reference in a new issue