engine: move static/ contents into public/ and update links, et al.#882
engine: move static/ contents into public/ and update links, et al.#882jorgeorpinel merged 40 commits intomasterfrom
Conversation
to complete previous commit's intended change
update all links from contents WITHOUT proper formatting (yet). See https://nextjs.org/docs#static-file-serving-eg-images
to close #804
just in case? and for consistency with iterative/dvc
That seems to have killed Restyled... |
Hoping this brings Restyled back to life after it crashes.
This comment has been minimized.
This comment has been minimized.
|
Hey @iAdramelk and @shcheklein I have to ask you for help on this one. And granted, it's not a p1 task or anything, but it's been useful for me to get my hands on the Node/Next code, so your guidance finishing this one would be appreciated. DetailsAs you can see here, I moved static/ -> public/ and updated all the imports and links accordingly (see PR description for more context). However, now /doc or other index paths inside aren't working, showing a 404 page (with 200 status) and any valid leaf paths inside also result in Not Found pages (with actual 404 status). I setup a debugger script in 1fcb0a6 and followed the code in server.js step by step into src/utils/sidebar.js, so I know why we get to these errors, but I'm not sure how exactly. I think it has to do with SSR because server.js is executed 2 (or 3) times, once for My 2 main questions are:
Thanks! |
This comment has been minimized.
This comment has been minimized.
|
@jorgeorpinel my wild guess would be that we have problems because of this line: https://github.com/iterative/dvc.org/blob/5b3bf770c6261e88d3832bf3315922b7e289b42a/server.js#L98 Basically, I think that at some point in time in the past, the docs URL's were starting with And the folder with our docs is called exactly |
per #882 (comment) and add useful comment to nearby code.
🤦♂ Yep. I was making complex hypothesis over a routing problem... It's still happening inside the SSR mechanism though, from what I can see in: Anyway, thanks for the educated guess, @iAdramelk! Fixed in 377ab90 🙂 |
with only default prettier for .md files
shcheklein
left a comment
There was a problem hiding this comment.
please, see more comments after the last pass here
made one of them more lax with i (non-case sensitive) per #882 (review)
shcheklein
left a comment
There was a problem hiding this comment.
Feel free to merge whenever you ready. Good stuff 🎉
|
Yay! Merging this will probably create a bunch of merge conflicts in other open PRs though (because of the move from /static/ to /public/static/). Just a heads up guys @ilgooz @pared @iAdramelk @efiop @Suor |
Per Node 9.0.6+ update
See https://github.com/zeit/next.js/blob/master/errors/static-dir-deprecated.md
And https://nextjs.org/docs#static-file-serving-eg-images
+ Close #804 (adopt restyled.io) using this PR to test it.
+ Fix #854 console errors
+ Close #789