-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
73 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.quarto/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
project: | ||
type: website | ||
|
||
website: | ||
title: ".docs" | ||
navbar: | ||
left: | ||
- href: index.qmd | ||
text: Home | ||
- about.qmd | ||
|
||
format: | ||
html: | ||
theme: cosmo | ||
css: styles.css | ||
toc: true | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: "About" | ||
--- | ||
|
||
About this site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: Functions | ||
--- | ||
|
||
## generate_docs | ||
|
||
`generate_docs(files, folder_name = "docs", gh_url = "", run_examples = FALSE)` \ | ||
|
||
Generate a quarto website from lines starting with `###` or `///` that are right above function declarations. \ | ||
The website folder is created in the current working directory. \ | ||
The first line of the block is important, since the name of the variable will be used to group functions into the | ||
same one-worded section. This is useful, for example, when working using an OOP approach. For now, to avoid any | ||
bugs, it is important that all grouped functions are on the same file. \ | ||
The user is free to create its headings, line breaks and make use of all other markdown utilities. \ | ||
All R code identified by "```r" will be evaluated in a separate R session. If you don't want a certain part of the | ||
code to be run, it will be needed to comment it or avoid the "```r" representation. If you don't want to evaluate | ||
the code at all, use `run_examples = FALSE`, which is the default. \ | ||
|
||
#### Arguments | ||
|
||
* `files` \ | ||
The files that will be used to create the `.qmd` documentation. | ||
* `folder_name` \ | ||
Name of the folder which will store the website. \ | ||
* `gh_url` \ | ||
A github url indicating where the documented files will be stored. It will create a link to the source code for each | ||
function. The default value will not create such links. \ | ||
* `run_examples` \ | ||
If `TRUE`, All R code identified in an r code block will be evaluated in a separate R session. If you don't want a certain part | ||
of the code to be run, it will be needed to comment it or avoid the r code representation in markdown. \ | ||
|
||
|
||
#### Examples | ||
|
||
```r | ||
rdocs::generate_docs(files = "./rdocs/R/main.R", folder_name = "docs", gh_url = "https://github.com/daniellga/rdocs/tree/main/rdocs/R", run_examples = FALSE) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: ".docs" | ||
--- | ||
|
||
This is a Quarto website. | ||
|
||
To learn more about Quarto websites visit <https://quarto.org/docs/websites>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* css styles */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: rdocs | ||
Title: Create Quarto documentation for R files from comments | ||
Version: 0.1.16 | ||
Version: 0.1.17 | ||
Authors@R: | ||
person("Daniel", "Gurgel", , "[email protected]", role = c("aut", "cre")) | ||
Description: Generate R documentation in Quarto format based on comments in R scripts. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters