6/7/2023 0 Comments Use gitbook editor on github![]() To set up this workflow for yourself, follow these steps: Then the update-gh-pages.sh build script included in each repository runs the GitBook build tool to generate the static HTML, CSS, and JavaScript files in the embedded repository clone so that the build result ends up on the gh-pages branch where it needs to be to "publish" the site updates by pushing the branch up to the GitHub remote. In our case, every repository using GitBook contains the GitBook source Markdown files on master (often in a docs/ directory but also in other locations as necessary). When you embed the separate clone inside your working repository-in our case, always with the directory name web (see step (1) in the setup instructions below)-this allows scripting tools to target the embedded clone/directory where the gh-pages branch is always checked out. Using a separate clone to manage the gh-pages branch makes everything easier and less confusing/dangerous when there is zero code shared between the gh-pages branch and master (or other branches). We follow the workflow originally recommended by GitHub, which involves creating an embedded separate clone of the repository with only the gh-pages branch. ![]() The workflow for managing one's static assets when the method of publishing is the gh-pages branch is a little unintuitive since the code on the gh-pages branch (a bunch of HTML & CSS files) has very little relation (in most cases) to the code on the master and other branches in the repository. ![]() Every time we update the static assets on the gh-pages branch and push to the GitHub remote repository, our project page is updated to serve the new static files. This method of building a GitHub Pages site still exists, and it's what we still use at Tidepool a. When we at Tidepool first set up our docs workflow using GitBook, there was only one way to set up GitHub Pages for a project: putting the static assets (HTML, CSS, etc.) you wanted GitHub to serve as your GitHub Pages site on a branch in your repository named gh-pages. If you need to add or update the docs in this repo or in another repo that employs GitBook for publishing documentation, follow the instructions below. We use GitHub Pages to publish the GitBook-generated static assets on the web at various paths under the base URL of our developer microsite at. GitBook is a tool for generating a static documentation website (with built-in search) from a set of Markdown files (which are handily thus natively renderable by the GitHub online interface). At Tidepool, we are using GitBook for documentation across our client-side apps and here in this repository for "no man's land" docs without a proper home in another repo.
0 Comments
Leave a Reply. |