Vinzent03 / find-unlinked-files

Find files, which are nowhere linked, so they are maybe lost in your vault.
MIT License
293 stars 14 forks source link

Add option to include a header in the file #33

Open evanfarrar opened 2 years ago

evanfarrar commented 2 years ago

Some markdown converters (hugo/goldmark) will not convert a file that begins with a bullet list. This does not affect broken links because that file already has a preface paragraph.

I could make this a global thing, too, and have a single toggle that affects all three.

Vinzent03 commented 2 years ago

You are adding an empty header, right? What about adding a heading to each file with a meaning? I don't want to make everything configurable.

evanfarrar commented 2 years ago

I am adding a heading that matches the filename, I have seen this convention in many obsidian vaults/zettelkasten and generally follow it in my vault. I would personally be fine with this being a toggle and a text field for header that defaults to the same name as the filename or just a field that disables it if blank, but it feels like a lot of options/UI text to work around a small bug with obsidian -> hugo.

another option to work around this bug would be to add frontmatter, maybe someone would have use for that? I like all my pages to have an H1 so I manually solve it this way in my other markdown files.

btw: thanks for the plugin. I love the plugin and get a lot of value from having a buffer with all of my unlinked pages; it made me want that in my rendered versions of the notes as well.

Vinzent03 commented 2 years ago

But what about removing the configuration and adding the heading always?

evanfarrar commented 2 years ago

I am fine with adding the heading always, too. I also could fix this in my own format-conversion pipeline, but thought others might like this functionality (and render their notes with hugo) so I sent this out to see. Maybe leave open and wait for others beside us to weigh in or close and see if it is opened again.

Just FYI, other things that would work around the hugo bug:

Things I tried that didn't work around it