Add blog post author bylines#988
Conversation
|
niksirbi
left a comment
There was a problem hiding this comment.
Thanks for this @PolarBean, it's a really welcome addition! I've long wanted author names shown on the blog posts, so I'm glad you brought this to my attention.
While reviewing, I discovered that ABlog could kind of do sth similar natively: ABlog ships a postcard sidebar template that renders the date + author (linked to their author page), plus category/location/tags. Enabling it is just a few lines of config in conf.py:
html_sidebars = {
"blog/**": [
"ablog/postcard.html",
"ablog/recentposts.html",
"ablog/tagcloud.html",
"ablog/archives.html",
],
}
# PyData theme bundles FontAwesome, so let ABlog render its postcard icons
fontawesome_included = TrueI gave it a quick try and it works nicely (screenshot below). The main difference is placement: this puts the metadata in the post sidebar rather than as a byline under the title, and it leans entirely on ABlog's maintained templates (we don't have to add any custom functions or CSS). We could also tweak it to remove some of the sidebar boxes if we don't want them (e.g. recent posts and archives), and the entries within each box can also be tweaked (via a trimmed template).
What do you think? Should we go the ablog-native way or our own way?
|
I think our way looks a lot nicer but in general I think we should do the native way as it's more maintainable. Thanks for finding this! Totally up to you. Whichever you choose I will propagate to the other repos |
I agree on both counts (custom is simpler/prettier, native is hopefully easier to maintain). I opened an alternative implementation of the native sidebar approach as #990, and will tag @adamltyson to review, since it will be his call regarding NIU and BG websites. No matter which one we choose, it should be the same choice across our websites. I don't feel particularly strongly either way. |



This is a copy of the changes which were reviewed originally here (the changes were copied over using codex)

brainglobe/brainglobe.github.io#496
I have built it locally and it is functionally the same.