Difficulty getting a GitBook site to display on a GitHub page

I am trying to follow https://github.com/GitbookIO/gitbook , but there is some presumed knowledge that I clearly do not have. I used GitHub for a while, but I still have a lot to learn.

My goal is to have a GitHub page at http://martynchamberlin.imtqy.com/GitBook/ that matches this repository: https://github.com/martynchamberlin/GitBook .

So here is my question: how exactly does GitBook do it?

I assume (although it’s not specified anywhere) that they manually create the gh-pages branch because it magically turns the Github repository into a Github page.

To do this, I completed the Github documentation at https://help.github.com/articles/creating-project-pages-manually

But here is my problem: all the HTML (index.html, etc.) is in / _book / instead of the parent directory of the gh-pages branch. This means that when I download https://github.com/martynchamberlin/GitBook , I get 404.

Please note that when I launch gitbook servelocally, I see what should when I launch my browser on localhost: 4000.

I am sure I am missing something simple here. Any ideas?

Thanks Martyn

+4
source share
3 answers

: https://github.com/GitbookIO/git.

grunt : , .

, package.json, Gruntfile.js :

$ npm install .

:

$ grunt test

gh-pages:

$ grunt publish
+5

, , .

tortoise-git Windows github, . gitbook publish, - ..

, github windows, git shell, , gitbook publish github suite git, .

0

As for the branch gh-pages, you are right, it can be found here:

https://github.com/GitbookIO/git/tree/gh-pages

There really is a file in the root directory index.html:

https://github.com/GitbookIO/git/blob/gh-pages/index.html

0
source

Source: https://habr.com/ru/post/1536676/


All Articles