{pinned} feature

Was thinking something like if you put Pinned: Yes in the front matter of a post, and put {pinned} in a template, it would display that post, else display nothing if no posts have that front matter? I’m not clear on how you’d set formatting for it, though. Maybe it would just use the same formatting as {recent-posts}. Or, I guess there could be a Pinned post format.

1 Like

Love this idea. What behavior would you expect if more than one post is pinned? Should all pinned posts appear where {pinned} is, or just one? (And if just one, should it default to the newest of all pinned posts?)

Also wondering if we could extend the Pinned metadata, maybe using it as a directive of sorts. So, instead of Pinned: Yes it could be Pinned: Permanent or Pinned: until April 15, 2023 or Pinned: starting May 1, 2023. Lots of weird coding implications for that, but I guess the question is whether there’s any interest in adding directives related to timing/duration for any given pinned post.

Also: this setup places the action of “pinning” within the posts; is there any interest in being able to pin from the template as well? For example, {pinned:/2023/my-epic-post} or something like that. Would you (or anyone else) use this?

As for the formatting of a pinned post, it could use the new Post template that was just added to support the multi-post landing page stuff (but it could also just use its own special micro-template as well, if you think that would work better).

1 Like

I’m not sure if I’d use it but I think time-based front matter values are a great idea for this.

1 Like