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

Old content is served #68

Closed
zerkms opened this issue Feb 9, 2015 · 5 comments
Closed

Old content is served #68

zerkms opened this issue Feb 9, 2015 · 5 comments

Comments

@zerkms
Copy link

zerkms commented Feb 9, 2015

When I change any content/*.jade file the old content is served until gulp server restart.

Steps to reproduce:

  1. Run gulp

  2. Change src/content/index.jade somehow (Eg: add some characters to any header)

  3. Notice there is

    [22:23:00] Starting 'assets'...
    [22:23:00] 'assets' all files 1.03 kB
    [22:23:00] Finished 'assets' after 31 ms
    [QC] File changed: build/content/index.jade
    
  4. Check that build/content/index.jade actually changed

Expected result: the rendered view in the browser should change

Actual result: it does not. Even refreshing the page does not help

PS: Both http://localhost:5000/ and http://localhost:3000/ show the old content

The same is reproducible with gulp serve. And running an rs command (or a complete nodemon server restart) followed by a page refresh actually leads to the updated contents.

Meanwhile changing styles works as expected (in both cases: with serve and live reload)

Summary: everything from styles is updated fine, content and templates are not updated though.

Reproducible in both v0.3.0 and current master b9b42223d568

Any ideas on why it could be like that?

@frankleng
Copy link

@koistya it's rendered and cached in memory. was this intended?
and why do we need jade anyway? is building pages in JSX not best practice?

@zerkms
Copy link
Author

zerkms commented Feb 10, 2015

@frankleng I would be surprised if it was: you need to restart a server manually with rs every time you changed something.

@frankleng
Copy link

@zerkms true for dev. but it makes sense on production to have content live in RAM.

@koistya
Copy link
Member

koistya commented Feb 10, 2015

is building pages in JSX not best practice?

You want to use React/JSX mostly for UI elements, but for the actual website content the more traditional format is more appropriate (plain text or HTML, Markdown, Jade etc.). Consider for example a huge privacy policy page, or an article, blog post, that kind of content usually comes from a database, but for simplicity it can be stored in files (.html, .md, .json etc.)

@koistya
Copy link
Member

koistya commented Feb 11, 2015

@zerkms, @frankleng check it out, the browser now refreshes when you change content pages (.jade files).

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

No branches or pull requests

3 participants