Log in Sign up

Metadata

35 questions tagged ‘Metadata’

Embedding the file's updated date?

Is there something I could put into the markdown of an entry to get the Updated date for that entry? I know I could maintain a date in the metadata, but I was wonder if there is some tag or whatever I could use to have that date automatically set with the last save date of the markdown file.

Problems with date stamps?

I notice that the Date: metadata isn't taking effect now; it used to be that I could upload a post with a future date or time, and it would go live at that time, but now they show up at the time they get uploaded as long as the Draft flag isn't set. Did something change?

Changing the summary text?

You say that the summary: "Defaults to the text of the first sentence of the first paragraph in the file." If the first paragraph is shorter than the maximum summary length, then the summary is continuing after the first paragraph. I would like to use the Magazine template and craft summaries that fit in the available space, so have a paragraph break after my summary.

Titles of pages in the header

I've set up pages as explained, in a Pages folder, but the titles are not the file names, but rather the first sentence of the files, like a post excerpt.

Why is the time always wrong on every post?

Why is the time always wrong on every post? I have it set to Europe/London in the settings, but if I enable this in the theme on the post, it always displays the wrong time constantly.

Use the first X characters of a post as title?

I have a fairly large number of posts that are imported from other services and have no titles. My first idea to handle this was to use a custom tag and then show "untitled post" for these posts. Unfortunately, it looks really silly on the archive page when there are several "untitled" posts in a row. My second idea to get the first X chars from the post and use that as the title, but is it possible to get the first X chars in some way? And before anyone suggest using the name of the file, my posts are stored in folders with images and are all called "index.md" which means that I get an archive full of "index" which looks even more silly that "untitled post" 😁

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!

Posts with no title

For some of my entries I want to have a title, for some of them I would prefer not to have one. I modified the Blog template with {{#title}} <h1>{{title}}</h1>{{/title}} and I thought that would solve my problem. I.e. if the post didn't have a title then there would be no title shown, but Blot uses the file name as a title if there is not title in the frontmatter. I tried having an empty title, i.e. title: but then the title became "null". Is it possible to have some entries to have no title?

Adding time or tags to photos?

I posted a photo on my blog. I noticed it set the time to 12:00 am, even though that wasn't the timestamp on the photo. How do I set the time on a jpg? Also can I add a tag to this photo? Thank you!

Is it possible to have commas in tags?

Is there a way of having commas in tags? Tried putting the tag in quote marks and escaping the comma but the terms either side of the comma always get separated out into separate tags. Thanks.