🌱 Automate Dendron Publishing
I have been using Dendron for some time now as a PKM tool. I started when it was using 11ty to generate site out of the notes.
It would create the site in docs
folder, using Dendron: Site Build
in VSCode
I had mapped the docs
folder to a git repo.
I would push ready-made site to git, and netlify deploy was a no-op
Then recently they switched to next.js
and publishing changed a lot. (Personally I liked the old look and feel, but that is besides the point)
Now the .next/out
would contain the Site.
It would have been OK, changing from docs
to .next/out
is no big deal, but with next-based publishing, out
folder gets removed on each build. 😱
I had tough time figuring out how to publish (I did some hacks, but not really proud of those 😅)
Then I came across a blog post on Dendron’s discord channel.
Essentially they figured a way around this.
As a bonus, I don’t have to maintain two git repos like before (Remember, I had a git repo just for the generated output)
The steps from the script are pretty straightforward.
Yet having such simple script and asking netlify to use it as a build command (and use docs
folder to publish) does make the workflow more efficient.
If you have not, please check my Digital Garden