EVOLUTION-MANAGER
Edit File: use_github_pages.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Configure a GitHub Pages site</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for use_github_pages {usethis}"><tr><td>use_github_pages {usethis}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Configure a GitHub Pages site</h2> <h3>Description</h3> <p>Activates or reconfigures a GitHub Pages site for a project hosted on GitHub. This function anticipates two specific usage modes: </p> <ul> <li><p> Publish from the root directory of a <code>gh-pages</code> branch, which is assumed to be only (or at least primarily) a remote branch. Typically the <code>gh-pages</code> branch is managed by an automatic "build and deploy" job, such as the one configured by <code><a href="github_actions.html">use_github_action("pkgdown")</a></code>. </p> </li> <li><p> Publish from the <code>"/docs"</code> directory of a "regular" branch, probably the repo's default branch. The user is assumed to have a plan for how they will manage the content below <code>"/docs"</code>. </p> </li></ul> <h3>Usage</h3> <pre> use_github_pages(branch = "gh-pages", path = "/", cname = NA) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>branch, path</code></td> <td> <p>Branch and path for the site source. The default of <code>branch = "gh-pages"</code> and <code>path = "/"</code> reflects strong GitHub support for this configuration: when a <code>gh-pages</code> branch is first created, it is <em>automatically</em> published to Pages, using the source found in <code>"/"</code>. If a <code>gh-pages</code> branch does not yet exist on the host, <code>use_github_pages()</code> creates an empty, orphan remote branch. </p> <p>The most common alternative is to use the repo's default branch, coupled with <code>path = "/docs"</code>. It is the user's responsibility to ensure that this <code>branch</code> pre-exists on the host. </p> <p>Note that GitHub does not support an arbitrary <code>path</code> and, at the time of writing, only <code>"/"</code> or <code>"/docs"</code> are accepted.</p> </td></tr> <tr valign="top"><td><code>cname</code></td> <td> <p>Optional, custom domain name. The <code>NA</code> default means "don't set or change this", whereas a value of <code>NULL</code> removes any previously configured custom domain. </p> <p>Note that this <em>can</em> add or modify a CNAME file in your repository. If you are using Pages to host a pkgdown site, it is better to specify its URL in the pkgdown config file and let pkgdown manage CNAME.</p> </td></tr> </table> <h3>Value</h3> <p>Site metadata returned by the GitHub API, invisibly </p> <h3>See Also</h3> <ul> <li> <p><code><a href="use_pkgdown.html">use_pkgdown_github_pages()</a></code> combines <code>use_github_pages()</code> with other functions to fully configure a pkgdown site </p> </li> <li> <p><a href="https://docs.github.com/en/pages">https://docs.github.com/en/pages</a> </p> </li> <li> <p><a href="https://docs.github.com/en/rest/pages">https://docs.github.com/en/rest/pages</a> </p> </li></ul> <h3>Examples</h3> <pre> ## Not run: use_github_pages() use_github_pages(branch = git_default_branch(), path = "/docs") ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>usethis</em> version 2.1.6 <a href="00Index.html">Index</a>]</div> </body></html>