ukautz / obsidian-meets-hugo

Command line tool to export Obsidian Vault into Hugo published website
MIT License
13 stars 2 forks source link

Links are structured incorrectly when writing files directly to content directory #1

Open gmuller opened 2 years ago

gmuller commented 2 years ago

Instead of writing all of the files to a sub-directory of content/obsidian/ , I'm trying to write all of the files directly to content/ I tried to following command-line:

~/go/bin/omh -O ~/notes -H ~/code/quickstart -p / -i 'public'

While this does write all of the files to the content dir, it creates links with triple slashes, such as:

[Belief in conspiracy theories is like the belief in myth](///belief-in-conspiracy-theories-is-like-the-belief-in-myth/)

I will look at this a little later, but I think I understand where links are built (omh.go convertNote method), but not certain if that is the right place to repair this, or if there is another way to accomplish what I'm looking for.

pchr8 commented 1 month ago

Were you able to find a solution, @gmuller ? For me both / and . seem to default to garden

EDIT passing an empty argument seems to work!

pchr8 commented 1 month ago

Empty argument introduces double-slash bug in assets linking (//assets/pic.png), I tried to fix that and some other things in my fork that I now use to build my own website — may be useful: https://github.com/pchr8/obsidian-meets-hugo

(This is literally the first thing I've ever done in Go but seems to work mostly)