A couple of days ago someone in Discord messaged and said “I don’t believe your site is bearblog - it looks nothing like it!” Today, someone on Mastodon asked if they could see under the curtain so to speak to maybe get some ideas of their own. So - I thought a blog post detailing my theme might be helpful. Please note though:
- This might be technical.
- It will be pretty specific to BearBlog.
- It’s highly opinionated because I’ve crafted it for me.
If you aren’t familiar with BearBlog - it’s worth checking out. It’s one of those tools that might not look like much from screenshots or a quick “dip” into it but it is actually quite flexible and powerful if you take the time to play a little. I’m loving that aspect of it.
Anyways, to go over everything, I’ll break it down into 3 sections: header, main content and footer. If you are curious about a specific section you can jump there or just read on to see how everything fits together. I’ll also say to start that my base theme is Archie; if you are trying to mimic exactly, select it first (but I encourage exploring to find your own style!). And that all of this is accurate/current as of today. I’m still crafting though so it could change in the coming weeks. No promises this will be up-to-date a month from now!
Header
Note: For this section, you’ll primarily be working out of 3 different areas of the BearBlog dashboard: The Nav tab, The Themes tab (specifically the text block where you can edit CSS), and The Settings tab -> Header and Footer Directives section.
I’ll start with the Head Directives. I’ve got quite a bit of necessary info here:
The first line sets the creative commons license link. The next attempts to prefetch my mountain friend’s big smile. The first script line calls in FontAwesome which is necessary for the special icons. The next script is for my personal logs using Umami. And finally, the last comment is for AI bots with a goofy attempt at prompt injection.
On to the header itself, I changed quite a bit here, I think. First off I got rid of the automatic blog title by setting the display to none in the CSS file. You have to do this because there isn’t another way to “turn it off” so to speak. Anyways- that’s this bit of CSS:
I’ve then got two parts to my image header - my mountain friend (who smiles wide when you hover your mouse over him) and the site name/tagline, stylized. The mountain was made by Andy and the site name/tagline was done by me using Squarespace’s logo maker (if it matters - no AI). The mountain can’t be clicked and is actually shown using CSS:
Of note: the hover block is what causes my mountain friend to smile. And then this bit of HTML in the Nav section:
The name/tagline image is just a normal img tag inside of an link tag.
The last part of navigation is just the slashpage links. In the top navigation I use icons for those. I think it looks cool so rolled with it. Basically, it’s just a bunch of things like this strung together:
You can view my full navigation code here if you’d like.
Main Content
I maybe should of done this above, but I’ll take a few moments to mention some key CSS pieces. First of all, you’ll want to input all your core variables (mostly colors). You can do that with the :root CSS directive. Below is mine, with my (current) colorscheme:
This bit of code helps with the main page post formatting (I found it in the BearBlog Docs):
And then this one is for the call out box on the homepage:
And finally, this one sets up the columns on the homepage “Blog Links” section.
I’ll share a link to the full CSS but note: there’s some a lot of experimental crap in it that might work some day (I’ve been working on a better call out box for posts, for example).
Moving on to the homepage itself, it’s somewhat broken into 3 sections: callout, featured posts and blog links.
The Callout
This is the code for the callout box. Because it relies on CSS classes, it can’t be done in Markdown, unfortunately:
I could probably ditch the line break and edit the CSS separating navigation from main content but the breaks works for today.
Featured Posts
This section is pretty straightforward. It basically just uses BearBlog’s code tags to pull in a specific number of posts of a specific tag, including the meta_description field of each post:
I’ve added a “Subscribe!” text for RSS as well as a heading line to separate from the next section.
Blog Links
The final section is blog links (mostly to get into the depths of my blog). It’s a lot of html as it creates a couple of columns on a responsive grid so it’ll look ok on desktop and mobile (hopefully):
Column 1 is articles & links to share. Column 2 is site updates and then a short script to pull in my latest status.lol and a referral image for omg.lol (because it’s awesome).
I think that wraps up this section…
Footer
…Which then brings us to the final section: the footer. Here, you primarily play with the “Header and Footer Directives” section of the Settings tab. My Footer textfield looks like this:
It starts with two rows of links to slashpages, mostly. There are more here then I wanted to add in the header, hence the two rows. Next is a script reference for JS by Robb Knight for pulling in your last played song, according to Last.fm (find out more details here). Next is some custom javascript that injects an attribute onto the toast button when the page loads. This allows the toast button to double as a “upvote in Umami” button which is nice. Finally, the last line is a license link - Creative Commons, share and remix but don’t forget to attribute!
And that brings me to the end! I’ve got the full Footer field above. The navigation code is here. The CSS is here. The homepage code is here. Use anything that’s helpful, ignore what’s not. And if it was helpful, you can upvote below!
Have a thought? Or comment? Reply on Mastodon!