Back to writing Build story / English

Improvements to Cheap Publish

Refusing to pay for Obsidian Publish cost me only countless hours: a 2023 fork story, from frontmatter to wiggling graphs.

I started using Obsidian in early 2023 and loved it right away. I wanted to publish my notes online. I'd had a blog before, but this felt different. Obsidian felt like that was it.

Years earlier, I'd started building Calepin, a notes app with a separate frontend and API. That was one way to make a place for notes. Cheap Publish was a different question: how could I put the notes I already had on the web?

This is a snapshot of my 2023 experiment, not a current comparison or a guarantee that these projects still work the same way.

For installation or current status, start with the repository documentation. The changes and unfinished lists below describe what I had in 2023, not a setup I've verified today.

I took a look at the official Publish service from Obsidian but as a fellow Home Lab-er, there is no way I'd pay to host a personal website. I'd rather spend countless hours hacking something.

I started searching online for an "Obsidian Publish open source alternative" and found quite a few:

  • MindStone: free open-source alternative solution to Obsidian Publish
  • pubsidian: An Obsidian-Publish alternative but it's FREE
  • TuanManhCao/digital-garden : Free Obisidian Publish alternative, for publishing your digital garden.
  • Markbase: Easily sync and publish your docs, notes, and digital gardens
  • Quartz: Host your second brain and digital garden for free
  • binnyva/gatsby-garden: A Digital Garden Theme for Gatsby. Gatsby Garden lets you create a static HTML version of your markdown notes
  • Obsidian to Github: Create and edit a Jekyll website in Obsidian. Publish to Github without friction.
  • ppeetteerrs/obsidian-zola: A no-brainer solution to turning your Obsidian PKM into a Zola site.

None of them were perfect, and neither was the official Publish service. obsidian-zola was my favorite: simple enough, yet packed with features. I gave it a go, but ran into a few bugs. With little recent activity on the repo, I checked the Network graph for active forks.

I landed on Yarden-zamir/obsidian-zola-plus, which adds a preview pop-up from another fork, giscus comments (which I didn't know was a thing), etc.

Then I found more bugs. Enough to bother me. This time I made my own fork, because why not. I called it Cheap Publish, 'cause my mom raised me an honest man.

So what did I change?

More flexible frontmatter (now called Properties)

I added the following frontmatter keys:

  • title: allows to override the page's title without changing the filename
  • created: shows the date the page was initially created, eg: Posted February 13, 2023
  • modified: when present and modified != created, shows both dates, eg: Posted February 1, 2023, last updated February 5, 2023

While working in that section, I re-enabled the read time. My garden's header, for example, showed the posted and updated dates followed by “1 min read.”

Extra

I'm also passing down to zola/templates/content/page.html any extra frontmatter keys. Useful to customize the template based on that.

Ability to bypass the landing page

I didn't read much about it, but Zola treats the homepage as a "special page". I just wanted a regular page from my note.

That was possible in my fork. I wasn't 100% sure the landing page still worked, to be perfectly honest with you 😬.

To bypass the landing page, I set REDIRECT_HOME in netlify.toml to the path to redirect to, e.g. REDIRECT_HOME = "README". It set the main section's redirect_to setting to that value. Zola's section documentation is here; the example describes my 2023 setup, not necessarily the current fork.

Resize images

That one was bothering me a lot since it's supported natively in Obsidian.

For example, these were the two syntaxes I supported for a 100-pixel-wide image:

![Example|100](https://example.com/image.jpg)
or
![100](https://example.com/image.jpg)

The URL is a placeholder. At the time this was done dynamically in JavaScript because I was lazy, and it only supported the syntax above.

A few fixes/changes

  • The sidebar no longer reloaded the whole page when clicking a link or anchor
  • The graph no longer jumped on the first hover. It was also prettier with a little wiggling animation on load 😻.
  • Removed mandatory /docs from URLs, which were then served directly at /
  • Removed frontmatter=never from local-run.sh (why!?)
  • Fixed the URL detection for previews using the host (might not be a solution for all)
  • Updated obsidian-export to the latest version available to me then
  • Allowed . in filenames, e.g. 1. Start here, 2. Once Upon A Time, etc. Useful for the sidebar since it was sorted by name.
  • Better blockquote style
  • Removed (commented-out) single dollar sign $ from LaTeX/katex's renderMathInElement

TODO

This was my list in 2023, not a statement of what's still outstanding today.

  • Write a proper README with instruction on how to use
  • Write some doc about the changes I made to the comment layout (I use Remark42) and/or remove the comment configs and let it up to the user to decide / figure out what they want
  • Fix the graph when URL contains a # (current node doesn't seem set)
  • Identify external link
  • Open external link in new window

Wish list

Another snapshot from 2023, not a current roadmap:

Image viewer