Skip to content

Commit

Permalink
Merge pull request #17 from Appsilon/add-documentation-page
Browse files Browse the repository at this point in the history
Add documentation page
  • Loading branch information
jakubnowicki authored Sep 3, 2024
2 parents 3564b90 + c36e673 commit fd1d5cd
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 0 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
^\.lintr$
.log
^cran-comments\.md$
^pkgdown$
35 changes: 35 additions & 0 deletions .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
72 changes: 72 additions & 0 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
@@ -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: |
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-5NSVSJKPW2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-5NSVSJKPW2');
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-FQQZL5V93G"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-FQQZL5V93G');
</script>
<script async defer src="https://buttons.github.io/buttons.js"></script>
before_navbar: |
<a href="https://rhinoverse.dev" class="home"><i class="fa fa-lg fa-chevron-left"></i></a>
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: |
<a class="github-button" href="https://github.com/appsilon/box.lsp" data-size="large" data-show-count="true" aria-label="Star appsilon/box.lsp on GitHub">Star</a>
footer:
structure:
left: developed
components:
developed: "Developed with :heart: by [Appsilon](https://www.appsilon.com)."
51 changes: 51 additions & 0 deletions pkgdown/extra.css
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit fd1d5cd

Please sign in to comment.