Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter posts in www by date #9298

Closed
calcsam opened this issue Oct 22, 2018 · 4 comments
Closed

Filter posts in www by date #9298

calcsam opened this issue Oct 22, 2018 · 4 comments
Labels
good first issue Issue that doesn't require previous experience with Gatsby

Comments

@calcsam
Copy link
Contributor

calcsam commented Oct 22, 2018

Currently all blog posts on www are displayed. As a result, when we calendar posts for the future, sometimes we need to hold merging them until the future, and then we forget....

In order to avoid this problem, we want to be able to merge posts right away, but have them not show up in lists until they are published.

As a result:

  • Blog posts should continue to page be created as pages, no matter if in the past or future...
  • ...but they should only show up in the home page, /blog page, and /tag pages if the date is not in the future.
  • Filtering should be server-side (probably can't be client-side due to pagination unfortunately) and future should be calculated as GMT future (to be friendly to European audience).
@calcsam calcsam added Hacktoberfest good first issue Issue that doesn't require previous experience with Gatsby labels Oct 22, 2018
@jgierer12
Copy link
Contributor

I'd like to work on this :)

@DSchau
Copy link
Contributor

DSchau commented Oct 22, 2018

@jgierer12 we would love if you do :) Thank you!

@jgierer12
Copy link
Contributor

One thing I noticed is that, if this were to be implemented server-side, we'd have to make sure the site is rebuilt once the article should be listed. Does this happen often enough anyways (at least once per day)? Or is there some way to programatically force a rebuild? Otherwise I think we'd have to find a client-side solution.

@KyleAMathews
Copy link
Contributor

Yeah, for many sites this might be a problem but gatsbyjs.org is rebuilt probably 10-15 times a day (or more. Just counted and it's been built 13 times in the last 13 hours so once an hour on average).

@pieh pieh closed this as completed in #9400 Nov 5, 2018
pieh pushed a commit that referenced this issue Nov 5, 2018
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this issue Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issue that doesn't require previous experience with Gatsby
Projects
None yet
Development

No branches or pull requests

4 participants