-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Rebuild the Site #2039
Rebuild the Site #2039
Conversation
This is still very much a work in progress but essentially my plan is to use the `webpack`, along with the following plugins, to generate the site... - DirectoryTreePlugin: Creates a JSON representation of `src/content` for navigation and `import()` - StaticSiteGeneratorPlugin: Creates HTML files in `/dist` for all markdown pages - RedirectPlugin: Generates redirects in a similar manner to antwar (?) - And then any of the standard plugins... This rewrite also means the site would be both an SPA as well as a static site and should make finishing the PWA ticket much easier. More to come...
The `react-banner` package was built based off of this component but has a few fixes and will externalize any bugs so this site can focus more on content. It also allows anyone else to utilize the banner in other sites. Still a few `TODO`s left...
Move font import to css and remove what's already or will be accounted for by other parts of the site (e.g. there's already a `TODO` for re-integrating `docsearch`).
Not sure the `fontantialias` mixing will be necessary if we update the inline `svg` elements/icons.
…d respond to `open` prop More refactoring to come (as hinted by the `TODO`s)...
Pick up new `_content.json` file and start using it for both routing as well as navigation building. Also, maintain `mobileSidebarOpen` state and toggle method for a more standard react approach.
…SiteGeneratorPlugin`
This replaces the previous need for the `yarn-lock.json`.
Had this commented out initially while testing the `SSGPlugin` out but it doesn't seem to cause any issues.
This allows simpler and more straightforward usage within a react-based application.
…data structure Utilize the new `Markdown` component and `page` structure to simplify the `Page` and `PageLink` code.
Note that there's still some work to be done here... - We need to exclude `src/content` from the main bundle. - We need to implement `import()` for the browser level. - Still much more to fix/re-implement in terms of routes and content. That said, the build is much faster (though we need to work on rebuild speed using a more targeted rebuild). Getting there...
Update regarding #2039 (comment) |
Need to look why travis failing tho |
Fix unencoded ✭ character in img src
The links linter is still failing, and if i understand correctly:
Please correct me if i am wrong @Munter |
@EugeneHlushko Consistently problematic external dependencies, like badges, which have shown instability, can be marked as The problem here was, there was no url at all, see webpack-contrib/cache-loader#60 That triggered what I would call a bug in html-loader, which means there was no real URL to match against for a But yes, it is correct that our CI internal link check ha dependencies on each of the README's of the included loaders and plugins being correct. |
Maybe this is not the right way to go about it? Could be that doing checks on the links that this repo owns in ./src/**/*.md makes more sense to do before fetching external content? |
It's still content shown on the docs page. I found so many broken references across pages in the docs, missing images, wrong fragment identifier links etc during the work in this branch. It seriously difficult to make sure everything works correctly and gives the best user experience if you don't have tooling to make sure of it. We just need to balance it out so there are no false negatives blocking the build. Like the last travis run here for example. I'll add an accepted failure on that one |
I think that our cd is at risk with this tho as i pointed out earlier, if the rest of maintainers are happy to deal with that, lets leave it as you implemented - to check externally fetched md files too |
Let's ping maintainers again for final look since no one responded and merge in X days if no additional feedback is given. This is a huge change that everyone had worked hard on and waited for. cc @jeremenichelli @skipjack @montogeek @Munter UPD: close and open was accidental lol, gh buttons too close for my phat fingers. |
Awesome to see this finally moving forward again, thanks to those that revived it. I’d love to help more but am still very strapped for time. If I remember correctly, it was only one or two markdown parsing issues that were blocking the merge. Based on the other comments/merges, it sounds like those are resolved so from my standpoint this is good to go. If we notice anything after the merge I’ll try to find some time to help out. |
@skipjack It is always nice hearing from you. Yes, it is ready but we haven't found or schedule the time to do it. |
I should be able to help out Saturday in case things explode |
# Conflicts: # src/content/configuration/index.md # src/content/configuration/resolve.md # yarn.lock
Lets see how it goes... 🤞 |
OMG IT'S HAPPENING |
Its live! |
Kudos on everyone involved, it's working like a charm <3 |
Yeah just poked around a bit, seems stable. Tested navigating through a variety of sections and searching, all seemed to work fine. The only thing I'm noticing, which is definitely not critical, is that the sidebar only sticks for a little bit and then floats up with the rest of the page on scroll. Probably a little css tweak required there. I checked the console and the only errors I'm seeing are |
@EugeneHlushko Nice! |
Awesome!!! Since we also eliminated the continuous github API polling on this branch, we can now turn off the Travis parallel run limitation that we had previously imposed. That should cut roundtrip time for feedback on PR builds down by quite a lot combined with the already shorter build times -- edit -- |
This PR is a complete refactor of the site's build process using pure
webpack
. It offers...I let this branch get a little too big with not enough visibility. This PR should remedy the visibility part and start us on a path to get it wrapped up in the next few weeks so we can go back to focusing on content. Here's what's left:
_content.json
viaDirectoryTreePlugin
(@montogeek - chore(rebuild): re-incorporate anchor links #2041)remark
redirects.json
(@EugeneHlushko - chore(rebuild): re-incorporate redirects #2034)server.jsx
(@montogeek - chore(rebuild): populate page titles #2040)Navigation
component (@skipjack - chore(rebuild): finish navigation refactoring #2048)Nice to haves (won't be blockers for release and can be tackled after merge):
No more work should be done on this branch directly. Please open PRs directed towards
rebuild
to hit these TODOs.This work is heavily related to #1525 and #1400. Once this is merged we should probably close both those tickets and make more targeted tickets/prs for anything else that remains. I think this also closes #2018 and probably a few other tickets. With the introduction of
remark-mermaid
, it makes #469 finishable. Please comment if you know of other tickets this might resolve.