-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
WIP: upgrade GitBook to 3.x + required config changes #1036
Conversation
Why can't gitbook be configured to handle links relative to the repo root, and adjust them to the docs root? Sounds like a gitbook bug to me. |
I think it makes a fair amount of sense that if you're using a non-repo root docs root, GitBook expects your links to be relative to that configured doc root - it's consistent. If this isn't the direction you want to go, feel free to close this PR. Since GitBook 2.x doesn't seem able to run under recent versions of node, remaining on that version didn't seem like the easiest path forward to me, but I didn't have the context of you having tried 3.x GitBook before, so... |
I'm fine with upgrading - but if the common use case for gitbook is "git repo + gh-pages", and since github doesn't respect the docs root even if gitbook does, it seems like this use case (repo root for master, docs root for gh-pages) makes the most sense. |
Would you like me to have a go at fixing the links then, when I have the chance? |
As long as they continue to work on the normal github UI on the master branch - which is imo more important than on the gitbook UI - that'd be great! |
Ah, good point about the links still working on the GitHub UI. That might be hairy. I guess I'll poke around and see what I can do, but I kinda doubt both are possible without doing away with the GitBook |
I think they might be. Could we file an issue upstream to Gitbook, to fix the root behavior? |
Sure, but I'll leave the issue filing with GitBook to you - I'm not going to do justice to your objections to the current behavior since I don't entirely share them. Again, feel free to close this then. |
That's awesome @jebeck, after updating to 3.x it builds on my computer 🎉 I had issues with the prism plugin, but after removing it everything was working. Spent the last few hours fiddling with the docs and Looking at the docs, especially at Directory structure, it looks like the current setup simply isn't going to work, so I don't see any other option other than updating the docs. To update the docs I believe we need to:
It looks like GitBooks is now in v4 alpha, so I really do think upgrading is the right choice. What do you think @jebeck @ljharb ? What are your thoughts on the action items listed above? |
My thoughts are as follows:
My claim above is that this is a bug/flaw/omission in gitbook; filing an issue there would be a great way to accelerate things. Short of that, and perhaps in the meantime, what ideas do you all have to make this work while meeting the above criteria? |
Closing in leiu of #1039 |
See discussion in #944 for context - the long and short of it is that upgrading GitBook to the 3.x version seems like the path of least resistance to allowing folks to run the docs locally in newer versions of node (7.x and 8.x).
NB: The docs will break if this PR is merged as is! I wanted to throw it up for others like @samit4me to try, and if this looks like the best path forward than I (or anyone else) can work on making the remaining required changes, which I believe will largely be link/path renamings, since all links are current relative to the root of the repo (e.g., docs/guides/browserify.md) but need to be relative to the "root" of the docs themselves (which is docs/) under the requirements of GitBook 3.x (e.g., guides/browserify.md).