Obsidian Bulk Exporter

My Workflow

I want to publish some of my notes from my vault into different outputs.

  1. Filter: based on custom metadata in my files, using DataView syntax
  2. Restructure: group the export into different folders, based on metadata
  3. Mind the images and internal links (replace/pull in/normalize)

  1. generate output
  2. publish to targets

If I add a file to a blog, I want it to auto generate/add it to my export, run the script, then publish it if I hit the Export button.

For this I created Obsidian Bulk Exporter plugin.

How I use it

I have a magic tag: blog - it can have many values, like tech, personal, etc... I set the group also to blog, which means depending on what I write after it will group together the posts that has the same value. e.g.:

tech/
	assets/
		cover-image.png
	posts/
		assets/
			screenshot.png
			description-of-something.png
		some-tech-note.md
		another-tech-note.md
		...
	index.md
	about.md

personal/
	assets/
	   picture-of-me.png
	posts/
		reflections-on-self.md
		another-life-event.md
	index.md
	about.md

...

(It also collects the local assets referenced in the notes).

In my Bulk Exporter plugin I use the following output file name mapper to do this:

${blog}/${index || root ? fileName : 'posts/' + (date_published?d(date_published).date:created.date) + '-' + slug }

After the export is done, I just run my other generator script that creates my output HTML from the templates I specified to them.

Why?

I have and had multiple blogs. Some historical, some personal, some public, some professional, some for pet projects. Those are my outlets and they serve different purposes with slightly different needs.

I tried many things over the years: My custom PHP blog, a terrible node blog (I am still using), Multiple versions of Wordpress, Ghost (my favorite so far among it's category).

Then I found Jamstack, which made me realize (after several days of digging my data out of old SQL dumps) writing should be really tech independent. Ghost linked markdown to blogging for me. Git, 11ty also supports it, so I started putting these together.

Static markdown files. Nothing fancy. Plug Into templates. If that's not enough, I am doing too fancy. What a surprise, I came to the same markdown conclusion with my notes, hence I landed with Obsidian. I was hesitant at first, as it's not open-source, but I understand. Everyone dreams of a pet project exploding. Indies do not have corporate financing.

No vendor lock in. Nowadays even your toothbrush can read markdown.

As migrated stuff into my vault, I struggled making a proper structure.

Some of the blog posts I am working on, are part of a bigger topic, and I wanted to keep them around to their respective PARA project folders. I needed a folder-independent structure. One source where I do the changes, multiple outlets.

So what I needed is a combination of the following tools:

Why not...

Obsidian Publish

I can host stuff for free on Github pages or Netlify, plus I am already paying for a VM, I just need a workflow automates compiling my outlets. You still need to be at least a little techy in order to hook the rest up, so I do not think it poses concurrence for the creators.

Consider supporting them if you

Obsidian Export

This Rust plugin is the closest it got to what I need, but it does not support filtering based on metadata, you'd have to maintain a .export-ignore file separately and I did not find an easy way to restructure notes into a 2 level structure. Plus it's written in Rust, and I am most comfortable with JS.

Quartz

Great blog generator, will consider using it, however it also lacks the metadata filter way. Here I actually started wondering, if I am just incapable of organizing my blog stuff into folders. Uses HUGO and exposes your whole vault.

Brandon Boswell did a hybrid solution that uses obsidian-hugo and Obsidian Export, but it still needs to be in one folder.

Choose this combo, if you:

Wordpress Publish

If I used wordpress, I'd consider it, however I am moving heavily towards JAMStack If you ever tried digging data out of an old Wordpress Blog you probably feel my pain. I rather choose a simpler, static generator system with MarkDown files than having to go through that again.

Wordpress Publish may be a perfect solution for someone if Wordpress is an acceptable output. Can be much more pain-free.

Other useful tools for blog generation