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

Improving navigation links #43

Open
jsseidel opened this issue Jan 20, 2023 · 0 comments
Open

Improving navigation links #43

jsseidel opened this issue Jan 20, 2023 · 0 comments

Comments

@jsseidel
Copy link
Collaborator

Navigation links break easily. This is probably harder than it seems, but perhaps abstracting away the headers and links would do the trick:

A global navigation.py:

NAV = {
  'some_link': 'http://google.com',
  'some_header': 'My Heading Text'
}

Then, a pandoc filter goes through the markdown pages, looking for patterns like '# <symbol>' and '[footext](<symbol>)' and replaces <symbol> with what it finds in NAV.

markdown-page-1.md:

# some_header

Some words about what is supposed to be in this section.

markdown-page-2.md:

...
Some text about something and a [link](some_header) to the thing. Oh, and here's another [link](some_link).
...

Probably this is an oversimplification, but something more like this might work.

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

No branches or pull requests

1 participant