Skip to content

Commit 8bc7798

Browse files
committed
Implement use_pkgdown
Fixes #88
1 parent 137d81c commit 8bc7798

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export(use_news_md)
4646
export(use_package)
4747
export(use_package_doc)
4848
export(use_pipe)
49+
export(use_pkgdown)
4950
export(use_r)
5051
export(use_rcpp)
5152
export(use_readme_md)

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# usethis 1.0.0.9000
22

3+
* New `use_pkgdown()` creates the basics needed for a
4+
[pkgdown](https://github.com/hadley/pkgdown) website (#88).
5+
36
* New `create_from_github()` creates a project from an existing GitHub
47
repository, forking if needed (#109).
58

R/pkgdown.R

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#' Use pkgdown
2+
#'
3+
#' [pkgdown](https://github.com/hadley/pkgdown) makes it easy to turn your
4+
#' package into a beautiful website. This helper creates `_pkgdown.yml`
5+
#' and `docs/` for you, and adds to `.Rbuildignore`
6+
#'
7+
#' @export
8+
use_pkgdown <- function() {
9+
edit_file(proj_get(), "_pkgdown.yml")
10+
use_build_ignore("_pkgdown.yml")
11+
12+
use_directory("doc", ignore = TRUE)
13+
}

man/use_pkgdown.Rd

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)