Skip to content

Commit

Permalink
Switch to new altdoc (#57)
Browse files Browse the repository at this point in the history
* init

* fix path to img, fix panels

* ignore docs

* setup gha

* remove old docs

* update ci

* fix description

* fix R CMD check warning

* same

* same

* rename qmd to rmd

* vignettes in rbuildignore
  • Loading branch information
etiennebacher authored Dec 15, 2023
1 parent 0fe0d4a commit 9048fe7
Show file tree
Hide file tree
Showing 34 changed files with 130 additions and 1,008 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ _\.new\.png$
^cran-comments\.md$
^CRAN-SUBMISSION$
^CODE_OF_CONDUCT\.md$
^altdoc$
^vignettes$
52 changes: 52 additions & 0 deletions .github/workflows/altdoc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: altdoc

jobs:
altdoc:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: altdoc-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: quarto-dev/quarto-actions/setup@v2

- name: Get Script
run: curl -OLs https://eddelbuettel.github.io/r-ci/run.sh && chmod 0755 run.sh

- name: Bootstrap
run: ./run.sh bootstrap

- name: Dependencies
run: ./run.sh install_all

- name: Build site
run: |
install.packages(".", repos = NULL, type = "source")
install.packages("pkgload")
pkgload::load_all()
altdoc::render_docs(freeze = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
node_modules
# {shinytest2}: Ignore new debug snapshots for `$expect_values()`
*_.new.png
docs
3 changes: 3 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ Imports:
R6,
shiny
Suggests:
altdoc,
shinytest2,
testthat
Remotes:
etiennebacher/altdoc
RoxygenNote: 7.2.1
URL: https://github.com/etiennebacher/conductor
BugReports: https://github.com/etiennebacher/conductor/issues
Expand Down
Empty file added altdoc/.nojekyll
Empty file.
12 changes: 4 additions & 8 deletions docs/index.html → altdoc/docsify.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@
<div id="app"></div>
<script>
window.$docsify = {
name: 'conductor',
repo: 'https://github.com/etiennebacher/conductor',
logo: 'README_assets/hex-conductor.png',
name: '$ALTDOC_PACKAGE_NAME',
repo: '$ALTDOC_PACKAGE_URL_GITHUB',
loadSidebar: true,
subMaxLevel: 2,
search: {
Expand All @@ -53,7 +52,6 @@
successText: 'Copied'
},
plugins: [

function(hook, vm) {
hook.beforeEach(function (html) {
var url = 'https://github.com/etiennebacher/conductor/blob/master/docs' + vm.router.getFile()
Expand All @@ -64,9 +62,8 @@
+ editHtml
})
},

function(hook) {
var footer = ["<hr/><a href='https://github.com/etiennebacher/conductor'> <code>conductor</code> v. 0.1.1 </a> | Documentation made with <a href='https://github.com/etiennebacher/altdoc'> <code>altdoc</code> v. 0.1.0.9000</a>"].join('');
var footer = ["<a href='$ALTDOC_PACKAGE_URL'> <code> $ALTDOC_PACKAGE_NAME </code> v. $ALTDOC_PACKAGE_VERSION </a> | Documentation made with <a href='https://altdoc.etiennebacher.com/'> <code> altdoc </code> v. $ALTDOC_VERSION</a>"].join('');

hook.afterEach(function(html) {
return html + footer;
Expand All @@ -75,7 +72,7 @@
]
}
</script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code"></script>
<script src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-r.js"></script>
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
Expand All @@ -84,4 +81,3 @@
<script src="https://cdn.jsdelivr.net/npm/docsify-tabs@1"></script>
</body>
</html>

22 changes: 22 additions & 0 deletions altdoc/docsify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
* [Home](/)

* Get started
* [Your first tour](vignettes/first-tour.md)
* [Basic options](vignettes/basic-options.md)
* [Customize the tour](vignettes/customize.md)

* Advanced
* [Navbar & tabs](vignettes/navbar-tabs.md)
* [Use in modules](vignettes/use-modules.md)
* [JavaScript functions](vignettes/javascript.md)
* [Methods](vignettes/methods.md)

* Misc
* [Buttons](vignettes/buttons.md)
* [HTML formatting](vignettes/html-formatting.md)

* Reference: $ALTDOC_MAN_BLOCK

* [Changelog]($ALTDOC_NEWS)
* [Code of Conduct]($ALTDOC_CODE_OF_CONDUCT)
* [License]($ALTDOC_LICENSE)
Binary file added altdoc/freeze.rds
Binary file not shown.
126 changes: 0 additions & 126 deletions docs/CODE_OF_CONDUCT.md

This file was deleted.

21 changes: 0 additions & 21 deletions docs/LICENSE.md

This file was deleted.

16 changes: 0 additions & 16 deletions docs/NEWS.md

This file was deleted.

85 changes: 0 additions & 85 deletions docs/README.md

This file was deleted.

Loading

0 comments on commit 9048fe7

Please sign in to comment.