I might be hitting the wall on my Jekyll-inspired storage system for #goldfrog. GoldFrog uses Jekyll-style markdown posts as the “system of record”, but read into SQLite for serving/searching content. #webmention activity add a new type of data that I haven’t figured out how to store yet.
Posts tagged with 'Goldfrog' (39 posts)
Ok, I’m tired of putting off writing about what I’m reading just because I don’t have custom “read”-handling code in #goldfrog yet. So I’m posting links to books I’ve read since March 4, 2020…
~ # 19:32 ~
- I only load the JS for me, since I’m logged in.
- It’s only used on the home page to power the new switchable post form, and
- It powers a character-counter for the note UI.
Here’s the new posting UI:
Ran into a friend today at church and he asked me “hey I’m trying to learn Python, do you have any good sites or books to recommend? I’m kinda… bored.”
Now some of us geeks can’t imagine being bored learning something new, but I went through this when I first started learning Go. I had decided I wanted to learn a new programming language, and Rust was way too… Rust, so I picked Go and started building a small o-nothing web app. I got part way in an realized that I had no interest in what I was doing, and it (and some bits of Go that hadn’t matured) was killing my fun. So I put it down.
Fast forward to this year. I was ready to pick up Go again, but this time I also knew that I wanted to start writing again, and that the friction in my blogging process was killing my joy there, too. So I decided to write my own blog software (see #goldfrog), and I was going to write it in Go.
Suddenly I was energized to learn, because I had all these feature ideas for the site, and I had to learn the #golang techniques for tasks I’d only one in #python before. Also, it got me into the golang newbies Slack, and connecting with a community - for me at least - helps.
So my advice to my friend was:
- Find a project you’re passionate about, or at least really interested in
- Be willing to re-learn things you think you already know
- Find a #community!
Evidence of the first Webmention GoldFrog has sent for a post on this site.
Horst just recently implemented Webmentions on his site, so I’m happy to be able to give him a link!
I’ve been working on improving my POSSE features here, which meant not only composing my posts and notes locally, and then publishing them to Twitter et al, but also being able to track where they “landed” (ids and links) and make it easy for users to find my content on the syndicated site.
So I dug back into my syndication code, rewrote it several times, learned some things about goroutines, learned how not to do some things with goroutines, and settled on a way that worked. With luck, this post and any other that is also published on Twitter or Mastodon will have links to those sites along with the post, and (at least for Twitter right now) have links to reply, favorite, or retweet the post.
As Dave used to be fond of saying:
‘The Dwarves tell no tale; but even as mithril was the foundation of their wealth, so also it was their destruction: they delved too greedily and too deep, and disturbed that from which they fled, Durin’s Bane.’ The Lord of the Rings
What it looks like in code:
Chris Aldrich wrote a blog post about manually adding Webmentions for links to his posts from sites that are not themselves Webmention-enabled.
This reminded me that I’d like to add a “I linked to you” feature for the post detail page in #goldfrog for this site. (Goldfrog does support Webmentions, so Chris should get an automatic link from this post :))
- Endpoint discovery (header, link, a)
- Send basic webmentions
- Send “special” webmentions (ie Likes)
- Provide discovery (header, link, a)
- Receive basic webmentions
- Receive “special” webmentions (ie Likes)
Ultimately I’d like to break out my webmention code into a releasable #golang module that can provide reusable
http.Handler functions that can be plugged into any Go mux that supports them.
~ # 00:00 ~
Another aspect to creating my own blogging software: I can finally start implementing some of #indieweb principles I’ve been watching for a while.
One of those is POSSE (Publish Own Site, Syndicate Everywhere) - which means everything you write starts on your own site, and content is syndicated to the appropriate kinds of sites as desired. This could include things like:
- Articles are syndicated via RSS (done, no brainer)
- Short posts (notes) are automatically or optionally published whole to Twitter, Mastodon, or the microblog of your choice
- Articles are automatically or optionally shared to a microblog site with a link back to your own site
Goldfrog + Twitter
While I generally find Twitter overwhelming and frustrating (not nearly as much so as the less-privileged do), I just finished adding a Twitter cross-poster to #goldfrog. I’ll be implementing a Mastodon cross-poster in the next few days (/me waves @ toot.cafe), now that I’ve figured out and implemented the pattern.
The Twitter cross poster will send the title, some text, and a link back to the post. So, let’s see if deploying the new feature worked. :D
~ # 00:00 ~
For 2020, I’m writing a new blog app. It’s just for myself, a toy to remind me why I love the web. It’s called Goldfrog, and it sounds a bit like “Go, blog!”
Why in the hack, in this day and age, would I spend time writing my own #blogging software, when you can’t sign up for a VPS anywhere without tripping over offers to help you set up Wordpress, or Ghost, or what have you?
A few reasons.
New Year, New You
2019 was shite-filled, and due to politics, the tech trashfire, and the friction of blogging through several variations of static, git-powered versions of this site, I simply stopped blogging. I’ve wanted to, but the effort killed the motivation before I could get some words out.
So I finally decided to write something myself, that did just the things I wanted. #goldfrog is written in Go, because while I will love Python to my dying day, my brain needed a kick in the pants this year, which relates to my next point.
The Builder’s High
Rands writes eloquently on the builder’s high. With family engagements and work over the last few years my hobby coding has dropped to almost nil (None if I were writing Python).
I needed something to reboot my creative juices, and trying to write something I really wanted, that thought would be quick, in a new language, seemed like a good way to go (I did want it, it wasn’t easy, and Go hates me. But I’m learning and that feels great!)
A bit more about Goldfrog: the single feature I wanted was a posting form on the home page, right up front. Various Userland products had had this, and it always felt right.
Second to this was an “Edit” link next to every post, wherever it was found on the site.
Finally, my main technical “innovation”: My content is still stored on the filesystem as Jekyll-compatible Markdown files. However, build times via Jekyll or Hugo are fairly slow for my 2800+ posts (since 2000, baby) and I hate that. So #goldfrog indexes all posts in a sqlite database on disk. Post creation and edits go to the DB and to the filesystem, so I can still periodically sync the changes to the git repo I have checked out there. But all the list views, archives, tag pages, and search functionality go to the DB, and are really fast.
This is really the app I’ve wanted for a long time.
- It’s hosted on a Linode “nano”
- The app builds on CircleCI and the binary is pushed to an S3 bucket.
- I’ve got ansible playbooks that setup the VPS pretty much from scratch with Nginx fronting Goldfrog.
I really need to get my logging story fixed, and I’ve got some idea on adding basic metric tracking to the app.