Skip to content

Add support for alternative URL in TOC #10

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

Merged
merged 3 commits into from
Aug 5, 2018
Merged

Add support for alternative URL in TOC #10

merged 3 commits into from
Aug 5, 2018

Conversation

N0K0
Copy link
Contributor

@N0K0 N0K0 commented Aug 5, 2018

Sometimes it is useful to be able to point the TOC to a new page. For example in an overview of meeting minutes found here:
https://fordelingsutvalget.org/archive/
https://github.com/cybernetisk/fordelingsutvalget/blob/master/blog/archive.html

These minutes then point to an alternative page like for example:
https://fordelingsutvalget.org/posts/2018/2018-05-16-Fjerde_M%C3%B8te/#agenda

This does not affect anything other than the href field. And does not break on any valid href.

@@ -19,6 +19,7 @@
* h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
* ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
* item_class (string) : '' - add custom class for each list item; has support for '%level%' placeholder, which is the current heading level
* base_url (string) : '' - Possible to add links to other domains
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, could you remove the extra space before the (string) so everything can be lined up and make Possible lowercase to match the others?

Additionally, could you also add this new parameter to the README?

@allejo
Copy link
Owner

allejo commented Aug 5, 2018

I really like this! I had never thought about creating a "summary" page of TOCs for other pages.

@N0K0
Copy link
Contributor Author

N0K0 commented Aug 5, 2018

Fixed the formatting and the documentation. Does the description of the parameter look okay? I'm a bit short on good words right now 😄

@allejo allejo merged commit 29de49d into allejo:master Aug 5, 2018
@allejo
Copy link
Owner

allejo commented Aug 5, 2018

Tagged as 1.0.5. Thanks for this! 🎉

@henrist
Copy link

henrist commented Aug 5, 2018

By looking at it, doesn't the docs say base_url while the implementation says baseurl (no _)?

@allejo
Copy link
Owner

allejo commented Aug 5, 2018

Yup! Oversight on my part when I was reviewing the PR, it's been fixed in f98fc33. The current master branch and 1.0.5 tag have the correct documentation.

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.

3 participants