What can go in `Navigation:` in configuration?

So taking the navigation menu setting in the configuration file, which by default looks like

Navigation: about, another-page, <a href="https://example.com">Example</a>, [Example](https://example.com)

does this specifically look for links/locations only, or can other free-form HTML be in there? Like, if for some reason you wanted to, could there be a

<span>Foo</span> <a href="#">Bar</a>, 

in there, or no?

It’s currently coded in a way that tries to ensure that anything that shows up there is a valid link to something. If you provide a link (either in HTML or Markdown), it’ll be pulled in untouched. If you provide any other text, it’ll try to match that up with a known location in the weblog. If there isn’t a match, then it quietly ignores the text.

I could modify it to allow any unmatched text to pass through and be rendered, if you think that would be more helpful. Haven’t really received much feedback on the way this was set up so I’m open to making changes!

I don’t want to overcomplicate the parsing. It came up because I’m in the process of replicating my version of the omg.lol Special profile theme for my blog, and I have a bunch of navigation links up top that I’d had to replicate in each template, and they are mildly complicated in markup. That said, I’ve replicated them and they aren’t expected to change, so this question isn’t especially high on my list.

1 Like