From 5ea13b74425226cfd8d7eacadf7c1a408eded716 Mon Sep 17 00:00:00 2001 From: Jakub Nowicki Date: Tue, 3 Sep 2024 11:38:37 +0200 Subject: [PATCH 1/3] chore: Add documentation page configuration. --- pkgdown/_pkgdown.yml | 72 ++++++++++++++++++++++++++++++++++++++++++++ pkgdown/extra.css | 51 +++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 pkgdown/_pkgdown.yml create mode 100644 pkgdown/extra.css diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml new file mode 100644 index 0000000..eadae55 --- /dev/null +++ b/pkgdown/_pkgdown.yml @@ -0,0 +1,72 @@ +title: box.lsp +template: + bootstrap: 5 + bootswatch: pulse + bslib: + primary: "#4AB76C" + secondary-color: "#f00" + pkgdown-nav-height: 100px + includes: + in_header: | + + + + + + + + before_navbar: | + + +url: https://appsilon.github.io/box.lsp/ + +navbar: + type: light + bg: primary + fg: "#262323" + structure: + left: [reference, changelog] + right: [search, github, twitter, mastodon] + components: + reference: + icon: fa-file-code-o + text: "Reference" + href: reference/index.html + changelog: + icon: fa-newspaper-o + text: "Changelog" + href: news/index.html + github: + icon: fa-github fa-lg + href: https://github.com/Appsilon/box.lsp + twitter: + icon: fa-twitter fa-lg + href: https://twitter.com/Appsilon + mastodon: + icon: fab fa-mastodon fa-lg + href: https://fosstodon.org/@appsilon + +home: + sidebar: + structure: [star, links, license, community, citation, authors, dev] + components: + star: + title: GitHub + text: | + Star + +footer: + structure: + left: developed + components: + developed: "Developed with :heart: by [Appsilon](https://www.appsilon.com)." diff --git a/pkgdown/extra.css b/pkgdown/extra.css new file mode 100644 index 0000000..9620514 --- /dev/null +++ b/pkgdown/extra.css @@ -0,0 +1,51 @@ +:root { + --primary-color: #4AB76C; + --bslib-color-bg: #4AB76C; + --navbar-color: #262323; +} + +.navbar-dark input[type="search"] { + background-color: #fff; + color: #444; +} + +.navbar-light .navbar-nav .active > .nav-link { + background-color: var(--primary-color); + color: var(--bs-navbar-brand-color); +} + +.nav-link::after { + color: var(--bs-secondary-color); +} + +.nav-link:hover::after, .nav-link:focus::after, .nav-link:active::after { + color: var(--navbar-color); +} + +nav .text-muted { + --bs-secondary-color: var(--navbar-color); +} + +a { + color: var(--primary-color); +} + +a:hover { + color: var(--navbar-color); +} + +button.btn.btn-primary.btn-copy-ex { + background-color: var(--primary-color); + border-color: var(--primary-color); +} + +.home { + left: 0px; + position: absolute; + padding: 8px 30px; + color: rgba(255,255,255,0.55); +} + +.home:hover { + color: rgba(255,255,255,0.9); +} From 82bc2fd0e4ca70c24e62c3a8a6445832a71e03c5 Mon Sep 17 00:00:00 2001 From: Jakub Nowicki Date: Tue, 3 Sep 2024 11:38:53 +0200 Subject: [PATCH 2/3] ci: pkgdown workflow --- .github/workflows/pkgdown.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/pkgdown.yml diff --git a/.github/workflows/pkgdown.yml b/.github/workflows/pkgdown.yml new file mode 100644 index 0000000..6f2dba5 --- /dev/null +++ b/.github/workflows/pkgdown.yml @@ -0,0 +1,35 @@ +--- + # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples + # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help + on: + push: + branches: + - main + workflow_dispatch: + + name: pkgdown + + jobs: + pkgdown: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Deploy to gh-pages branch + run: | + git config --local user.name "$GITHUB_ACTOR" + git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" + Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' From c36e673c3a4abb7c6fd63693a14a0f26f397ac41 Mon Sep 17 00:00:00 2001 From: Jakub Nowicki Date: Tue, 3 Sep 2024 11:59:41 +0200 Subject: [PATCH 3/3] chore: Add pkgdown to Rbuildignore. --- .Rbuildignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.Rbuildignore b/.Rbuildignore index 2a7e679..b84f9b3 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -5,3 +5,4 @@ ^\.lintr$ .log ^cran-comments\.md$ +^pkgdown$