content filtering based on today's date and published date frontmatter (draft content)
See original GitHub issueIs there some configuration available, to draft the content based on published date used as frontmatter?
By drafting content, I mean that the content is not visible on production build until marked published, while everything is visible in development mode.
I know that we can use a boolean published
variable to filter content. But, just curious to know if there is some other way to publish content based on date variable and today’s date.
I couldn’t figure out how to avoid filtering in development mode.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Front Matter - Hugo
Hugo allows you to add front matter in yaml, toml, or json to your content files. Front matter allows you to keep metadata...
Read more >How do I show a Jekyll Collection item on a specific date ...
My first thought was to add date: 2020-06-17 to the front matter then run a check to see if that matches today's date...
Read more >Updates | Front Matter
#360: Define which content types can be used on your page folders ... #283: Added published date sorting options for the content dashboard ......
Read more >Jekyll cheatsheet - Devhints
The one-page guide to Jekyll: usage, examples, links, snippets, and more.
Read more >Creating Unlisted Content in Hugo - Brian P. Hogan
You can do this by adding a new piece of front matter to your pages, and then altering your themes to filter those...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This worked great. I made one small change for anyone reading this -
I wanted to see drafts locally. This way only my deployment server which I set
NODE_ENV
in build lambda too “production”.@khrome83 Sure 😃
As a workaround, for now, you can get the content type and remove the node in the
loadSource
hook.loadSource
in yourgridsome.server.js
file will be executed after plugins so the content type should exist.