cryogen-project / cryogen

A simple static site generator written in Clojure
http://cryogenweb.org/
Eclipse Public License 1.0
1.09k stars 96 forks source link

Feature Request: Marking posts as "unlisted" #262

Closed JohnnyJayJay closed 11 months ago

JohnnyJayJay commented 11 months ago

You can add a page without pointing a nav link (or any other link) to it, making it effectively "hidden" unless you have a direct link. A similar feature would be nice to have for posts. We have :draft?, which isn't all that useful locally (since you do want to see the rendered page while writing) so you have to remember to switch that option on and off when writing locally/pushing changes. Similarly, there is no good way to make drafts public so that select people can e.g. proofread/give feedback before you actually publish the post.

I propose the addition of a new key for posts, something like :hidden? or :unlisted?, which causes the post to be included in HTML generation but excluded from the RSS feed, the blog's front page/preview list as well as all the archives.

yogthos commented 11 months ago

Sounds reasonable to me, should be fairly easy to do, just have to filter out :unlisted? when generating the linking. Any chance you'd be up to do a pr for this? :)

JohnnyJayJay commented 11 months ago

Sounds reasonable to me, should be fairly easy to do, just have to filter out :unlisted? when generating the linking. Any chance you'd be up to do a pr for this? :)

Already on it. As far as I can tell it's a few lines of code in compiler.clj, that's all.

yogthos commented 11 months ago

Yup, should be pretty quick. :)