Log in Sign up

Developers

153 questions tagged ‘Developers’

How to hide the publish date on pages?

How can I hide the date in my entry.html template only for pages (not posts)? Alternatively, is it possible to use separate templates (page.html and post.html) for pages vs. posts? Or can I prevent date generation for pages entirely?

On the Archive page is it possible to exclude posts with a specific tag?

I currently have this block in archives.html: <div> {{#allEntries}} <a href="{{{url}}}">{{title}}</a> <span class="small">{{date}}</span> <br /> <div class="spacer8"></div> {{/allEntries}} </div> Instead of allEntries is it possible to remove entries that have tag x?

Key for determining if a post is on an index page, or displayed on its own?

On pages where multiple posts are displayed, the <h1> is the page name, e.g.: Archives, Home. Posts titled are rendered in <h2>. On a single post page, the post title is an <h1> tag and subheadings are <h2>, <h3>, etc as needed. All good so far. The issue arises when a post with subheadings is not displayed on its own page, e.g.: when shown on a page showing the ten most recent posts in full. There, the titles are rendered in <h2>, but then the subheadings are one level off. My thought was to write the headings within each post something like: {{{#singleentry}}}h2{{{/singleentry}}} {{{#multientries}}}h3{{{/multientries}}} But I am not sure what the appropriate key would be, if it exists. I had a look through the developer reference doc but didn't see something like this. Since something like this would be useful for things beyond just modifying heading levels, I feel like there must be something that will do the trick that I am simply not seeing. If there's a better way, I'm all ears!

How does site search work in Blot?

I started using the Mira template and I saw it had a search.html page and an archives.html page. I wanted to merge them, so I added a search field to the archives page, following all the same logic that's defined in the search page. But the search that I added to the archives page didn't actually work--the JSON data for the page doesn't contain the query parameter when I run the search from archives.html, even though the exact same code works on search.html. Does Blot have a special case for the search.html page of some sort?

Display related posts?

If I am on a blog post page with tag x, y and z, is it possible to only show other items that have tags x y or z?

How to get a home page at '/' and then have all updates listed below it?

I'm pretty close to what I want at https://rapidresponsechoir.org, but the index.md file with: --- Link: / --- # Rapid Response Choir seems to stuck at a date in February and I'd like the most recent posts to be listed underneath. I'm using the Magazine template. Also, how do I get consistent top banner photo across all pages? Thanks! - PeterB

Formatting a custom date field?

Hello, I have a custom date field that looks like this: update: 2015-05-12. I've seen there are ways to format dates for built-in fields. Is there a way to do so for custom fields? Alex

Checking for home page?

How can I check in mustache if I'm on the homepage? I want to do something different on the homepage, but the same on entries and the archive page. So using {{#entry.title}}...{{/entry.title}} doesn't help me in this case. Alex

Linked title in teaser?

All my posts start with an H1 that provides the post's title. When using a teaser, is it possible to have the H1 link to the blog post?

Showing all comments on the homepage?

I'd like my comments/box to appear under every post on the main page. My entry.html now looks like this: <div class="clear"></div> <section id="#Comments"> {{> pluginHTML}} </section> <div class="clear"></div> The comments appear on each entry if I visit it from the archive but not on the homepage.

1 2 3 4 16 Next

Newsletter
Get updates on Blot’s latest features and changes. Delivered every three months.