git_down | R Documentation |
Read all commit messages of your local git repository and sort them according to tags or specific text pattern into chapters of a HTML book using 'bookdown'. Each chapter is a group of commits. The first page gives a summary of all the groups.
git_down( repo = ".", book_path = "gitdown", open = TRUE, author = "John Doe", pattern = c(Issues = "#[[:digit:]]+"), pattern.table = NULL, ref = "main", ... )
repo |
The path to a repository. Default is |
book_path |
The path to the bookdown output. Default is |
open |
Should the bookdown be opened once compiled? Default is TRUE. |
author |
Author of the bookdown |
pattern |
Named vector with regex pattern to expose commits, like |
pattern.table |
data.frame with two columns: pattern and description of the pattern. This is used as correspondence table to add some names to existing patterns. |
ref |
the name of the branch, by default main |
... |
Other parameters to pass to |
Path of the HTML gitbook saved in the repo/book_path directory.
repo <- fake_repo() if (rmarkdown::pandoc_available("2.0.0")) { res <- git_down(repo, pattern = c("Tickets" = "ticket[[:digit:]]+", "Issues" = "#[[:digit:]]+"), open = FALSE) } ## Not run: # Open the book browseURL(res) ## End(Not run) # With table of correspondence pattern.table <- data.frame(number = c("#2", "#1"), title = c("#2 A second issue to illustrate a blog post", "#1 An example of issue")) if (rmarkdown::pandoc_available("2.0.0")) { res <- git_down(repo, pattern = c("Issues" = "#[[:digit:]]+"), pattern.table = pattern.table, open = FALSE) } ## Not run: # Open the book browseURL(res) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.