Closed LukeHong closed 2 years ago
Looks like a good feature. Same as the other PR, haven't tested locally yet but approving the test builds.
The last push is to fix the variable name style
Fix missing signoff issue, should be all good after being approved
[Edit: Nevermind about what I posted earlier; it was an error on my end.]
I would suggest changing the comment for numberOfPinnedPosts
to read something like:
# Maximum number of pinned featured posts (default: 8)
since as I read the code it looks like this param doesn't need to be set in order for the pinning to work (which is good).
Also, somewhat tangentially related to this PR, I noticed that we have a "featured" tag, but that posts are only featured when featured: true
is set -- it has nothing to do with the tag. We might want to address this, or at least document it, in a future PR [Edit: Opened an issue for discussion, #356].
Tested and confirmed that this works; sorry about the false negative I reported in the previous comment.
See my suggestion about the comment; otherwise this looks good.
Thanks for contributing @LukeHong!
@rootwork I also add it to the comment for numberOfFeaturedPosts
and numberOfRecentPosts
which also have a default value in code
Looks great! And you're right, good catch. Going to merge.
Thanks for this contribution as well @LukeHong!
Above does not seem to work. Using latest Hugo and Clarity:
featured: true It makes the post appear in "Featured" section, but removes it from "Recent"
featured: false It makes the post appear in "recent" section, but removes it from "Featured"
featured: true + tag:featured It makes the post appear in featured section BUT it is not pinned at the top of the post list.
Am I missing anything?
Replied at #451 .
This PR...
Changes / fixes
Screenshots (if applicable)
Checklist
Ensure you have checked off the following before submitting your PR.