Generated .md links from ruby plugin does not work on GitHub pages

Hi everyone, I’ve been working on a project called jekyll-obsidian which as you can guess, loads an Obsidian vault directory into your Jekyll site. I just pushed it to RubyGems but immediately encountered a bunch of problems only on the live site, specifically GitHub pages.

Everything works fine locally, you can try it out on your own site with your own obsidian vault, but I came across a bunch of issues on the live deployed version of the site, like on my GitHub Page.

The main issue is my file tree generator. First, I don’t know why the data is null when generated from the live site but is generated correctly locally, for example const vaultData = '{{ site.data.obsidian_counts | escape }}';. Second of all, I don’t know why all the links generated from the file tree are moved to the site header. It’s really bizarre as to why it does this, and I even specified a collections in _config.yml to prevent .md files from being turned into html links.

If you serve your jekyll site locally with this plugin, it should look like Obsidian, but go on my website and the explorer panel is completely empty, none of the links work (because they were all converted into .html files) and get misinterpreted as page links and moved to the header, and the generated site data is null. I’m at my wit’s end and tried everything, hopefully someone here can give me some guidance. Thank you.

GH pages only works with a small number of white listed plugins so if what you have is a plugin it won’t work with regular GH pages. You probably could use it via an action or other build script though I don’t have any experience using those.

Plugins work no problem locally - but GH pages can’t allow custom plugins for security reasons I think.

Yes, it seems that a lot of forum posts are mentioning that GH are picky with what plugins they allow on github pages. However this doesn’t seem to be the case, after modifying the workflows build script to include the bundle exec jekyll build command, it still has the same problem where all the links generated by the file tree, which are links pointing to a .md file, are turned into separate html links, hence why they are all moved to the header.

The .md notes are of course the same ones that you would use to take notes in Obsidian, but I think jekyll misinterprets these are different pages. They do not have front matter which makes it all the more confusing as to why they’re being turned into html. Likewise, by clicking a note link in the header of the github.io site, you are instead send to another page, seeing how the URL has changed to reflect that of the note you clicked on. This is not intended and the goal is to only be on the permalink set by the obsidian layout.

In the local site, I only have one link to my obsidian vault, and all the notes within it are loaded in as strings to be parsed only within that permalink (ex. /blade-ballad/). I think this is more of an issue of how to tell jekyll, specifically the minima theme, to not include certain .md files or any files within a directory (ex ./vaults) and turn them into html files.

In my case, I have my Obsidian vault stored within a directory called vaults/, which when built locally, can be accessed by page index at http://127.0.0.1:4000/vaults/. However, the github.io page does not have this index page, returning a 404 when I entered https://khiemgluong.github.io/vaults/

Sorry, I’m not too familiar with how sites are built, so forgive me if these questions seem out of place.

Alright… Finally got it working. Turns out jekyll will generate html for any files that is a .md, which means all I had to do was rename the file extension to something else like .mdnote and it works.