Developers
135 questions tagged ‘Developers’
Adding a badge to my template's footer?
I would like to add this "Written by human not AI" badge somewhere at the foot of all of my blog posts I can't figure out how to upload a png or svg into the blog source though.
Changing background color with metadata?
Hello! Using a custom template here, based on an old version of the Essay template. I'm wondering if there's a way to specify an individual post's background color using Blot metadata. I'm already using the variable bg color in my CSS, but it grabs what color is specified in the template setting. (I'm overriding this on the template's dark mode variant). body { background: {{background_color}}; } What I'd like to do is specify a color in each post's metadata, which then gets loaded in place of that CSS variable. Any help would be much appreciated!
Error checking if page is active in menu ?
When I put the following in my template, I get the error Unclosed section "active} <div class="menu"> {{#menu}} {{#active}} <a href="{{{url}}}" class="light active">{{label}}</a> {{/active}} {{^active}} <p>hello</p> {{/active}} <a href="{{{url}}}" class="light">{{label}}</a> {{/menu}} </div>
Filtering posts onto separate page?
I would like to know how to have a section in the blog containing posts independent of those on the home page. For example, I would like to create a page called 'News' on which to put posts that do not appear on the home page.
Adding day of week to date format?
Is it possible to set the date format of posts so they include the day of the week?
Is it possible to hide specific tags from the tag list?
I have tags showing on my archive page and also my main page. I'm experimenting with using tags to help me build a custom RSS feed. I would like to exclude these tags from the Popular Tags list and even from the post itself. Ideally, these tags would be internal for me to use but not visible to the user. Is this possible?
Is it possible to get the length of the post?
Is it possible to get the length of the post content? It could be used to calculate reading time, display the post in a different layout, etc . if we have a way to get the number of characters.
Adding a copyright statement
Is there a smart way to add a discrete copyright statement (eg. C 2023 XX, all rights reserved) as a footer to all pages? I'm using Diary template. Thanks!
Reverse the order of entries?
Is it possible to list {{#allEntries}} in reverse order—oldest at the top; newest at the bottom?
Is it possible to show related posts with the same tag?
When I'm on a post, it would be nice to see other posts matching the current posts tag(s). I played with this a little in my custom theme, but couldn't figure out how to filter the entries by the matching tag(s).