Process workflow
Last updated
Last updated
Create a GitHub repository for your book (fork existing or create a new one)
Create the book on GitBook
In the book's Settings, connect the book to the GitHub repository
Write a new book or edit an existing one using the GitBook Editor
Every time you save your work in the Editor, it will be saved in the GitHub repository.
If you have set a GitBook webhook to the repository, every time you commit your work to GitHub repository, it will trigger GitBook to re-publish the book
By keeping the book automatically updated, the readers will have always access to the latest and greatest version of your book
Make sure you have a GitHub account and there is an available XOOPS Publication that you want to contribute to
Go to the publication's repository and click on the Fork Button: (screenshot)
Rename the repo to what you want your book to be called:
Click settings from the home screen of the forked repo (forking creates a copy of the repository under your username). (screenshot)
Rename the repo if needed (screenshot)
Clone the repo to your machine, if you want to work on the document locally. For Windows users there is the GitHub for Windows, which can be very helpful. You just need to click the "Clone" button on your GitHub repository screen, and GitHub will take care of the rest.
Of course, you can also use your favorite way of interacting with Git, incl. the command line.
Now go to GitBook and click on the "+" sign there on top:
which will open this screen: https://www.gitbook.com/new below:
Select the kind of book you want to write. In XOOPS case, the Basic book is what we're using
Set the name of the book. For XOOPS Tutorials, we're using "XOOPS XYZ Module", where XYZ is the name of the module, e.g. "XOOPS Protector Module"
Click on the "Save" Button
1) After the book has been created, we need to connect it to the GitHub repository via the Settings. Please note that from this screen you can also click on the top buttons to Edit or View the book
After you click on the Settings, click on the "GitHub Integration" button
To connect the book to the GitHub Repository, you enter the name of the Account and the repository on GitHub (e.g. XoopsDocs/xyz-tutorial)
If you want GitBook to update the book every time the repository is changed, you need to add the "webhook" by clicking on the link here
Let's save the Settings
From here, we can now click on the Edit button and start writing our new book!
NOTE: Webhooks allow external services to be notified when certain events happen on GitHub. When the specified events happen, GitHub will send a POST request to each of the URLs you provide. Learn more in the Webhooks Guide.