diff --git a/.github/workflows/render-quarto.yml b/.github/workflows/render-quarto.yml index abe886f..faa7927 100644 --- a/.github/workflows/render-quarto.yml +++ b/.github/workflows/render-quarto.yml @@ -15,13 +15,13 @@ jobs: - name: Set up Quarto uses: quarto-dev/quarto-actions/setup@v2 - with: - version: 1.6.37 + # with: + # version: 1.6.37 - name: Install R uses: r-lib/actions/setup-r@v2 - with: - r-version: '4.2.0' + # with: + # r-version: '4.2.0' - uses: r-lib/actions/setup-r-dependencies@v2 with: @@ -29,16 +29,6 @@ jobs: any::knitr any::rmarkdown - # - name: Render Quarto Project - # uses: quarto-dev/quarto-actions/render@v2 - - # - name: Deploy to GitHub Pages - # uses: peaceiris/actions-gh-pages@v3 - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # publish_dir: ./docs - # publish_branch: gh-pages - - name: Render and Publish uses: quarto-dev/quarto-actions/publish@v2 with: diff --git a/.gitignore b/.gitignore index 9ea0fb2..92d902f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ /.quarto/ -docs/ \ No newline at end of file +_site/ \ No newline at end of file diff --git a/README.md b/README.md index 7fc097c..1a630e8 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,5 @@ - +Quarto enables you to weave together content and executable code into a finished presentation. To learn more about Quarto presentations see . -# RSE-Repository-Template -This is a template repository to be used as the base for all new repos created for RSE projects. It comes with a set of default issues types and settings to ensure a standardised setup compliant with the department process. - -# Immediate Set Up -The following steps will need to be performed immediately after creating the new repository to complete the set up. - -## Branch Protection Ruleset -The first thing to do after creating your new repository from this template is to head to `Settings -> Rules -> Rulesets` then choose `Import Ruleset`. You will then need to import the `Key Branch Protection Rules.json` ruleset which is located in the RSE Team SharePoint under [`RSE Team -> Read-Only -> Tools`](https://livemanchesterac.sharepoint.com/sites/UOM-ITS-Research-IT/_layouts/15/download.aspx?UniqueId=b55bbc9bc39b4be29dafaa09b9359b48&e=B6kYNZ). - -**This ruleset is designed to enforce a GitFlow development process as per the department policy. Please do not relax or disable these rules unless exceptional circumstances dictate it e.g. if an existing CI integration requires a rule to be relaxed.** - -## Licensing and Copyright -Our team policy on software licensing and copyright can be found in the `RSE_Department_Ops_Policies.pdf` document, located in the RSE Team SharePoint under [`RSE Team -> Read-Only -> Policies and Processes`](https://livemanchesterac.sharepoint.com/:b:/r/sites/UOM-ITS-Research-IT/Shared%20Documents/RSE%20Team/Read-Only/Policies%20and%20Processes/RSE_Department_Ops_Policies.pdf). This policy is summarised below for convenience. If any discrepancies between the two arise then the policy document takes precedence over this readme file. - -The default licence for an RSE project is the [Apache v2.0](http://www.apache.org/licenses/LICENSE-2.0) licence, a copy of which is provided in the file LICENSE. The customers licensing preference should have been gathered during the requirement gathering stage of the project; ask your project manager if this differs from the default. - -Unless the project owners have made other agreements, the copyright of all works belongs to the University of Manchester. Check with your project manager to ensure that this is the case. Guidance on copyright issues are available from the [University of Manchester library](https://subjects.library.manchester.ac.uk/copyright/research). - -To state the copyright, and use the Apache v2.0 licence, you should include the following text as a comment at the head of every source file you write: -``` - SPDX-FileCopyrightText: [yyyy] University of Manchester - - SPDX-License-Identifier: apache-2.0 -``` -Replace `[yyyy]` with the year that the code was first written. The License Identifiers that are supported can be found in the [SPDX License Documentation](https://spdx.dev/learn/handling-license-info/). - -In files which do not support the addition of comments (such as binary files), this can instead be included in an additional file adjacent to the original file with the same name followed by a .license extension, and containing just the lines above (e.g. a file called cat.jpg would have a licence file cat.jpg.license). - -Note that there is a github action in this repository that will check that all files have the above annotations or .license file associated with them. If this fails, an additional branch will be created which can be merged into the changes that you have committed. A link will appear in the outputs of the GitHub actions task that will allow you to create a PR and merge this into your branch to allow the test to pass. This link will also be added as a commit comment, which will be e-mailed to you if you have GitHub set up to send you notifications in this way. You should check the details of the suggested changes carefully to ensure it has done the right thing; any corrections can be made before merging, or can be done manually in the original branch if preferred. - -If the licence and/or copyright differs from the default, the action will have to be updated to reflect this. Please edit the reuse-action in .github/workflows/license-copyright-add.yml to fix it, using the appropriate identifier from the [SPDX License List](https://spdx.org/licenses/). - -# Suggest Improvements -Please feel free to suggest improvements to this template by adding issues to [the repository](https://github.com/UoMResearchIT/RSE-Repository-Template/issues). +The repo is `R` - specific only in that it installs `R`, `rmarkdown` and `knitr` as part of the automated build action: `.github/workflows/render-quarto.yml`. \ No newline at end of file diff --git a/_quarto.yml b/_quarto.yml index d265e51..f6f921c 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -1,2 +1,2 @@ project: - output-dir: docs \ No newline at end of file + output-dir: _site \ No newline at end of file diff --git a/custom.scss b/custom.scss new file mode 100755 index 0000000..b5a5025 --- /dev/null +++ b/custom.scss @@ -0,0 +1,22 @@ +/*-- scss:defaults --*/ +$presentation-font-size-root: 28px; +$presentation-h2-font-size: 1.4em; +$code-block-font-size: 0.8em; + +/*-- scss:rules --*/ +.reveal li { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.reveal h4 { + margin: 0.8em 0 0.2em 0; +} + +div.code-with-filename { + margin: 1em 0 1em 0; +} + +div.cell-output { + margin: 0 0 1em 0; +} \ No newline at end of file diff --git a/slides.qmd b/slides.qmd new file mode 100644 index 0000000..2d967a1 --- /dev/null +++ b/slides.qmd @@ -0,0 +1,47 @@ +--- +title: "R-Markdown Flavored Slides" +subtitle: "Powered by Quarto + Reveal.js" +institute: "ResearchIT, University of Manchester" +author: Martin Herrerias Azcue +date: 2024-11-28 +format: + revealjs: + theme: custom.scss + scrollable: true +# filters: +# - include-code-files +# eval: false +--- + +## Quarto + +Quarto enables you to weave together content and executable code into a finished presentation. To learn more about Quarto presentations see . + +## Bullets + +When you click the **Render** button a document will be generated that includes: + +- Content authored with markdown +- Output from executable code + +## Code + +When you click the **Render** button a presentation will be generated that includes both content and the output of embedded code. You can embed code like this: + +```{r} +1 + 1 +``` + +## Fancier Code Blocks + +```{r, filename='fake_script.R'} +#| echo: true +#| eval: false +#| code-line-numbers: true + +# Multiply two numbers +multiply <- function(a, b) { + return(a * b) +} +multiply(a = 6, b = 7) +``` diff --git a/test.qmd b/test.qmd deleted file mode 100644 index f25a54f..0000000 --- a/test.qmd +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "Quarto + reveal.js" -format: - revealjs ---- - -```{r} -#| eval: true -#| echo: false -# R code that should NOT be printed -``` - -## First slide - -Quarto is nice. - -## Second slide - -Reveal.js is nice. - -## Third slide - -Until they do weird stuff. \ No newline at end of file