Help sync obsidian specific folder github repository

What i want

Hi, i post github blog([username].github.io)

then i want make process that writing markdown in obsidian vault and then automaticially push my github repo and publishing blog

might problem

The obsidian git plugin recognizes the .git folder contained in the valut directory.

Can I designate a specific subfolder within valut as git root?

The reason I want to do this is that I manage several other folders in obsidian,
and it’s difficult to manage them with gitignore.

thank you

1 Like

Okay, for the record, I don’t have experience publishing to GitHub Pages.
So I have trouble understanding the workflow: are you able to publish straight to Pages from your vault you otherwise sync with git? Are you just using one repository for both? (How do the Wikilinks, markdown links, paths, etc. work out? Obviously they do, right?)

But I think you are mixing things up here. You want to sync everything to GitHub (obviously) but you only want to publish only certain folders or notes – is that correct?
With .gitignore you filter what you’d be syncing with .git; I think it has no bearing on publish. But again, as I said, I don’t know about the Pages workflow (I’ve seen how CloudFlare, Netlify and Vercel are set up).

I use a Digital Garden template and (I must) use flags to decide what I want to publish, so I have a separate repository account for the vault (that I use for syncing) and another for what I want to publish, through the template.

So my suggestion is look around on other forums as well, how people filter what they want to publish to GH Pages, because there might be some flag (e.g. share: true, or something similar) that can be fed to GitHub Pages to not publish certain pages.

And with Properties in Obsidian, you can set up a Templater script or use some other plugin to mark markdown files in batch (a whole folder, at that) to exclude them from being published.

As I said, from what I’ve seen on this forum, not many people do what you do, so definitely look around on other forums as well.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.