Closed rdeago closed 1 year ago
I just converted this PR to draft because I'm incorporating it, together with other improvements, in #23. I will probably close this one once the other one is ready.
Closing this as the same changes are in #23.
ditto: putting everything in a single PR i.e., PR#23 is bad idea. The harder is to review, the lower the probability of getting it merged.
This PR contains the following additions:
Content footer
Add a
_content-footer.cshtml
partial, that acts like_post-footer.cshtml
but is not limited to posts.The rationale for this change is that
_post-footer.cshtml
is a good place for e.g. an "Edit this page" link, which of course is not only useful on posts.In posts,
_content-footer.cshtml
is included immediately after_post-footer.cshtml
.Pluggable comment engines
When the
CommentEngine
setting of a post (most probably coming fromsettings.yml
in this case), converted to lower case, is not empty and is not "none", adiv
(Bootstrap row) with anid
ofcomments-container
is added after the one containing the post itself.Inside the added row, a partial is included (and therefore must exist!) whose name is
_post-comments-XXXX.cshtml
, whereXXXX
is the lower-cased value ofCommentEngine
.This mechanism allows for the addition of different comment engines (Giscus, Utterances, etc.) even without modifying the theme.
Giscus support
When the
CommentEngine
setting is equal togiscus
, the giscus client script is automatically included and MUST be configured; more details in theREADME.md
diff.Of course, all changes have been documented in
README.md
.