I have essentially completed my Digital Garden project. I say “essentially” because I am sure I will iterate more and its intended to be added to, pruned, and maintained. Its a garden. What is a Digital Garden? Honestly, its a bit nebulous, but its basically, a curated block of resources online. A Wiki is sort of a Digital.Garden, but those tend to be a lot more complex, making them something more. For my part, its just, a collection of sorted links on various topics I am interested in.
It started out as just something to sort my Bookmarks into. It was an excuse to go through them, prune the dead links, and sort them by topic better. This is especially useful for project ideas, which I often do a little research for, end up.with 4-5 tabs of useful webpages, those tabs live in my 100 tabs until I get tired of having 100 tabs, I book mark them, and throw them in the pile.
After a while, I end up with project notes scattered sporadically in the pile. Not very useful.
Cleaning the Pile
The core of this project, was sorting the book marks. I have been working on this project, for years now. This is not an exaggeration. I had shitloads of bookmarks. Besides making them organized, part of the point is to become more independent of any browser. I still have Bookmarks, just, many many less. I bookmarked the Digital Garden, I bookmark Outlook and Gmail and Social Networks. I bookmark the Amazon Prime games redemption page.
Basically, things I actually open, regularly, that update, regularly.
The process itself has evolved too. I think I used OneNote, so I had links in there. I had links in lists in Joplin after. Now they are all in lists as links in Markdown.
The actually process was simple too. Control B to open the Bookmarks sidebar, pick a folder, some of the bookmarks were sorted. Add a “separator”, drag it down blocking off 10-15 links open them all up in new tabs.
If they don’t load, just close them. If they do, evaluate what they are and sort accordingly.
- Most links went to a markdown page and category.
- if a Category gets too large, I would break it out into its own page
- if it was just a link to a book or movie or piece of music, I put it in the appropriate “Todo” page in Joplin, to sort later.
- If it was a “personal link” to a web profile of mine I also put it in Joplin
After sorting, I deleted that block, and moved the separator. Until everything was sorted, systematic, simple, easy.
Git
I originally was going to keep it private. Over time I decided it might be useful to make it public. This required killing and rebuilding the Github repository where it lives, because I had a bunch of API Keys and Log-in info in it. I moved all that out to Joplin, which is all private and encrypted. I had to make a new repository since that data would still exist in old versions that would be available if I made it public.
The Github backend is great because I could access it from anywhere, and edit it from anywhere. It also gives me.an excuse to use Git a lot, so I can build a better muscle memory for pushing, pulling, etc. Initially I was real bad about forgetting to commit changes on one machine, then committing changes from other, which caused conflicts.
It also meant if I wanted to make it public, I could simply, flip a switch.
The problem is, I didn’t WANT to make it public for various reasons.
- If I slipped and put keys or other sensitive data, it would be there forever.
- It would show up on my Github repositories. I like the idea of it being public but not PUBLIC
- I dislike the idea of AI scraping it which is very likely on Github
- I am starting to have a growing dislike and distrust of Microsoft, and by extension, Github.
- It would be nice if I could host it on my domain
Its Git though, so I can put it anywhere, which solves a lot of my concerns. The main problem was, browsers don’t render Markdown, which was the format I was using.
Claude.ai
But surely, there was a solution. I came up empty though searching. There are many static site generators that will build Markdown into HTML. The problem is, these are all way over complicated for what I need. I don’t want some funky backend that will probably conflict with my Apache WordPress stuff, that will require constant maintenance.
I just need to render text files in a web friendly format. Its essentially text to text.
Enter the trusty Claude.ai to code something quick.
I'd like to build an html page with JavaScript as a wrapper for markdown files in a folder. When you load the file, index.html, it will, by default load index.md or readme.md in that order, if preset. Otherwise it should throw some sort of error. if you load say, index,html?file.md , it should look for and load the local file file.md from the folder, instead of index. It should also auto convert all internal markdown links to be pointing to "index.html?linked_file.md" when doing the conversion. The conversion should just be done on the fly, preferably using in page script so it's all one file.
I'd like to build an html page with JavaScript as a wrapper for markdown files in a folder. When you load the file, index.html, it will, by default load index.md or readme.md in that order, if preset. Otherwise it should throw some sort of error.
if you load say, index,html?file.md , it should look for and load the local file file.md from the folder, instead of index. It should also auto convert all internal markdown links to be pointing to "index.html?linked_file.md" when doing the conversion. The conversion should just be done on the fly, preferably using in page script so it's all one file.
And it gave me results, which worked. Well, it didn’t exactly work, it won’t load as a local file, I had to put it in a temporary folder on a web accessible server.
It wasn’t perfect though. Links opened in the same window, which wasn’t ideal. It was also kind of ugly. So for iteration 2, I had it add target=”_blank” to any external links.
I also had it load an optional, separate style.css file.
Version 3 was a fix because it was loading style.css before the inline CSS, so it needed to load it afterwards.
It still was not quite working right, so the 4th and final iteration (for now) I made two more changes. One, when going “Home” to the main page, it would load index.html?readme.md”. This is the default load anyway, so I had it just load index.html for any reference to index.md or readme.md.
Second change, I have the notes in folders. The initial load would work, but any sub pages in folders, did not, because it didn’t understand relative links. Claude fixed this as well.
Easy Workflow
The really nice part of all of this, is it makes for an extremely easy workflow. Especially if I set up the server to just, auto pull daily. I can make updates as I have been doing in VS Code, push them to Github, then just pull to the server.
It also means if I ever move away from Github, I can rebase everything to the alternative repository, and keep on moving.
It also means it now appears on my own domain at lameazoid.com/Garden.
It also keeps old versions private still, since the repository itself it private, if I fuck up something, there is a good chance I can fix it and remove it. I can also have pseudo private pages and lists if I wand by simply not linking to them.
A clean version of the markdown rendering engine is also available here for anyone who wants to use it.