package b0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0
doc/b0.std/B0_github/Pages/index.html
Module B0_github.PagesSource
Publish to GitHub pages.
Updating GitHub pages
The type for updates.
update ~follow_symlinks src ~dst is an update that given a relative path dst in the work tree that may not exist:
- If
srcisNone, deletesdstin the work tree. - If
srcisSome srcreplacesdstin the work tree by the contents of the file or file hierarchysrc. Iffollow_symlinksistrue(default) symbolic links are followed insrc.
Use . for dst to denote the root of the work tree; for example update ~src:(Some dir) (Fpath.v ".") replaces the whole website by the file hierarchy rooted at dir.
nojekyll is update ~src:(Some Os.File.null) (Fpath.v ".nojekyll"). Add this to the updtaes to prevent the Jekyll processing that is automatically performed on GitHub pages.
default_branch is "gh-pages", GitHub's default publication branch for GitHub pages.
val commit_updates :
?log:B0_std.Log.level ->
?branch:B0_vcs_repo.Git.branch ->
B0_vcs_repo.t ->
amend:bool ->
force:bool ->
remote:B0_vcs_repo.Git.remote ->
msg:string ->
update list ->
(bool, string) resultcommit_updates vcs ~log ~remote ~branch ~msg us updates branch (defaults to gh-pages) on remote according to updates us with commit message msg. Ok false is returned if there was nothing to update.
- If
amendistrue, the last commit is amended (if any exists) and the author reset rather than a new commit added - If
forceistrue, the various git operations are forced. logindicates a logging level used to monitor progress (defaults toB0_std.Log.app).
More precisely this:
- Fetches
remote/branchif it exists. - Creates a transient checkout with a temporary workdir in
B0_std.Os.Dir.default_tmpand a branch called_b0-update-gh-pagesreset toremote/branch. - Commits changes with message
msgaccording touswhich are applied in order, seeupdate. - Destroys the transient checkout
- Pushes
_b0-update-gh-pagesonremote/branch - Destroys the branch
_b0-update-gh-pages
Warning. If you have paths that start with _ GitHub pages won't publish them. You can disable this by adding a .nojekyll file at the root the gh-page branch, see nojekyll.