From 83b4d4ebcae8241df78cfa49627875e8d0617769 Mon Sep 17 00:00:00 2001 From: Hugo Gruson <10783929+Bisaloo@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:05:54 +0200 Subject: [PATCH 1/7] Add dark theme switch --- inst/pkgdown/_pkgdown.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/inst/pkgdown/_pkgdown.yml b/inst/pkgdown/_pkgdown.yml index 09960e3..ed18063 100644 --- a/inst/pkgdown/_pkgdown.yml +++ b/inst/pkgdown/_pkgdown.yml @@ -16,6 +16,7 @@ template: base_font: "DM Sans" code_font: "Roboto Mono" danger: "#F04A4C" + light-switch: true navbar: bg: dark From 9e8896bd6c0d3337bf2115e5296403241ef61f19 Mon Sep 17 00:00:00 2001 From: Hugo Gruson <10783929+Bisaloo@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:06:35 +0200 Subject: [PATCH 2/7] Apply navbar background to light and dark themes --- inst/pkgdown/extra.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/pkgdown/extra.scss b/inst/pkgdown/extra.scss index bfd7e1a..e3151b2 100644 --- a/inst/pkgdown/extra.scss +++ b/inst/pkgdown/extra.scss @@ -1,7 +1,7 @@ @import 'https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,700&family=Roboto+Mono&display=swap'; -.bg-dark { - background-color: #071E2D !important; +.navbar { + background-color: #071E2D; } .navbar-nav .nav-item > .nav-link, .navbar-brand, .navbar-brand:hover, .navbar-brand:focus { From ce05a159cda24a62da15f0cc106e47e9feb86e05 Mon Sep 17 00:00:00 2001 From: Hugo Gruson <10783929+Bisaloo@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:10:51 +0200 Subject: [PATCH 3/7] Remove unnecessary navbar.bg setting --- inst/pkgdown/_pkgdown.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/inst/pkgdown/_pkgdown.yml b/inst/pkgdown/_pkgdown.yml index ed18063..842ece0 100644 --- a/inst/pkgdown/_pkgdown.yml +++ b/inst/pkgdown/_pkgdown.yml @@ -18,9 +18,6 @@ template: danger: "#F04A4C" light-switch: true -navbar: - bg: dark - figures: # fig.retina: 1 # required by the showtext package fig.width: 8 From e14d873f1522bef1682d316cc0236f53f402bfb2 Mon Sep 17 00:00:00 2001 From: Hugo Gruson <10783929+Bisaloo@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:32:33 +0200 Subject: [PATCH 4/7] Remove unused css --- inst/pkgdown/extra.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/inst/pkgdown/extra.scss b/inst/pkgdown/extra.scss index e3151b2..f7c7594 100644 --- a/inst/pkgdown/extra.scss +++ b/inst/pkgdown/extra.scss @@ -17,10 +17,6 @@ color: #555; } -.version-number { - color: #888 !important; -} - .navbar > .container { align-items: center; -webkit-align-items: center; From 115bdad3d40df7d489cdbc3752495373d464a8ef Mon Sep 17 00:00:00 2001 From: Hugo Gruson <10783929+Bisaloo@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:32:21 +0200 Subject: [PATCH 5/7] Render pkgdown from dev branch --- .github/workflows/pkgdown.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 0b5cf48..2428f9f 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -2,9 +2,9 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: main + branches: [main, dev] pull_request: - branches: main + branches: [main, dev] release: types: [published] workflow_dispatch: @@ -40,9 +40,18 @@ jobs: shell: Rscript {0} - name: Deploy to GitHub pages 🚀 - if: github.event_name != 'pull_request' + if: github.event_name != 'pull_request' && github.ref_name == 'main' uses: JamesIves/github-pages-deploy-action@v4.4.1 with: clean: false branch: gh-pages folder: docs + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' && github.ref_name == 'dev' + uses: JamesIves/github-pages-deploy-action@v4.4.1 + with: + clean: false + branch: gh-pages + folder: docs + target-folder: dev From 51ba045ca83c1693d82a33a08c579e7613c41bc7 Mon Sep 17 00:00:00 2001 From: Hugo Gruson <10783929+Bisaloo@users.noreply.github.com> Date: Wed, 5 Jun 2024 16:01:50 +0200 Subject: [PATCH 6/7] Fix version number contrast --- inst/pkgdown/extra.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inst/pkgdown/extra.scss b/inst/pkgdown/extra.scss index f7c7594..d489d33 100644 --- a/inst/pkgdown/extra.scss +++ b/inst/pkgdown/extra.scss @@ -17,6 +17,11 @@ color: #555; } +// Version number colour for releases +.nav-text.text-muted { + color: #888 !important; +} + .navbar > .container { align-items: center; -webkit-align-items: center; From 1c20330cba5db86afe191241a0aeeb81fb68582b Mon Sep 17 00:00:00 2001 From: Hugo Gruson <10783929+Bisaloo@users.noreply.github.com> Date: Mon, 8 Jul 2024 10:29:57 +0200 Subject: [PATCH 7/7] Add dependency on pkgdown 2.1.0 --- DESCRIPTION | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DESCRIPTION b/DESCRIPTION index bab2255..68a9774 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -5,6 +5,8 @@ Authors@R: person("Hugo", "Gruson", , "hugo.gruson+R@normalesup.org", role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0002-4094-1476")) Description: What the package does (one paragraph). +Imports: + pkgdown (>= 2.1.0) License: MIT Config/testthat/edition: 3 Encoding: UTF-8