Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to include a header in the file #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

evanfarrar
Copy link

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.

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.
@Vinzent03
Copy link
Owner

Vinzent03 commented Sep 8, 2022

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
Copy link
Author

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
Copy link
Owner

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

@evanfarrar
Copy link
Author

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:

  • an empty H1 (#\n)
  • any paragraph of text like these pages are not linked to anywhere in the vault:
  • using asterisks (*) to make the list (which still render as bulleted lists in both hugo and obsidian preview)
  • any html (e.g. <!-- generated by orphan link finder -->)
  • any frontmatter, even empty (---\n---\n)

Things I tried that didn't work around it

  • 1 blank line
  • 2 blank lines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants