diff --git a/.Rbuildignore b/.Rbuildignore
index b64f766b..14388159 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -12,6 +12,6 @@
^CRAN-SUBMISSION$
^docs$
^altdoc$
-^vignettes$
^.lintr$
-man-roxygen
\ No newline at end of file
+man-roxygen
+^inst/NEWS\.Rd$
diff --git a/DESCRIPTION b/DESCRIPTION
index c3390183..0ca9093a 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
Type: Package
Package: altdoc
Title: Package Documentation Websites with 'Quarto', 'Docsify', 'Docute', or 'MkDocs'
-Version: 0.2.2.9014
+Version: 0.3.0
Authors@R:
c(person(given = "Etienne",
family = "Bacher",
@@ -13,7 +13,10 @@ Authors@R:
email = "vincent.arel-bundock@umontreal.ca",
comment = c(ORCID = "0000-0003-2042-7063"))
)
-Description: 'altdoc' is a simple and powerful package to create, render, preview, and deploy documentation websites for 'R' packages. It is a lightweight and flexible alternative to 'pkgdown', with support for many documentation generators, including 'Quarto', 'Docute', 'Docsify', and 'MkDocs'.
+Description: This is a simple and powerful package to create, render, preview,
+ and deploy documentation websites for 'R' packages. It is a lightweight and
+ flexible alternative to 'pkgdown', with support for many documentation
+ generators, including 'Quarto', 'Docute', 'Docsify', and 'MkDocs'.
License: MIT + file LICENSE
URL: https://altdoc.etiennebacher.com, https://github.com/etiennebacher/altdoc
BugReports: https://github.com/etiennebacher/altdoc/issues
@@ -40,6 +43,6 @@ Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
-RoxygenNote: 7.2.3.9000
+RoxygenNote: 7.3.1
Language: en-US
VignetteBuilder: knitr
diff --git a/NEWS.md b/NEWS.md
index 1e5453b9..c277e1fe 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,37 +1,67 @@
# News
-## (development version)
+## 0.3.0
-Breaking changes:
+All functions have changed so any change listed below technically is a breaking
+change.
+
+### Breaking changes
* Functions renamed:
- `use_docute()`, `use_docsify()` and `use_mkdocs()` are combined into `setup_docs()`
- `update_docs()` -> `render_docs()`
- `preview()` -> `preview_docs()`
-* `setup_docs()` (previously `use_*()`) no longer updates and previews the website by default.
-* `custom_reference` argument is removed. See the `Post-processing` vignette for a description of the new proposed workflow.
-* `theme` argument is removed. Users can change themes by editing settings files in `altdoc/`
+
+* `setup_docs()` (previously `use_*()`) no longer updates and previews the website
+ by default.
+* `custom_reference` argument is removed. See the `Post-processing` vignette for
+ a description of the new proposed workflow.
+* `theme` argument is removed. Users can change themes by editing settings files
+ in `altdoc/`
* `mkdocs` documentation is no longer stored in `docs/docs/`
-New:
+### New features
* Support Quarto websites as a documentation format.
+
* Support Quarto vignettes (.qmd) in the `vignettes/` folder.
-* `render_docs(parallel=TRUE)` uses `future` to parallelize the rendering of vignettes and man pages.
-* `render_docs(freeze = TRUE)` no longer renders vignettes or man pages when they have not changed and are already stored in `docs/`.
+
+* `render_docs(parallel = TRUE)` uses `future` to parallelize the rendering of
+ vignettes and man pages.
+
+* `render_docs(freeze = TRUE)` no longer renders vignettes or man pages when they
+ have not changed and are already stored in `docs/`.
+
* Link to source code at the top of function reference.
-* Settings files are now permanently stored in the `altdoc/` directory. These files can be edited manually to customize the website.
-* Major internal changes to the .Rd -> .md conversion system. We now use Quarto to convert man pages and execute examples, and the man pages are stored in separate markdown files instead of combined in a single large file.
-* `mkdocs` now behaves like the other documentation generators and stores its files in `docs/`. This means that `mkdocs` websites can be deployed to Github Pages.
+
+* Settings files are now permanently stored in the `altdoc/` directory. These
+ files can be edited manually to customize the website.
+
+* Major internal changes to the .Rd -> .md conversion system. We now use Quarto
+ to convert man pages and execute examples, and the man pages are stored in
+ separate markdown files instead of combined in a single large file.
+
+* `mkdocs` now behaves like the other documentation generators and stores its
+ files in `docs/`. This means that `mkdocs` websites can be deployed to Github
+ Pages.
+
* Improved vignettes
-* Do not reformat markdown header levels automatically, but raise a warning when there is more than one level 1 header.
+
+* Do not reformat markdown header levels automatically, but raise a warning when
+ there is more than one level 1 header.
+
* Fewer dependencies.
* Fix parsing for issue/PR references like [org/repo#111].
+
* Changelog and News sections can be present simultaneously.
+
* Support for `NEWS.Rd`, either in the root folder or in `inst/`
+
* Automatically create a Github Actions workflow with `setup_github_actions()`.
+
* Skip .Rd files when they document internal functions.
+
## 0.2.2
* If necessary, two spaces are automatically added in nested lists in the `NEWS`
diff --git a/README.md b/README.md
index 48ed4b7b..e068fee1 100644
--- a/README.md
+++ b/README.md
@@ -65,8 +65,9 @@ render_docs()
preview_docs()
```
-See [the Get Started vignette](vignettes/get-started.md) for more
-details.
+See [the Get Started
+vignette](https://altdoc.etiennebacher.com/#/vignettes/get-started.md)
+for more details.
## Demos
@@ -154,10 +155,10 @@ Docsify
plot2
-🌐grantmcdermott.com/plot2
+🌐grantmcdermott.com/tinyplot
|
-Altdoc
+Altdoc
Settings
|
@@ -184,7 +185,7 @@ Docsify
countrycode
-🌐vincentarelbundock.github.io/countrycode
+🌐vincentarelbundock.github.io/countrycode
|
Altdoc
@@ -199,7 +200,7 @@ Docsify
WDI
|
-🌐vincentarelbundock.github.io/WDI
+🌐vincentarelbundock.github.io/WDI
|
Altdoc
diff --git a/README.qmd b/README.qmd
index d06454f2..94be1b99 100755
--- a/README.qmd
+++ b/README.qmd
@@ -64,7 +64,8 @@ render_docs()
preview_docs()
```
-See [the Get Started vignette](vignettes/get-started.md) for more details.
+See [the Get Started vignette](https://altdoc.etiennebacher.com/#/vignettes/get-started.md)
+for more details.
## Demos
@@ -104,8 +105,8 @@ The websites in this table were created using Altdoc:
Docsify |
plot2 |
- 🌐grantmcdermott.com/plot2 |
- Altdoc Settings |
+ 🌐grantmcdermott.com/tinyplot |
+ Altdoc Settings |
Docsify |
@@ -116,13 +117,13 @@ The websites in this table were created using Altdoc:
Docsify |
countrycode |
- 🌐vincentarelbundock.github.io/countrycode |
+ 🌐vincentarelbundock.github.io/countrycode |
Altdoc Settings |
Docsify |
WDI |
- 🌐vincentarelbundock.github.io/WDI |
+ 🌐vincentarelbundock.github.io/WDI |
Altdoc Settings |
diff --git a/cran-comments.md b/cran-comments.md
index fdd4fa8c..6ec9ece0 100644
--- a/cran-comments.md
+++ b/cran-comments.md
@@ -2,5 +2,5 @@
0 errors | 0 warnings | 0 note
-
-Resubmission to fix test failures on CRAN due to the new version of `usethis`.
+This is the second submission of altdoc 0.3.0 (first one was an hour ago). I
+corrected the NOTEs reported.
diff --git a/inst/WORDLIST b/inst/WORDLIST
index 4bd649f7..b7c79f0f 100644
--- a/inst/WORDLIST
+++ b/inst/WORDLIST
@@ -30,3 +30,4 @@ Rmarkdown
Rmd
RStudio
yaml
+venv
diff --git a/tests/testthat/_snaps/docsify/render_docs.md b/tests/testthat/_snaps/docsify/render_docs.md
index 6824ffaf..23552f98 100644
--- a/tests/testthat/_snaps/docsify/render_docs.md
+++ b/tests/testthat/_snaps/docsify/render_docs.md
@@ -4,41 +4,42 @@
.readlines("docs/README.md")
Output
[1] ""
- [2] ""
- [3] ""
- [4] "# testpkg.altdoc"
- [5] ""
- [6] ""
- [7] ""
- [8] "[![R-universe status"
- [9] "badge](https://grantmcdermott.r-universe.dev/badges/plot2)](https://grantmcdermott.r-universe.dev)"
- [10] ""
- [11] ""
- [12] "The goal of testpkg.altdoc is to …"
- [13] ""
- [14] "## Installation"
- [15] ""
- [16] "You can install the development version of testpkg.altdoc like so:"
- [17] ""
- [18] "``` r"
- [19] "# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?"
- [20] "```"
- [21] ""
- [22] "## Example"
- [23] ""
- [24] "This is a basic example which shows you how to solve a common problem:"
- [25] ""
- [26] "``` r"
- [27] "library(testpkg.altdoc)"
- [28] "summary(cars)"
- [29] "#> speed dist "
- [30] "#> Min. : 4.0 Min. : 2.00 "
- [31] "#> 1st Qu.:12.0 1st Qu.: 26.00 "
- [32] "#> Median :15.0 Median : 36.00 "
- [33] "#> Mean :15.4 Mean : 42.98 "
- [34] "#> 3rd Qu.:19.0 3rd Qu.: 56.00 "
- [35] "#> Max. :25.0 Max. :120.00"
- [36] "```"
+ [2] ""
+ [3] ""
+ [4] ""
+ [5] "# testpkg.altdoc"
+ [6] ""
+ [7] ""
+ [8] ""
+ [9] "[![R-universe status"
+ [10] "badge](https://grantmcdermott.r-universe.dev/badges/plot2)](https://grantmcdermott.r-universe.dev)"
+ [11] ""
+ [12] ""
+ [13] "The goal of testpkg.altdoc is to …"
+ [14] ""
+ [15] "## Installation"
+ [16] ""
+ [17] "You can install the development version of testpkg.altdoc like so:"
+ [18] ""
+ [19] "``` r"
+ [20] "# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?"
+ [21] "```"
+ [22] ""
+ [23] "## Example"
+ [24] ""
+ [25] "This is a basic example which shows you how to solve a common problem:"
+ [26] ""
+ [27] "``` r"
+ [28] "library(testpkg.altdoc)"
+ [29] "summary(cars)"
+ [30] "#> speed dist "
+ [31] "#> Min. : 4.0 Min. : 2.00 "
+ [32] "#> 1st Qu.:12.0 1st Qu.: 26.00 "
+ [33] "#> Median :15.0 Median : 36.00 "
+ [34] "#> Mean :15.4 Mean : 42.98 "
+ [35] "#> 3rd Qu.:19.0 3rd Qu.: 56.00 "
+ [36] "#> Max. :25.0 Max. :120.00"
+ [37] "```"
---
@@ -126,57 +127,58 @@
.readlines("docs/man/hello_base.md")
Output
[1] ""
- [2] "# Base function"
- [3] ""
- [4] "## Description"
- [5] ""
- [6] "Base function"
- [7] ""
- [8] "## Usage"
- [9] ""
- [10] "hello_base(x = 2)"
- [11] " "
- [12] ""
- [13] "## Arguments"
- [14] ""
- [15] ""
- [16] ""
- [17] ""
- [18] "x "
- [19] " | "
- [20] ""
- [21] "A parameter"
- [22] " | "
- [23] " "
- [24] " "
- [25] ""
- [26] "## Details"
- [27] ""
- [28] "Some code with weird symbols: pl$when(condition) and"
- [29] "pl$then(output) "
- [30] ""
- [31] "Some equations: ∂*Y*/∂*X* = *a* + *ε*/2"
- [32] ""
- [33] "## Value"
- [34] ""
- [35] "Some value"
- [36] ""
- [37] "## Examples"
- [38] ""
- [39] "``` r"
- [40] "library(testpkg.altdoc)"
- [41] ""
- [42] "hello_base()"
- [43] "```"
- [44] ""
- [45] " [1] \"Hello, world!\""
- [46] ""
- [47] "``` r"
- [48] "mtcars$drat <- mtcars$drat + 1"
- [49] "head(mtcars[[\"drat\"]], 2)"
- [50] "```"
- [51] ""
- [52] " [1] 4.9 4.9"
+ [2] ""
+ [3] "# Base function"
+ [4] ""
+ [5] "## Description"
+ [6] ""
+ [7] "Base function"
+ [8] ""
+ [9] "## Usage"
+ [10] ""
+ [11] "hello_base(x = 2)"
+ [12] " "
+ [13] ""
+ [14] "## Arguments"
+ [15] ""
+ [16] ""
+ [17] ""
+ [18] ""
+ [19] "x "
+ [20] " | "
+ [21] ""
+ [22] "A parameter"
+ [23] " | "
+ [24] " "
+ [25] " "
+ [26] ""
+ [27] "## Details"
+ [28] ""
+ [29] "Some code with weird symbols: pl$when(condition) and"
+ [30] "pl$then(output) "
+ [31] ""
+ [32] "Some equations: ∂*Y*/∂*X* = *a* + *ε*/2"
+ [33] ""
+ [34] "## Value"
+ [35] ""
+ [36] "Some value"
+ [37] ""
+ [38] "## Examples"
+ [39] ""
+ [40] "``` r"
+ [41] "library(testpkg.altdoc)"
+ [42] ""
+ [43] "hello_base()"
+ [44] "```"
+ [45] ""
+ [46] " [1] \"Hello, world!\""
+ [47] ""
+ [48] "``` r"
+ [49] "mtcars$drat <- mtcars$drat + 1"
+ [50] "head(mtcars[[\"drat\"]], 2)"
+ [51] "```"
+ [52] ""
+ [53] " [1] 4.9 4.9"
---
@@ -184,152 +186,153 @@
.readlines("docs/man/hello_r6.md")
Output
[1] ""
- [2] "# Create a \"conductor\" tour"
- [3] ""
- [4] "## Description"
- [5] ""
- [6] "blah blah blah"
- [7] ""
- [8] "## Methods"
- [9] ""
- [10] ""
- [11] "Public methods"
- [12] ""
- [13] ""
- [35] " "
- [36] ""
- [37] ""
- [38] ""
- [39] ""
- [40] "Method new() "
- [41] ""
- [42] ""
- [43] "Usage"
- [44] ""
- [45] ""
- [46] "hello_r6\\$new() "
- [47] ""
- [48] ""
- [49] "Details"
- [50] ""
- [51] ""
- [52] "Initialise Conductor ."
- [53] ""
- [54] " "
- [55] ""
- [56] ""
- [57] ""
- [58] ""
- [59] "Method init() "
- [60] ""
- [61] ""
- [62] "Usage"
- [63] ""
- [64] ""
- [65] "hello_r6\\$init(session = NULL) "
- [66] ""
- [67] ""
- [68] "Arguments"
- [69] ""
- [70] ""
- [71] ""
- [72] "- "
- [73] "
session "
- [74] " "
- [75] "- "
- [76] "A valid Shiny session. If
NULL (default), the function"
- [77] "attempts to get the session with"
- [78] "shiny::getDefaultReactiveDomain() ."
- [79] " "
- [80] " "
- [81] ""
- [82] ""
- [83] "Details"
- [84] ""
- [85] ""
- [86] "Initialise Conductor ."
- [87] ""
- [88] " "
- [89] ""
- [90] ""
- [91] ""
- [92] ""
- [93] "Method step() "
- [94] ""
- [95] ""
- [96] "Usage"
- [97] ""
- [98] ""
- [99] "hello_r6\\$step(title = NULL) "
- [100] ""
- [101] ""
- [102] "Arguments"
- [103] ""
- [104] ""
- [105] ""
- [106] "- "
- [107] "
title "
- [108] " "
- [109] "- "
- [110] "Title of the popover."
- [111] "
"
- [112] " "
- [113] ""
- [114] ""
- [115] "Details"
- [116] ""
- [117] ""
- [118] "Add a step in a Conductor tour."
- [119] ""
- [120] " "
- [121] ""
- [122] ""
- [123] ""
- [124] ""
- [125] "Method clone() "
- [126] ""
- [127] ""
- [128] "The objects of this class are cloneable with this method."
- [129] ""
- [130] ""
- [131] "Usage"
- [132] ""
- [133] ""
- [134] "hello_r6\\$clone(deep = FALSE) "
- [135] ""
- [136] ""
- [137] "Arguments"
- [138] ""
- [139] ""
- [140] ""
- [141] "- "
- [142] "
deep "
- [143] " "
- [144] "- "
- [145] "Whether to make a deep clone."
- [146] "
"
- [147] " "
+ [2] ""
+ [3] "# Create a \"conductor\" tour"
+ [4] ""
+ [5] "## Description"
+ [6] ""
+ [7] "blah blah blah"
+ [8] ""
+ [9] "## Methods"
+ [10] ""
+ [11] ""
+ [12] "Public methods"
+ [13] ""
+ [14] ""
+ [36] " "
+ [37] ""
+ [38] ""
+ [39] ""
+ [40] ""
+ [41] "Method new() "
+ [42] ""
+ [43] ""
+ [44] "Usage"
+ [45] ""
+ [46] ""
+ [47] "hello_r6\\$new() "
+ [48] ""
+ [49] ""
+ [50] "Details"
+ [51] ""
+ [52] ""
+ [53] "Initialise Conductor ."
+ [54] ""
+ [55] " "
+ [56] ""
+ [57] ""
+ [58] ""
+ [59] ""
+ [60] "Method init() "
+ [61] ""
+ [62] ""
+ [63] "Usage"
+ [64] ""
+ [65] ""
+ [66] "hello_r6\\$init(session = NULL) "
+ [67] ""
+ [68] ""
+ [69] "Arguments"
+ [70] ""
+ [71] ""
+ [72] ""
+ [73] "- "
+ [74] "
session "
+ [75] " "
+ [76] "- "
+ [77] "A valid Shiny session. If
NULL (default), the function"
+ [78] "attempts to get the session with"
+ [79] "shiny::getDefaultReactiveDomain() ."
+ [80] " "
+ [81] " "
+ [82] ""
+ [83] ""
+ [84] "Details"
+ [85] ""
+ [86] ""
+ [87] "Initialise Conductor ."
+ [88] ""
+ [89] " "
+ [90] ""
+ [91] ""
+ [92] ""
+ [93] ""
+ [94] "Method step() "
+ [95] ""
+ [96] ""
+ [97] "Usage"
+ [98] ""
+ [99] ""
+ [100] "hello_r6\\$step(title = NULL) "
+ [101] ""
+ [102] ""
+ [103] "Arguments"
+ [104] ""
+ [105] ""
+ [106] ""
+ [107] "- "
+ [108] "
title "
+ [109] " "
+ [110] "- "
+ [111] "Title of the popover."
+ [112] "
"
+ [113] " "
+ [114] ""
+ [115] ""
+ [116] "Details"
+ [117] ""
+ [118] ""
+ [119] "Add a step in a Conductor tour."
+ [120] ""
+ [121] " "
+ [122] ""
+ [123] ""
+ [124] ""
+ [125] ""
+ [126] "Method clone() "
+ [127] ""
+ [128] ""
+ [129] "The objects of this class are cloneable with this method."
+ [130] ""
+ [131] ""
+ [132] "Usage"
+ [133] ""
+ [134] ""
+ [135] "hello_r6\\$clone(deep = FALSE) "
+ [136] ""
+ [137] ""
+ [138] "Arguments"
+ [139] ""
+ [140] ""
+ [141] ""
+ [142] "- "
+ [143] "
deep "
+ [144] " "
+ [145] "- "
+ [146] "Whether to make a deep clone."
+ [147] "
"
+ [148] " "
---
@@ -337,7 +340,7 @@
.readlines("docs/vignettes/test.md")
Output
[1] "# test" ""
- [3] "``` r" "library(testpkg.altdoc)"
- [5] "```" ""
- [7] "hello there"
+ [3] "" "``` r"
+ [5] "library(testpkg.altdoc)" "```"
+ [7] "" "hello there"
diff --git a/tests/testthat/_snaps/docute/render_docs.md b/tests/testthat/_snaps/docute/render_docs.md
index 88d293f4..2ed9556d 100644
--- a/tests/testthat/_snaps/docute/render_docs.md
+++ b/tests/testthat/_snaps/docute/render_docs.md
@@ -4,41 +4,42 @@
.readlines("docs/README.md")
Output
[1] ""
- [2] ""
- [3] ""
- [4] "# testpkg.altdoc"
- [5] ""
- [6] ""
- [7] ""
- [8] "[![R-universe status"
- [9] "badge](https://grantmcdermott.r-universe.dev/badges/plot2)](https://grantmcdermott.r-universe.dev)"
- [10] ""
- [11] ""
- [12] "The goal of testpkg.altdoc is to …"
- [13] ""
- [14] "## Installation"
- [15] ""
- [16] "You can install the development version of testpkg.altdoc like so:"
- [17] ""
- [18] "``` r"
- [19] "# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?"
- [20] "```"
- [21] ""
- [22] "## Example"
- [23] ""
- [24] "This is a basic example which shows you how to solve a common problem:"
- [25] ""
- [26] "``` r"
- [27] "library(testpkg.altdoc)"
- [28] "summary(cars)"
- [29] "#> speed dist "
- [30] "#> Min. : 4.0 Min. : 2.00 "
- [31] "#> 1st Qu.:12.0 1st Qu.: 26.00 "
- [32] "#> Median :15.0 Median : 36.00 "
- [33] "#> Mean :15.4 Mean : 42.98 "
- [34] "#> 3rd Qu.:19.0 3rd Qu.: 56.00 "
- [35] "#> Max. :25.0 Max. :120.00"
- [36] "```"
+ [2] ""
+ [3] ""
+ [4] ""
+ [5] "# testpkg.altdoc"
+ [6] ""
+ [7] ""
+ [8] ""
+ [9] "[![R-universe status"
+ [10] "badge](https://grantmcdermott.r-universe.dev/badges/plot2)](https://grantmcdermott.r-universe.dev)"
+ [11] ""
+ [12] ""
+ [13] "The goal of testpkg.altdoc is to …"
+ [14] ""
+ [15] "## Installation"
+ [16] ""
+ [17] "You can install the development version of testpkg.altdoc like so:"
+ [18] ""
+ [19] "``` r"
+ [20] "# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?"
+ [21] "```"
+ [22] ""
+ [23] "## Example"
+ [24] ""
+ [25] "This is a basic example which shows you how to solve a common problem:"
+ [26] ""
+ [27] "``` r"
+ [28] "library(testpkg.altdoc)"
+ [29] "summary(cars)"
+ [30] "#> speed dist "
+ [31] "#> Min. : 4.0 Min. : 2.00 "
+ [32] "#> 1st Qu.:12.0 1st Qu.: 26.00 "
+ [33] "#> Median :15.0 Median : 36.00 "
+ [34] "#> Mean :15.4 Mean : 42.98 "
+ [35] "#> 3rd Qu.:19.0 3rd Qu.: 56.00 "
+ [36] "#> Max. :25.0 Max. :120.00"
+ [37] "```"
---
@@ -119,57 +120,58 @@
.readlines("docs/man/hello_base.md")
Output
[1] ""
- [2] "# Base function"
- [3] ""
- [4] "## Description"
- [5] ""
- [6] "Base function"
- [7] ""
- [8] "## Usage"
- [9] ""
- [10] "hello_base(x = 2)"
- [11] " "
- [12] ""
- [13] "## Arguments"
- [14] ""
- [15] ""
- [16] ""
- [17] ""
- [18] "x "
- [19] " | "
- [20] ""
- [21] "A parameter"
- [22] " | "
- [23] " "
- [24] " "
- [25] ""
- [26] "## Details"
- [27] ""
- [28] "Some code with weird symbols: pl$when(condition) and"
- [29] "pl$then(output) "
- [30] ""
- [31] "Some equations: ∂*Y*/∂*X* = *a* + *ε*/2"
- [32] ""
- [33] "## Value"
- [34] ""
- [35] "Some value"
- [36] ""
- [37] "## Examples"
- [38] ""
- [39] "``` r"
- [40] "library(testpkg.altdoc)"
- [41] ""
- [42] "hello_base()"
- [43] "```"
- [44] ""
- [45] " [1] \"Hello, world!\""
- [46] ""
- [47] "``` r"
- [48] "mtcars$drat <- mtcars$drat + 1"
- [49] "head(mtcars[[\"drat\"]], 2)"
- [50] "```"
- [51] ""
- [52] " [1] 4.9 4.9"
+ [2] ""
+ [3] "# Base function"
+ [4] ""
+ [5] "## Description"
+ [6] ""
+ [7] "Base function"
+ [8] ""
+ [9] "## Usage"
+ [10] ""
+ [11] "hello_base(x = 2)"
+ [12] " "
+ [13] ""
+ [14] "## Arguments"
+ [15] ""
+ [16] ""
+ [17] ""
+ [18] ""
+ [19] "x "
+ [20] " | "
+ [21] ""
+ [22] "A parameter"
+ [23] " | "
+ [24] " "
+ [25] " "
+ [26] ""
+ [27] "## Details"
+ [28] ""
+ [29] "Some code with weird symbols: pl$when(condition) and"
+ [30] "pl$then(output) "
+ [31] ""
+ [32] "Some equations: ∂*Y*/∂*X* = *a* + *ε*/2"
+ [33] ""
+ [34] "## Value"
+ [35] ""
+ [36] "Some value"
+ [37] ""
+ [38] "## Examples"
+ [39] ""
+ [40] "``` r"
+ [41] "library(testpkg.altdoc)"
+ [42] ""
+ [43] "hello_base()"
+ [44] "```"
+ [45] ""
+ [46] " [1] \"Hello, world!\""
+ [47] ""
+ [48] "``` r"
+ [49] "mtcars$drat <- mtcars$drat + 1"
+ [50] "head(mtcars[[\"drat\"]], 2)"
+ [51] "```"
+ [52] ""
+ [53] " [1] 4.9 4.9"
---
@@ -177,152 +179,153 @@
.readlines("docs/man/hello_r6.md")
Output
[1] ""
- [2] "# Create a \"conductor\" tour"
- [3] ""
- [4] "## Description"
- [5] ""
- [6] "blah blah blah"
- [7] ""
- [8] "## Methods"
- [9] ""
- [10] ""
- [11] "Public methods"
- [12] ""
- [13] ""
- [35] " "
- [36] ""
- [37] ""
- [38] ""
- [39] ""
- [40] "Method new() "
- [41] ""
- [42] ""
- [43] "Usage"
- [44] ""
- [45] ""
- [46] "hello_r6\\$new() "
- [47] ""
- [48] ""
- [49] "Details"
- [50] ""
- [51] ""
- [52] "Initialise Conductor ."
- [53] ""
- [54] " "
- [55] ""
- [56] ""
- [57] ""
- [58] ""
- [59] "Method init() "
- [60] ""
- [61] ""
- [62] "Usage"
- [63] ""
- [64] ""
- [65] "hello_r6\\$init(session = NULL) "
- [66] ""
- [67] ""
- [68] "Arguments"
- [69] ""
- [70] ""
- [71] ""
- [72] "- "
- [73] "
session "
- [74] " "
- [75] "- "
- [76] "A valid Shiny session. If
NULL (default), the function"
- [77] "attempts to get the session with"
- [78] "shiny::getDefaultReactiveDomain() ."
- [79] " "
- [80] " "
- [81] ""
- [82] ""
- [83] "Details"
- [84] ""
- [85] ""
- [86] "Initialise Conductor ."
- [87] ""
- [88] " "
- [89] ""
- [90] ""
- [91] ""
- [92] ""
- [93] "Method step() "
- [94] ""
- [95] ""
- [96] "Usage"
- [97] ""
- [98] ""
- [99] "hello_r6\\$step(title = NULL) "
- [100] ""
- [101] ""
- [102] "Arguments"
- [103] ""
- [104] ""
- [105] ""
- [106] "- "
- [107] "
title "
- [108] " "
- [109] "- "
- [110] "Title of the popover."
- [111] "
"
- [112] " "
- [113] ""
- [114] ""
- [115] "Details"
- [116] ""
- [117] ""
- [118] "Add a step in a Conductor tour."
- [119] ""
- [120] " "
- [121] ""
- [122] ""
- [123] ""
- [124] ""
- [125] "Method clone() "
- [126] ""
- [127] ""
- [128] "The objects of this class are cloneable with this method."
- [129] ""
- [130] ""
- [131] "Usage"
- [132] ""
- [133] ""
- [134] "hello_r6\\$clone(deep = FALSE) "
- [135] ""
- [136] ""
- [137] "Arguments"
- [138] ""
- [139] ""
- [140] ""
- [141] "- "
- [142] "
deep "
- [143] " "
- [144] "- "
- [145] "Whether to make a deep clone."
- [146] "
"
- [147] " "
+ [2] ""
+ [3] "# Create a \"conductor\" tour"
+ [4] ""
+ [5] "## Description"
+ [6] ""
+ [7] "blah blah blah"
+ [8] ""
+ [9] "## Methods"
+ [10] ""
+ [11] ""
+ [12] "Public methods"
+ [13] ""
+ [14] ""
+ [36] " "
+ [37] ""
+ [38] ""
+ [39] ""
+ [40] ""
+ [41] "Method new() "
+ [42] ""
+ [43] ""
+ [44] "Usage"
+ [45] ""
+ [46] ""
+ [47] "hello_r6\\$new() "
+ [48] ""
+ [49] ""
+ [50] "Details"
+ [51] ""
+ [52] ""
+ [53] "Initialise Conductor ."
+ [54] ""
+ [55] " "
+ [56] ""
+ [57] ""
+ [58] ""
+ [59] ""
+ [60] "Method init() "
+ [61] ""
+ [62] ""
+ [63] "Usage"
+ [64] ""
+ [65] ""
+ [66] "hello_r6\\$init(session = NULL) "
+ [67] ""
+ [68] ""
+ [69] "Arguments"
+ [70] ""
+ [71] ""
+ [72] ""
+ [73] "- "
+ [74] "
session "
+ [75] " "
+ [76] "- "
+ [77] "A valid Shiny session. If
NULL (default), the function"
+ [78] "attempts to get the session with"
+ [79] "shiny::getDefaultReactiveDomain() ."
+ [80] " "
+ [81] " "
+ [82] ""
+ [83] ""
+ [84] "Details"
+ [85] ""
+ [86] ""
+ [87] "Initialise Conductor ."
+ [88] ""
+ [89] " "
+ [90] ""
+ [91] ""
+ [92] ""
+ [93] ""
+ [94] "Method step() "
+ [95] ""
+ [96] ""
+ [97] "Usage"
+ [98] ""
+ [99] ""
+ [100] "hello_r6\\$step(title = NULL) "
+ [101] ""
+ [102] ""
+ [103] "Arguments"
+ [104] ""
+ [105] ""
+ [106] ""
+ [107] "- "
+ [108] "
title "
+ [109] " "
+ [110] "- "
+ [111] "Title of the popover."
+ [112] "
"
+ [113] " "
+ [114] ""
+ [115] ""
+ [116] "Details"
+ [117] ""
+ [118] ""
+ [119] "Add a step in a Conductor tour."
+ [120] ""
+ [121] " "
+ [122] ""
+ [123] ""
+ [124] ""
+ [125] ""
+ [126] "Method clone() "
+ [127] ""
+ [128] ""
+ [129] "The objects of this class are cloneable with this method."
+ [130] ""
+ [131] ""
+ [132] "Usage"
+ [133] ""
+ [134] ""
+ [135] "hello_r6\\$clone(deep = FALSE) "
+ [136] ""
+ [137] ""
+ [138] "Arguments"
+ [139] ""
+ [140] ""
+ [141] ""
+ [142] "- "
+ [143] "
deep "
+ [144] " "
+ [145] "- "
+ [146] "Whether to make a deep clone."
+ [147] "
"
+ [148] " "
---
@@ -330,7 +333,7 @@
.readlines("docs/vignettes/test.md")
Output
[1] "# test" ""
- [3] "``` r" "library(testpkg.altdoc)"
- [5] "```" ""
- [7] "hello there"
+ [3] "" "``` r"
+ [5] "library(testpkg.altdoc)" "```"
+ [7] "" "hello there"
diff --git a/tests/testthat/_snaps/mkdocs/render_docs.md b/tests/testthat/_snaps/mkdocs/render_docs.md
index b3db3671..b7fb2385 100644
--- a/tests/testthat/_snaps/mkdocs/render_docs.md
+++ b/tests/testthat/_snaps/mkdocs/render_docs.md
@@ -19,57 +19,58 @@
.readlines("docs/man/hello_base.md")
Output
[1] ""
- [2] "# Base function"
- [3] ""
- [4] "## Description"
- [5] ""
- [6] "Base function"
- [7] ""
- [8] "## Usage"
- [9] ""
- [10] "hello_base(x = 2)"
- [11] " "
- [12] ""
- [13] "## Arguments"
- [14] ""
- [15] ""
- [16] ""
- [17] ""
- [18] "x "
- [19] " | "
- [20] ""
- [21] "A parameter"
- [22] " | "
- [23] " "
- [24] " "
- [25] ""
- [26] "## Details"
- [27] ""
- [28] "Some code with weird symbols: pl$when(condition) and"
- [29] "pl$then(output) "
- [30] ""
- [31] "Some equations: ∂*Y*/∂*X* = *a* + *ε*/2"
- [32] ""
- [33] "## Value"
- [34] ""
- [35] "Some value"
- [36] ""
- [37] "## Examples"
- [38] ""
- [39] "``` r"
- [40] "library(testpkg.altdoc)"
- [41] ""
- [42] "hello_base()"
- [43] "```"
- [44] ""
- [45] " [1] \"Hello, world!\""
- [46] ""
- [47] "``` r"
- [48] "mtcars$drat <- mtcars$drat + 1"
- [49] "head(mtcars[[\"drat\"]], 2)"
- [50] "```"
- [51] ""
- [52] " [1] 4.9 4.9"
+ [2] ""
+ [3] "# Base function"
+ [4] ""
+ [5] "## Description"
+ [6] ""
+ [7] "Base function"
+ [8] ""
+ [9] "## Usage"
+ [10] ""
+ [11] "hello_base(x = 2)"
+ [12] " "
+ [13] ""
+ [14] "## Arguments"
+ [15] ""
+ [16] ""
+ [17] ""
+ [18] ""
+ [19] "x "
+ [20] " | "
+ [21] ""
+ [22] "A parameter"
+ [23] " | "
+ [24] " "
+ [25] " "
+ [26] ""
+ [27] "## Details"
+ [28] ""
+ [29] "Some code with weird symbols: pl$when(condition) and"
+ [30] "pl$then(output) "
+ [31] ""
+ [32] "Some equations: ∂*Y*/∂*X* = *a* + *ε*/2"
+ [33] ""
+ [34] "## Value"
+ [35] ""
+ [36] "Some value"
+ [37] ""
+ [38] "## Examples"
+ [39] ""
+ [40] "``` r"
+ [41] "library(testpkg.altdoc)"
+ [42] ""
+ [43] "hello_base()"
+ [44] "```"
+ [45] ""
+ [46] " [1] \"Hello, world!\""
+ [47] ""
+ [48] "``` r"
+ [49] "mtcars$drat <- mtcars$drat + 1"
+ [50] "head(mtcars[[\"drat\"]], 2)"
+ [51] "```"
+ [52] ""
+ [53] " [1] 4.9 4.9"
---
@@ -77,152 +78,153 @@
.readlines("docs/man/hello_r6.md")
Output
[1] ""
- [2] "# Create a \"conductor\" tour"
- [3] ""
- [4] "## Description"
- [5] ""
- [6] "blah blah blah"
- [7] ""
- [8] "## Methods"
- [9] ""
- [10] ""
- [11] "Public methods"
- [12] ""
- [13] ""
- [35] " "
- [36] ""
- [37] ""
- [38] ""
- [39] ""
- [40] "Method new() "
- [41] ""
- [42] ""
- [43] "Usage"
- [44] ""
- [45] ""
- [46] "hello_r6\\$new() "
- [47] ""
- [48] ""
- [49] "Details"
- [50] ""
- [51] ""
- [52] "Initialise Conductor ."
- [53] ""
- [54] " "
- [55] ""
- [56] ""
- [57] ""
- [58] ""
- [59] "Method init() "
- [60] ""
- [61] ""
- [62] "Usage"
- [63] ""
- [64] ""
- [65] "hello_r6\\$init(session = NULL) "
- [66] ""
- [67] ""
- [68] "Arguments"
- [69] ""
- [70] ""
- [71] ""
- [72] "- "
- [73] "
session "
- [74] " "
- [75] "- "
- [76] "A valid Shiny session. If
NULL (default), the function"
- [77] "attempts to get the session with"
- [78] "shiny::getDefaultReactiveDomain() ."
- [79] " "
- [80] " "
- [81] ""
- [82] ""
- [83] "Details"
- [84] ""
- [85] ""
- [86] "Initialise Conductor ."
- [87] ""
- [88] " "
- [89] ""
- [90] ""
- [91] ""
- [92] ""
- [93] "Method step() "
- [94] ""
- [95] ""
- [96] "Usage"
- [97] ""
- [98] ""
- [99] "hello_r6\\$step(title = NULL) "
- [100] ""
- [101] ""
- [102] "Arguments"
- [103] ""
- [104] ""
- [105] ""
- [106] "- "
- [107] "
title "
- [108] " "
- [109] "- "
- [110] "Title of the popover."
- [111] "
"
- [112] " "
- [113] ""
- [114] ""
- [115] "Details"
- [116] ""
- [117] ""
- [118] "Add a step in a Conductor tour."
- [119] ""
- [120] " "
- [121] ""
- [122] ""
- [123] ""
- [124] ""
- [125] "Method clone() "
- [126] ""
- [127] ""
- [128] "The objects of this class are cloneable with this method."
- [129] ""
- [130] ""
- [131] "Usage"
- [132] ""
- [133] ""
- [134] "hello_r6\\$clone(deep = FALSE) "
- [135] ""
- [136] ""
- [137] "Arguments"
- [138] ""
- [139] ""
- [140] ""
- [141] "- "
- [142] "
deep "
- [143] " "
- [144] "- "
- [145] "Whether to make a deep clone."
- [146] "
"
- [147] " "
+ [2] ""
+ [3] "# Create a \"conductor\" tour"
+ [4] ""
+ [5] "## Description"
+ [6] ""
+ [7] "blah blah blah"
+ [8] ""
+ [9] "## Methods"
+ [10] ""
+ [11] ""
+ [12] "Public methods"
+ [13] ""
+ [14] ""
+ [36] " "
+ [37] ""
+ [38] ""
+ [39] ""
+ [40] ""
+ [41] "Method new() "
+ [42] ""
+ [43] ""
+ [44] "Usage"
+ [45] ""
+ [46] ""
+ [47] "hello_r6\\$new() "
+ [48] ""
+ [49] ""
+ [50] "Details"
+ [51] ""
+ [52] ""
+ [53] "Initialise Conductor ."
+ [54] ""
+ [55] " "
+ [56] ""
+ [57] ""
+ [58] ""
+ [59] ""
+ [60] "Method init() "
+ [61] ""
+ [62] ""
+ [63] "Usage"
+ [64] ""
+ [65] ""
+ [66] "hello_r6\\$init(session = NULL) "
+ [67] ""
+ [68] ""
+ [69] "Arguments"
+ [70] ""
+ [71] ""
+ [72] ""
+ [73] "- "
+ [74] "
session "
+ [75] " "
+ [76] "- "
+ [77] "A valid Shiny session. If
NULL (default), the function"
+ [78] "attempts to get the session with"
+ [79] "shiny::getDefaultReactiveDomain() ."
+ [80] " "
+ [81] " "
+ [82] ""
+ [83] ""
+ [84] "Details"
+ [85] ""
+ [86] ""
+ [87] "Initialise Conductor ."
+ [88] ""
+ [89] " "
+ [90] ""
+ [91] ""
+ [92] ""
+ [93] ""
+ [94] "Method step() "
+ [95] ""
+ [96] ""
+ [97] "Usage"
+ [98] ""
+ [99] ""
+ [100] "hello_r6\\$step(title = NULL) "
+ [101] ""
+ [102] ""
+ [103] "Arguments"
+ [104] ""
+ [105] ""
+ [106] ""
+ [107] "- "
+ [108] "
title "
+ [109] " "
+ [110] "- "
+ [111] "Title of the popover."
+ [112] "
"
+ [113] " "
+ [114] ""
+ [115] ""
+ [116] "Details"
+ [117] ""
+ [118] ""
+ [119] "Add a step in a Conductor tour."
+ [120] ""
+ [121] " "
+ [122] ""
+ [123] ""
+ [124] ""
+ [125] ""
+ [126] "Method clone() "
+ [127] ""
+ [128] ""
+ [129] "The objects of this class are cloneable with this method."
+ [130] ""
+ [131] ""
+ [132] "Usage"
+ [133] ""
+ [134] ""
+ [135] "hello_r6\\$clone(deep = FALSE) "
+ [136] ""
+ [137] ""
+ [138] "Arguments"
+ [139] ""
+ [140] ""
+ [141] ""
+ [142] "- "
+ [143] "
deep "
+ [144] " "
+ [145] "- "
+ [146] "Whether to make a deep clone."
+ [147] "
"
+ [148] " "
---
@@ -230,7 +232,7 @@
.readlines("docs/vignettes/test.md")
Output
[1] "# test" ""
- [3] "``` r" "library(testpkg.altdoc)"
- [5] "```" ""
- [7] "hello there"
+ [3] "" "``` r"
+ [5] "library(testpkg.altdoc)" "```"
+ [7] "" "hello there"
diff --git a/tests/testthat/examples/testpkg.altdoc/.Rbuildignore b/tests/testthat/examples/testpkg.altdoc/.Rbuildignore
deleted file mode 100644
index 91114bf2..00000000
--- a/tests/testthat/examples/testpkg.altdoc/.Rbuildignore
+++ /dev/null
@@ -1,2 +0,0 @@
-^.*\.Rproj$
-^\.Rproj\.user$
diff --git a/tests/testthat/test-rd2qmd.R b/tests/testthat/test-rd2qmd.R
index ef992b67..7b90eece 100644
--- a/tests/testthat/test-rd2qmd.R
+++ b/tests/testthat/test-rd2qmd.R
@@ -1,10 +1,11 @@
test_that(".rd2qmd works", {
- rd_file <- testthat::test_path("examples/examples-man/between.Rd")
# .rd2qmd works only in pkg directory
- fs::file_create("DESCRIPTION")
- dest <- tempdir()
- .rd2qmd(rd_file, dest, path = ".")
- qmd_file <- fs::path_join(c(dest, "between.qmd"))
+ rd_file <- fs::path_abs(testthat::test_path("examples/examples-man/between.Rd"))
+ create_local_package()
+ fs::file_copy(rd_file, ".")
+ fs::dir_create("docs")
+ .rd2qmd(rd_file, "docs", path = ".")
+ qmd_file <- fs::path_join(c("docs", "between.qmd"))
expect_true(fs::file_exists(qmd_file))
content <- .readlines(qmd_file)
diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R
index 5e6d50a8..54a365e3 100644
--- a/tests/testthat/test-utils.R
+++ b/tests/testthat/test-utils.R
@@ -20,11 +20,13 @@ test_that(".pkg_version() works", {
})
test_that(".parse_news works", {
+ skip_if_not_installed("desc")
+ create_local_package()
+ desc::desc_set_urls("https://github.com/etiennebacher/altdoc")
input <- "# 1.1.0\n\n* thanks @foo-bar for their contribution (#111)\n\n* thanks @foo2- for their contribution (#11)\n\n* due to issue in another repo (pola-rs/polars#112)\n\n* thanks @JohnDoe, @JaneDoe"
- temp <- tempfile()
- cat(input, file = temp)
- .parse_news(".", temp)
- parsed <- paste(.readlines(temp), collapse = "")
+ cat(input, file = "NEWS.md")
+ .parse_news(".", "NEWS.md")
+ parsed <- paste(.readlines("NEWS.md"), collapse = "")
should_be_found <- c(
"[@foo-bar](https://github.com/foo-bar)",
diff --git a/vignettes/get-started.Rmd b/vignettes/get-started.Rmd
index f5eca24d..d1002e12 100644
--- a/vignettes/get-started.Rmd
+++ b/vignettes/get-started.Rmd
@@ -1,4 +1,11 @@
-# Get Started
+---
+title: "Get started"
+output: rmarkdown::html_vignette
+vignette: >
+ %\VignetteIndexEntry{Get started}
+ %\VignetteEngine{knitr::rmarkdown}
+ %\VignetteEncoding{UTF-8}
+---
## Quick start
|