Show ABlog postcard in blog post sidebar#990
Open
niksirbi wants to merge 1 commit into
Open
Conversation
Enable ABlog's native "postcard" sidebar template on blog post pages so each post shows its date and author (plus category/location/language), with author/category entries linking to their index pages. Also enable FontAwesome icons, which the PyData theme already bundles. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Member
Author
|
Note that the sidebar can be used to add additional info, such as links to Recent Posts, Archives (per year) etc., but I've chosen to keep only the 'postcard' to keep things simple. |
Member
|
I think we should add the extra info like recent posts. It's slightly less tidy, but I think it's better to have some useful content than a large expanse of white space. I think it also serves two purposes:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Summary
Adds author (and date) bylines to blog posts using ABlog's native postcard sidebar template, rather than custom extension code.
This is an alternative implementation of #988, which achieves a similar goal by injecting a byline under the post title via a custom handler (~73 lines of Python + CSS). Here the same information is surfaced through ABlog's maintained
postcardtemplate with a smallconf.pychange and no custom templates, CSS, or extension code.Trade-off vs #988
The metadata appears in the post sidebar rather than as a byline directly under the title. In exchange, it relies entirely on ABlog's own templates, so there's nothing custom to maintain. Note that setting
html_sidebarsforblog/**replaces the default site-nav sidebar on blog pages only.For what it's worth, I find @PolarBean's #988 version prettier, but think going the Ablog way is better maintenance-wise.
Testing
Built the docs locally and confirmed the postcard renders on blog post pages with linked author names.