-
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.
Merge pull request #1 from jangorecki/litedown
new website from litedown, vignette with litedown
- Loading branch information
Showing
10 changed files
with
94 additions
and
27 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 |
---|---|---|
@@ -1 +1,3 @@ | ||
^\.github$ | ||
^_litedown\.yml$ | ||
^pkgup$ |
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,11 +1,11 @@ | ||
Package: pkgup | ||
Version: 0.2.0 | ||
Version: 0.3.0 | ||
Title: Package Release | ||
Authors@R: c( | ||
person("Jan","Gorecki", role=c("aut","cre"), email="[email protected]")) | ||
Description: Lightweight release of R packages on github. | ||
License: GPL-2 | ||
URL: https://jangorecki.github.io/pkgup/ | ||
BugReports: https://github.com/jangorecki/pkgup/issues/ | ||
Suggests: knitr, markdown | ||
VignetteBuilder: knitr | ||
Suggests: litedown | ||
VignetteBuilder: litedown |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
output: | ||
litedown::html_format: | ||
options: | ||
toc: | ||
depth: 4 | ||
litedown::latex_format: | ||
meta: | ||
documentclass: "book" | ||
|
||
book: | ||
new_session: false | ||
subdir: true | ||
pattern: "[.]R?md$" | ||
chapter_before: "Information before a chapter." | ||
chapter_after: "This chapter was generated from `$input$`." |
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,15 @@ | ||
--- | ||
site: | ||
rebuild: "outdated" | ||
pattern: "[.]R?md$" | ||
--- | ||
|
||
```{r, echo=FALSE} | ||
litedown::pkg_desc() | ||
``` | ||
|
||
To cite the package: | ||
|
||
```{r, echo=FALSE} | ||
litedown::pkg_citation() | ||
``` |
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,3 @@ | ||
```{r, echo=FALSE} | ||
litedown::pkg_manual() | ||
``` |
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,3 @@ | ||
```{r, echo=FALSE} | ||
litedown::pkg_news(recent=0) | ||
``` |
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,25 @@ | ||
```{r, echo=FALSE, results='asis'} | ||
rmd = list.files("./vignettes", "*.Rmd", full.names=TRUE) | ||
if (!length(rmd)) { | ||
cat("no vignettes\n") | ||
} else { | ||
title = function(f) { | ||
title1 = function(f) { | ||
if (!file.exists(f)) | ||
stop("file ", f, " does not exists") | ||
l = readLines(f) | ||
t = paste(head(strsplit(basename(f), ".", fixed=TRUE)[[1L]], -1L), collapse=".") ## default, basename without extension | ||
for (i in seq_along(l)) { | ||
if (substr(l[i], 1L, 6L) != "title:") | ||
next | ||
t = trimws(gsub("title:", "", l[i], fixed=TRUE)) | ||
break | ||
} | ||
t | ||
} | ||
sapply(f, title1) | ||
} | ||
html = paste0(substr(rmd, 1L, nchar(rmd)-3L), "html") | ||
lapply(html, function(f) cat(sprintf("[%s](%s)\n", title(rmd), f))) |> invisible() | ||
} | ||
``` |
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