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

Regenerate blog metadata on request to blog #590

Merged
merged 1 commit into from
Apr 23, 2018
Merged

Regenerate blog metadata on request to blog #590

merged 1 commit into from
Apr 23, 2018

Conversation

yangshun
Copy link
Contributor

Motivation

Fixes #237. I'm not entirely sure if this is the best fix as it can be quite an expensive operation if there are many blog posts. IMO a better way would be to watch the blog files and only regenerate when it changes, but both ways has it pros and cons. Feel free to close this if you prefer the file watching method.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

  1. Load /blog
  2. Change some text in the top blog post
  3. Reload /blog
  4. Text update is reflected

Related PRs

NA

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Apr 21, 2018
Copy link
Contributor

@JoelMarcey JoelMarcey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yangshun Hi! I think this is a good fix for now - better than broken.

When we implement something like Hot Reload, we can think about it being more efficient. In general, server.js is used for local testing, not live production, so not optimal efficiency could be ok for a bit, imho.

I will let you merge.

@JoelMarcey
Copy link
Contributor

@yangshun Unrelated, there is a branch called fix-nav at https://github.com/facebook/Docusaurus/branches. Do you need it any longer?

@yangshun
Copy link
Contributor Author

yangshun commented Apr 21, 2018 via email

@yangshun yangshun merged commit d3fd347 into facebook:master Apr 23, 2018
@yangshun
Copy link
Contributor Author

Sorry the branch was indeed created by me. It's weird how that happened because I don't have push permissions. Anyway I don't need it anymore and thanks for deleting it! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Main blog page isn't updated upon refresh
3 participants