A problem with blog automations using Obsidian!

Troubles trying to automate Obsidian towards NextJS so that we don't have to touch code when updating our blog!

Problem

Obsidian stores dates as follows:

date: 2023-11-08

This conflicts with me wanting to store dates for the js library next-mdx as follows:

date: "2023-11-08"

I want to avoid code and only open Obsidian to create blog updates!

What I realized...

When I write in obsidian and I write a date property entry as:

[2023-11-08]

The markdown file receives the string as:

"[2023-11-08]"

And now I can make change in my blog's code.

Replacing "[" and "]" with empty string.

items[field] = data[field].replace(/\[|\]/g, '') // to replace [] with empty string ''

So the final result...........

We can split screen and make easy updates to my blog without touching any code! (hopefully)

wow

"ok yeah just automate your blog. seems easy enough. no need to learn anything new probably... it will be quick and simple and easy and we can post all of our resume stuff on there and it will be great... no need to debug anything probably no need to know that Obsidian stores dates a different way and need to "

This is a temporary fix and puts brackets in my new blog posts...

But at least I can detect changes on obsidian, push to github, and create new blog posts quickly without touching my code...........

That is all for now. Thanks for reading!

Edit:

After one day I realize I cannot paste in images. Ugh. I'll just use imgur for now...

split screen

Instead of this format: ![[Pasted image 20231109084720.png]]