diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..75b3d1c --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,44 @@ +on: + workflow_dispatch: + push: + branches: main + +name: Quarto Publish + +jobs: + build-deploy: + runs-on: macOS-latest + permissions: + contents: write + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install librsvg (svg for pdf) + run: brew install librsvg + + - name: Install Quarto + uses: quarto-dev/quarto-actions/setup@v2 + + - name: Install TinyTex (pdf) + uses: r-lib/actions/setup-tinytex@v2 + + - name: Install headless chromium (mmd -> img) + run: quarto install chromium + + - name: Install R + uses: r-lib/actions/setup-r@v2 + with: + r-version: '4.4.0' + + - name: Install R Dependencies + uses: r-lib/actions/setup-r-dependencies@v2 + with: + cache-version: 2 + + - name: Render and Publish + uses: quarto-dev/quarto-actions/publish@v2 + with: + target: gh-pages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 08e52d2..9709837 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ _publish.R _book _bookdown_files rsconnect +/.quarto/ +.DS_Store diff --git a/06-references.Rmd b/06-references.Rmd deleted file mode 100644 index 4e5a594..0000000 --- a/06-references.Rmd +++ /dev/null @@ -1,3 +0,0 @@ -`r if (knitr:::is_html_output()) ' -# References {-} -'` diff --git a/DESCRIPTION b/DESCRIPTION index 5c3a64d..2c99ac7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,20 @@ -Package: placeholder -Type: Book -Title: Does not matter. -Version: 0.0.1 -Imports: bookdown -Remotes: rstudio/bookdown +Package: docs +Title: Documentation for Marine Energy Toolkit +Version: 0.0.0.9000 +Authors@R: + person("Ben", "Best", , "ben@ecoquants.com", role = c("aut", "cre"), + comment = c(ORCID = "0000-0002-2686-0784")) +Description: What the package does (one paragraph). +License: MIT + file LICENSE +Encoding: UTF-8 +Roxygen: list(markdown = TRUE) +RoxygenNote: 7.3.2 +Imports: + dplyr, + glue, + here, + knitr, + librarian, + quarto, + stringr, + yaml diff --git a/_quarto.yml b/_quarto.yml new file mode 100644 index 0000000..ebfd0b4 --- /dev/null +++ b/_quarto.yml @@ -0,0 +1,54 @@ +project: + type: book + # pre-render: lib/pre-render.R + output-dir: _book + resources: + - "/.nojekyll" + +book: + title: "MEtkit Help" + subtitle: "Marine Energy Toolkit Help" + description: "Help documentation to set up, maintain, and use the Marine Energy Toolkit" + author: + - name: Benjamin D. Best + orcid: 0000-0002-2686-0784 + email: ben@ecoquants.com + affiliations: + - name: EcoQuants LLC + state: CA + date: today + date-format: "YYYY-MM-DD" + site-url: https://marineenergy.github.io/help/ + repo-url: https://github.com/marineenergy/help/ + repo-actions: [edit] + downloads: [pdf, docx] + sharing: [twitter, facebook, linkedin] + # google-analytics: "G-V3HZN14Z8G" # TODO: add Google Analytics + search: true + page-navigation: true + chapters: + - index.qmd + - sysadmins.qmd + - rtech.qmd + - community.qmd + - application.qmd + - summary.qmd + #- references.qmd + +bibliography: ["refs/book.bib", "refs/packages.bib"] +bibliographystyle: apa +link-citations: true + +format: + html: + theme: cosmo + toc: true + number-sections: true + pdf: + documentclass: scrreprt + # keep-tex: true # for debugging + docx: default + + + + diff --git a/04-application.Rmd b/application.qmd similarity index 100% rename from 04-application.Rmd rename to application.qmd diff --git a/03-community.Rmd b/community.qmd similarity index 100% rename from 03-community.Rmd rename to community.qmd diff --git a/mhk-env_help.Rproj b/help.Rproj similarity index 87% rename from mhk-env_help.Rproj rename to help.Rproj index e4c1c67..e83436a 100644 --- a/mhk-env_help.Rproj +++ b/help.Rproj @@ -9,10 +9,8 @@ UseSpacesForTab: Yes NumSpacesForTab: 2 Encoding: UTF-8 -RnwWeave: knitr +RnwWeave: Sweave LaTeX: pdfLaTeX AutoAppendNewline: Yes StripTrailingWhitespace: Yes - -BuildType: Website diff --git a/index.Rmd b/index.qmd similarity index 75% rename from index.Rmd rename to index.qmd index d011d3f..922afc4 100644 --- a/index.Rmd +++ b/index.qmd @@ -1,23 +1,11 @@ ---- -title: "A Minimal Book Example" -author: "Yihui Xie" -date: "`r Sys.Date()`" -site: bookdown::bookdown_site -output: bookdown::gitbook -documentclass: book -bibliography: [book.bib, packages.bib] -biblio-style: apalike -link-citations: yes -github-repo: rstudio/bookdown-demo -description: "This is a minimal example of using the bookdown package to write a book. The output format for this example is bookdown::gitbook." ---- -# How to use the help documentation: +# Welcome + +## How to use the help documentation: This help documentation is organized by role, including System Administrators (sysadmins), RShiny Application developers (rtech), and community users (community). Information related to corresponding workflows are located in each section of the help documentation. For information related to server setup and location please refer to the sysadmins section of the documentation. For application development methods and existing workflows to update the application please refer to the rtech section of the help. In order to understand how to contribute to the application as a part of the user community please refer to the community section of the documentation. - -# Prerequisites +## Prerequisites This is a _sample_ book written in **Markdown**. You can use anything that Pandoc's Markdown supports, e.g., a math equation $a^2 + b^2 = c^2$. diff --git a/.travis.yml b/old/.travis.yml similarity index 100% rename from .travis.yml rename to old/.travis.yml diff --git a/Dockerfile b/old/Dockerfile similarity index 100% rename from Dockerfile rename to old/Dockerfile diff --git a/_bookdown.yml b/old/_bookdown.yml similarity index 100% rename from _bookdown.yml rename to old/_bookdown.yml diff --git a/_build.sh b/old/_build.sh similarity index 100% rename from _build.sh rename to old/_build.sh diff --git a/_deploy.sh b/old/_deploy.sh similarity index 100% rename from _deploy.sh rename to old/_deploy.sh diff --git a/_output.yml b/old/_output.yml similarity index 100% rename from _output.yml rename to old/_output.yml diff --git a/bookdown-demo.log b/old/bookdown-demo.log similarity index 100% rename from bookdown-demo.log rename to old/bookdown-demo.log diff --git a/bookdown-demo.tex b/old/bookdown-demo.tex similarity index 100% rename from bookdown-demo.tex rename to old/bookdown-demo.tex diff --git a/now.json b/old/now.json similarity index 100% rename from now.json rename to old/now.json diff --git a/preamble.tex b/old/preamble.tex similarity index 100% rename from preamble.tex rename to old/preamble.tex diff --git a/style.css b/old/style.css similarity index 100% rename from style.css rename to old/style.css diff --git a/toc.css b/old/toc.css similarity index 100% rename from toc.css rename to old/toc.css diff --git a/packages.bib b/packages.bib index 38e85a0..23943e4 100644 --- a/packages.bib +++ b/packages.bib @@ -3,30 +3,32 @@ @Manual{R-base author = {{R Core Team}}, organization = {R Foundation for Statistical Computing}, address = {Vienna, Austria}, - year = {2021}, + year = {2024}, url = {https://www.R-project.org/}, } @Manual{R-bookdown, title = {bookdown: Authoring Books and Technical Documents with R Markdown}, author = {Yihui Xie}, - year = {2021}, - note = {https://github.com/rstudio/bookdown}, + year = {2024}, + note = {R package version 0.40}, + url = {https://github.com/rstudio/bookdown}, } @Manual{R-knitr, title = {knitr: A General-Purpose Package for Dynamic Report Generation in R}, author = {Yihui Xie}, - year = {2021}, - note = {R package version 1.36}, + year = {2024}, + note = {R package version 1.48}, url = {https://yihui.org/knitr/}, } @Manual{R-rmarkdown, title = {rmarkdown: Dynamic Documents for R}, - author = {JJ Allaire and Yihui Xie and Jonathan McPherson and Javier Luraschi and Kevin Ushey and Aron Atkins and Hadley Wickham and Joe Cheng and Winston Chang and Richard Iannone}, - year = {2021}, - note = {https://github.com/rstudio/rmarkdown}, + author = {JJ Allaire and Yihui Xie and Christophe Dervieux and Jonathan McPherson and Javier Luraschi and Kevin Ushey and Aron Atkins and Hadley Wickham and Joe Cheng and Winston Chang and Richard Iannone}, + year = {2024}, + note = {R package version 2.28}, + url = {https://github.com/rstudio/rmarkdown}, } @Book{bookdown2016, @@ -35,7 +37,7 @@ @Book{bookdown2016 publisher = {Chapman and Hall/CRC}, address = {Boca Raton, Florida}, year = {2016}, - note = {ISBN 978-1138700109}, + isbn = {978-1138700109}, url = {https://bookdown.org/yihui/bookdown}, } @@ -58,7 +60,6 @@ @InCollection{knitr2014 publisher = {Chapman and Hall/CRC}, year = {2014}, note = {ISBN 978-1466561595}, - url = {http://www.crcpress.com/product/isbn/9781466561595}, } @Book{rmarkdown2018, @@ -67,7 +68,7 @@ @Book{rmarkdown2018 publisher = {Chapman and Hall/CRC}, address = {Boca Raton, Florida}, year = {2018}, - note = {ISBN 9781138359338}, + isbn = {9781138359338}, url = {https://bookdown.org/yihui/rmarkdown}, } @@ -77,7 +78,7 @@ @Book{rmarkdown2020 publisher = {Chapman and Hall/CRC}, address = {Boca Raton, Florida}, year = {2020}, - note = {ISBN 9780367563837}, + isbn = {9780367563837}, url = {https://bookdown.org/yihui/rmarkdown-cookbook}, } diff --git a/references.qmd b/references.qmd new file mode 100644 index 0000000..925f7c4 --- /dev/null +++ b/references.qmd @@ -0,0 +1,4 @@ +# References {.unnumbered} + +::: {#refs} +::: diff --git a/book.bib b/refs/book.bib similarity index 100% rename from book.bib rename to refs/book.bib diff --git a/refs/packages.bib b/refs/packages.bib new file mode 100644 index 0000000..38e85a0 --- /dev/null +++ b/refs/packages.bib @@ -0,0 +1,83 @@ +@Manual{R-base, + title = {R: A Language and Environment for Statistical Computing}, + author = {{R Core Team}}, + organization = {R Foundation for Statistical Computing}, + address = {Vienna, Austria}, + year = {2021}, + url = {https://www.R-project.org/}, +} + +@Manual{R-bookdown, + title = {bookdown: Authoring Books and Technical Documents with R Markdown}, + author = {Yihui Xie}, + year = {2021}, + note = {https://github.com/rstudio/bookdown}, +} + +@Manual{R-knitr, + title = {knitr: A General-Purpose Package for Dynamic Report Generation in R}, + author = {Yihui Xie}, + year = {2021}, + note = {R package version 1.36}, + url = {https://yihui.org/knitr/}, +} + +@Manual{R-rmarkdown, + title = {rmarkdown: Dynamic Documents for R}, + author = {JJ Allaire and Yihui Xie and Jonathan McPherson and Javier Luraschi and Kevin Ushey and Aron Atkins and Hadley Wickham and Joe Cheng and Winston Chang and Richard Iannone}, + year = {2021}, + note = {https://github.com/rstudio/rmarkdown}, +} + +@Book{bookdown2016, + title = {bookdown: Authoring Books and Technical Documents with {R} Markdown}, + author = {Yihui Xie}, + publisher = {Chapman and Hall/CRC}, + address = {Boca Raton, Florida}, + year = {2016}, + note = {ISBN 978-1138700109}, + url = {https://bookdown.org/yihui/bookdown}, +} + +@Book{knitr2015, + title = {Dynamic Documents with {R} and knitr}, + author = {Yihui Xie}, + publisher = {Chapman and Hall/CRC}, + address = {Boca Raton, Florida}, + year = {2015}, + edition = {2nd}, + note = {ISBN 978-1498716963}, + url = {https://yihui.org/knitr/}, +} + +@InCollection{knitr2014, + booktitle = {Implementing Reproducible Computational Research}, + editor = {Victoria Stodden and Friedrich Leisch and Roger D. Peng}, + title = {knitr: A Comprehensive Tool for Reproducible Research in {R}}, + author = {Yihui Xie}, + publisher = {Chapman and Hall/CRC}, + year = {2014}, + note = {ISBN 978-1466561595}, + url = {http://www.crcpress.com/product/isbn/9781466561595}, +} + +@Book{rmarkdown2018, + title = {R Markdown: The Definitive Guide}, + author = {Yihui Xie and J.J. Allaire and Garrett Grolemund}, + publisher = {Chapman and Hall/CRC}, + address = {Boca Raton, Florida}, + year = {2018}, + note = {ISBN 9781138359338}, + url = {https://bookdown.org/yihui/rmarkdown}, +} + +@Book{rmarkdown2020, + title = {R Markdown Cookbook}, + author = {Yihui Xie and Christophe Dervieux and Emily Riederer}, + publisher = {Chapman and Hall/CRC}, + address = {Boca Raton, Florida}, + year = {2020}, + note = {ISBN 9780367563837}, + url = {https://bookdown.org/yihui/rmarkdown-cookbook}, +} + diff --git a/02-rtech.Rmd b/rtech.qmd similarity index 98% rename from 02-rtech.Rmd rename to rtech.qmd index ce183aa..6687c36 100644 --- a/02-rtech.Rmd +++ b/rtech.qmd @@ -2,9 +2,12 @@ ## Updating dynamic content -- [Interactions]: re-knit env.Rmd. +TODO: + +- Interactions: re-knit env.Rmd. ### Shiny App Content Updates + To render changes made to content in a Shiny app, navigate to the folder that contains the application files to run the app. Shiny apps are served from a standard folder where they are symbolically linked to source files. These folders contain the global.R, ui.R, server.R scripts that run the app. - global.R: functions used in ui.R and server.R can be defined here, sourced here from other files or in loaded libraries diff --git a/05-summary.Rmd b/summary.qmd similarity index 100% rename from 05-summary.Rmd rename to summary.qmd diff --git a/01-sysadmins.Rmd b/sysadmins.qmd similarity index 100% rename from 01-sysadmins.Rmd rename to sysadmins.qmd