|
| 1 | +--- |
| 2 | +format: gfm |
| 3 | +default-image-extension: '' |
| 4 | +knitr: |
| 5 | + opts_chunk: |
| 6 | + collapse: true |
| 7 | + comment: '#>' |
| 8 | + fig.path: "man/figures/README-" |
| 9 | + out.width: "100%" |
| 10 | +--- |
| 11 | + |
| 12 | +<!-- index.md is generated from index.qmd. Please edit that file --> |
| 13 | + |
| 14 | +# gitdevr <a href="https://dieghernan.github.io/gitdevr/"><img src="man/figures/logo.png" alt="gitdevr website" align="right" height="139"/></a> |
| 15 | + |
| 16 | +<!-- badges: start --> |
| 17 | + |
| 18 | +[](https://lifecycle.r-lib.org/articles/stages.html#experimental) |
| 20 | +[](https://github.com/dieghernan/gitdevr/actions/workflows/check-simple.yaml) |
| 21 | + |
| 22 | +<!-- badges: end --> |
| 23 | + |
| 24 | +## Overview |
| 25 | + |
| 26 | +**gitdevr** provides a custom [pkgdown](https://pkgdown.r-lib.org) template |
| 27 | +based on the [GitDev skin](https://dieghernan.github.io/chulapa/skins/gitdev) |
| 28 | +provided with my Jekyll theme [chulapa](https://dieghernan.github.io/chulapa/). |
| 29 | + |
| 30 | +See a preview of the template in <https://dieghernan.github.io/gitdevr/> |
| 31 | + |
| 32 | +## Installation |
| 33 | + |
| 34 | +You can install the developing version of **gitdevr** with: |
| 35 | + |
| 36 | +```{r} |
| 37 | +#| eval: false |
| 38 | +pak::pak("dieghernan/gitdevr") |
| 39 | +``` |
| 40 | + |
| 41 | +Alternatively, you can install **gitdevr** using the |
| 42 | +[r-universe](https://dieghernan.r-universe.dev/gitdevr): |
| 43 | + |
| 44 | +```{r} |
| 45 | +#| eval: false |
| 46 | +
|
| 47 | +# Install gitdevr in R: |
| 48 | +install.packages( |
| 49 | + "gitdevr", |
| 50 | + repos = c( |
| 51 | + "https://dieghernan.r-universe.dev", |
| 52 | + "https://cloud.r-project.org" |
| 53 | + ) |
| 54 | +) |
| 55 | +``` |
| 56 | + |
| 57 | +## Usage |
| 58 | + |
| 59 | +After the successful installation, if you already have your **pkgdown** setup |
| 60 | +ready, you only need to specify the `template` parameter as follow. Then, as |
| 61 | +before, you can build your site using `pkgdown::build_site()`. |
| 62 | + |
| 63 | +:::: code-with-filename |
| 64 | +::: code-with-filename-file |
| 65 | +```{=html} |
| 66 | +<pre><strong>.pkgdown.yaml</strong></pre> |
| 67 | +``` |
| 68 | + |
| 69 | +``` yaml |
| 70 | +template: |
| 71 | + bootstrap: 5 |
| 72 | + package: gitdevr |
| 73 | +``` |
| 74 | +::: |
| 75 | +:::: |
| 76 | +
|
| 77 | +```{=html} |
| 78 | +<div class="callout callout-style-default callout-important callout-titled"> |
| 79 | +<div class="callout-header d-flex align-content-center"> |
| 80 | +<div class="callout-icon-container"><i class="callout-icon"></i></div> |
| 81 | +<div class="callout-title-container flex-fill">Important</div> |
| 82 | +</div> |
| 83 | +<div class="callout-body-container callout-body"> |
| 84 | +``` |
| 85 | + |
| 86 | +Keep in mind that you should NOT use `default_assets: false` when you change |
| 87 | +the default template. **gitdevr** relies on some of the **pkgdown** assets and |
| 88 | +templates. |
| 89 | + |
| 90 | +```{=html} |
| 91 | +</div> |
| 92 | +</div> |
| 93 | +``` |
| 94 | + |
| 95 | +It is recommended to add the following line to your `DESCRIPTION`: |
| 96 | + |
| 97 | +:::: code-with-filename |
| 98 | +::: code-with-filename-file |
| 99 | +```{=html} |
| 100 | +<pre><strong>DESCRIPTION</strong></pre> |
| 101 | +``` |
| 102 | + |
| 103 | +``` |
| 104 | +Config/Needs/website: dieghernan/gitdevr |
| 105 | +``` |
| 106 | +::: |
| 107 | +:::: |
| 108 | + |
| 109 | +By doing so, when using [r-lib |
| 110 | +actions](https://github.com/r-lib/actions/tree/v2-branch/setup-r-dependencies) |
| 111 | +for deploying your site, the github action would install the package for you |
| 112 | +automatically. |
0 commit comments