Skip to content

Improve the file created by use_vignette() #445

@rorynolan

Description

@rorynolan

Ordinarily, the output of use_vignette("Cool thing") would be a file with the following YAML header:

---
title: "Vignette Title"
author: "Vignette Author"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Vignette Title}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

whereas it would be great if the vignette title fields and Author fields were filled in too such that it would be

---
title: "Cool thing"
author: "Package authors (from DESCRIPTION file)"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Cool thing}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

I also think it would be good to replace the space in the file name, such that it's Cool-thing.Rmd.

If you agree, I'm happy to implement some or all of this myself with a pull request.

Thanks, I use usethis everyday.
Rory

Metadata

Metadata

Assignees

No one assigned

    Labels

    docs 💡documentation, news, vignettes, website, etcfeaturea feature request or enhancementwipwork in progress

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions