Skip to content

Show ABlog postcard in blog post sidebar#990

Open
niksirbi wants to merge 1 commit into
mainfrom
blog-sidebar-postcard
Open

Show ABlog postcard in blog post sidebar#990
niksirbi wants to merge 1 commit into
mainfrom
blog-sidebar-postcard

Conversation

@niksirbi
Copy link
Copy Markdown
Member

@niksirbi niksirbi commented May 20, 2026

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 postcard template with a small conf.py change and no custom templates, CSS, or extension code.

blog_postcards2

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_sidebars for blog/** 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.

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>
@sonarqubecloud
Copy link
Copy Markdown

@niksirbi niksirbi requested a review from adamltyson May 20, 2026 15:35
@niksirbi
Copy link
Copy Markdown
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.

@adamltyson
Copy link
Copy Markdown
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:

  • Gives more visibility to blog authors
  • Advertises other blogs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants