Add Post Navigator setting for Blog Posts #119
+69
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This feature implements an opt-in component that, when enabled, adds a navigator at the end of each blog post; so that the users are not forced to go back to the
/blog
page after reading each post.It implements the feature mentioned in #118
Explanation for the Setting Placement
I decided to put this feature under
params
in thehugo.toml
file, given that it is similar tohideMadeWithLine
.Implementation
The component in question follows the same strategies as the rest of the code:
layouts/partials/post_navigator.html
layouts/partials/single.html
Final Note
I’ve added a summary of this feature in both the
README.md
andhugo.toml
files. Additionally, I’ve included a brief explanation in the Development section to clarify how a developer should execute hugo commands from the root directory of this project.I’m open to any changes or discussions.