Is adding custom html code to posts page possible? #28

Open
opened 2025-06-22 16:30:54 +02:00 by 82mhz · 2 comments
Contributor

At the bottom of each of my blog posts I have a link with my email address and one to the mastodon post where I announce the blog post. (https://82mhz.net/posts/2025/06/i-can-t-tell-reality-and-satire-apart-anymore/)

These two lines are in the html template for the blog post page, and the mastodon link is stored in the posts metadata and inserted into the template at build time.

Here's what the HTML snippet looks like:

Want to get in touch?

<ul>
    <li><a class="nav-link" href="mailto:....>Send me an E-Mail</a></li>
    {%if page.extra.masto is defined %}
    <li><a href="{{ page.extra.masto }}" >Reply on Mastodon</a></li>
    {%endif%}
</ul>

Is there a way to recreate this in BSSG without touching the source code? I can't think of anything except to write this in the markdown of the post itself...

At the bottom of each of my blog posts I have a link with my email address and one to the mastodon post where I announce the blog post. (https://82mhz.net/posts/2025/06/i-can-t-tell-reality-and-satire-apart-anymore/) These two lines are in the html template for the blog post page, and the mastodon link is stored in the posts metadata and inserted into the template at build time. Here's what the HTML snippet looks like: ``` Want to get in touch? <ul> <li><a class="nav-link" href="mailto:....>Send me an E-Mail</a></li> {%if page.extra.masto is defined %} <li><a href="{{ page.extra.masto }}" >Reply on Mastodon</a></li> {%endif%} </ul> ``` Is there a way to recreate this in BSSG without touching the source code? I can't think of anything except to write this in the markdown of the post itself...
Owner

The footer can be customized, but currently there's no way to render the Mastodon link - I'll try to understand how we could do it, as it is a good idea.

The footer can be customized, but currently there's no way to render the Mastodon link - I'll try to understand how we could do it, as it is a good idea.
Author
Contributor

To add a bit more context, both Hugo and Zola allow for custom metadata fields in the posts frontmatter. In Zola there's a field called "extra" and then underneath that you can define your own fields. This can then be picked up in a html template. Looks like this:

---
title: "I moved my Instagram posts here"
date: 2025-06-23
author: 82mhz
extra:
  masto: https://oldbytes.space/web/statuses/114731265559819743
---

I think this is only really relevant though when templating is fully implemented, so maybe keep it in mind, but don't spend too much time on it.

To add a bit more context, both Hugo and Zola allow for custom metadata fields in the posts frontmatter. In Zola there's a field called "extra" and then underneath that you can define your own fields. This can then be picked up in a html template. Looks like this: ``` --- title: "I moved my Instagram posts here" date: 2025-06-23 author: 82mhz extra: masto: https://oldbytes.space/web/statuses/114731265559819743 --- ``` I think this is only really relevant though when templating is fully implemented, so maybe keep it in mind, but don't spend too much time on it.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: stefano/BSSG#28
No description provided.