The random bio: A script picks out random text snippets, and when it runs, the bio is inserted into a specific div in post.hbs. Originally it ran on the server side, but I got fed up with having to add my script into the distributed index.js every time I upgraded ghost. So now it’s just done on the client side - the randomBio script is just included into the “post” page with a script tag. You can look at the script if you view source on the page.
The article index: I have a “page” called “index”, and code in page.hbs which checks for slug=“index”, and if it is that page, it just appends a list of posts to that page by iterating all posts in title order.
Pretty simplistic stuff, but it fills some gaps in what Ghost provides. Doing the bio on the server would be essential if you have multiple authors. Maybe there’s a nicer way of adding server-side code to themes nowadays, I haven’t looked recently.
That’s a neat trick, picking the random bio on client side. (Sorry about the late reply: I’ve been pretty caught up with work deadlines).
Maybe a more advanced version could have a combination of the two, with several bios (say 1 to 10) saved on the server-side, and the client picks a random one to load each time? Maybe not in this case, where it’s just a little extra text, but other “random” functions could work that way, such as the “multiple authors” you mentioned. (I’m running Gatsby, so client-side random selection is definitely something I’d find useful).
I’m in two minds about server-side code in themes. It would certainly be useful, but also increase the complexity. Of course, since it’s already possible it might as well be made easier.
I like the theme, it looks really neat! And the commento fits in nicely too.
One tweak would be to improve footnotes: right now you can scroll to them, but can’t scroll back up afterwards. Maybe you could add a “display on hover” or something, so people don’t have to scroll at all? Not sure if that’s easy in Ghost’s interface though
Not sure what you mean by “banner credits”, but I meant something more like a tooltip than a popup. So when you hover it shows the footnote text, with the option to click if you want to go to the full footnote. Something like what they have in Wikipedia, perhaps? Or maybe even simpler?
Yes! Exactly like the WaitButWhy blog—and thanks for reminding me, as it’s been a while since I visited it
Ahh…I see those now. Didn’t notice them before; they’re pretty neat (like the rest of your blog)
i like the way the blog is all rounded and homely, like an actual blog as opposed to a corporate website, but still has a polished and professional feel when you look around the edges! It’s like what all those set-up-in-five minutes blogs are trying to be, but you’ve actually gone ahead and done it
That includes the “donate” button, which I just noticed: unintrusive but always there, and when I saw it for the first time I could guess exactly what it does. (I can’t afford to use it, unfortunately but I hope others do!).
I’m a website developer and I’m creating a series of posts to help my readers learn more about JAMStack, PHP, creating APIs and much more. https://blog.michaelbrooks.dev
Hi, I have some tutorials content in my blog WDiaz.org but I also write about other stuff. My theme still under development, I didn’t add the Memberships & Subscriptions yet, Cusca.
That is my first Blog based on Ghost. Last Week I switched from Wordpress to this CMS. Works really better.
Then I buy an Theme and no I’m translate all strings into German.