digitalcraftsman / hugo-material-docs

Port of Martin Donath's mkdocs-material theme to Hugo
MIT License
706 stars 186 forks source link

Add support for manual prev/next links #4

Open digitalcraftsman opened 8 years ago

digitalcraftsman commented 8 years ago

Currently, the footer links to previous and next pages using .Next and .Prev. Both reference pages based on their last modification date. This isn't always in sync with the main menu.

Like Hugo's docs users should be able to link to pages manually if they set the corresponding urls with prev and next in the frontmatter.

digitalcraftsman commented 8 years ago

Both reference pages based on their last modification date.

Setting a weight in the frontmatter would users let define the order themselves. Do you have a need for an implementation of prev and next, @gravis?

gravis commented 8 years ago

I have replaced them with NextInSection and PreviousInSection, as I couldn't make the links in the order I wanted (probably an issue with the weights).The problem is more new users will see the next/previous links in hugo docs, and wonder why it's not present in themes. Actually, some themes (like https://matcornic.github.io/hugo-learn-doc/basics/what-is-this-hugo-theme/ ) already use these links. This is confusing for new users, again. Thanks

callmeradical commented 8 years ago

It would appear that if you use date and weight together, they interfere with each other. This looks to be more an issue with Hugo, not necessarily with the theme.