My Simple Obsidian to Github Pages Writing Workflow
Writing is hard. But so is publishing your writing. And much like software, publishing is the analog of "going to production" ie. only when your thoughts and writing are in the wild can it really have an impact.
After starting and stopping many articles, only to have dreaded the publishing of the writing, I decided to ditch all the fancy static site generators and go barebones with html and css.
Well... I actually stumbled upon a simple, no-frills Python script that compiles together markdown files into html.
With this, I'm able to write my blog post in Obsidian, export it to markdown in the blog project, and then publish the blog post to Github. And within 2 min, I have got it published.
Pros and Cons
The cost is 0$. All writing happens locally within Obsidian. And the headache of publishing has nearly gone away. I can imagine in the near future that the script I have will get quite messy. As I add in more edge cases or features, there will need to be some hands-on maintenance of this workflow.
How Does it Work
- Setup a command in Obsidian using the QuickAdd plugin which pulls a blog template I have into a blog directory within my Vault.
Note: My template has
<!-- title:My Simple Obsidian to Github Pages Writing Workflow -->
in the top for the static site script to work properly.
- Write what I want in the file.
- Use the Markdown Export plugin, and set the destination to my directory locally which hosts my blog.
Here you can find all the code related to the blog hosting here.
Note
The blog is work in progress, and Im taking it one post at a time to see how it works out. But if you find it useful, by all means go ahead and use this workflow.
And if you have any questions, feel free to open up an issue and I'll be happy to answer it.