Closed MerchantPug closed 2 years ago
There is a way, my bad.
If anyone comes here looking for the answer to this question: MKDocs only builds what's in the 'docs' file. To ensure your images are included in the build place your 'Attachments' folder inside your 'docs' folder in Obsidian. Don't forget to set that folder as your default for attachments in the Obsidian UI if that's your intention. When you build your site with obsidian-publish-mkdocs your images and links will be preserved so they display on your pages. However, the Attachments folder is hidden from the site navigation. That was the desired behaviour for me so it turned out simpler than I expected. I'm not sure where the configuration to hide the Attachments folder is though...but it seems to work.
This works, but don't forget that if you have a repo that is hosting the files, the repo should be made 'private' otherwise you're publishing all your attachments there! Or make sure you only add publishable images and other files in your repo.
One idea is to put the bulk of your attachments in a folder (Obsidian still seems to find them!) and excluding this folder in your .gitignore file see my short blog
I've used imgur as a workaround to this, I was wondering if it'd be possible to make a media directory for use in this.