reformat: Convert a NEWS file to work with pkgdown

View source: R/reformat.R

reformatR Documentation

Convert a NEWS file to work with pkgdown

Description

This function will take an existing NEWS.md file and convert it to pkgdown readable format. The former format should have headings that begin with

  • CHANGES for 'CHANGES IN VERSION'

  • 'New' for 'New features'

  • 'Bug' for 'Bug fixes and minor improvements'

These headings usually begin with 'h2' headers or double hashtag. An n-1 operation is performed on these headings (if the heading had two hashtags 'h2', they are now converted to one hashtag 'h1').

Usage

reformat(pkg = ".", backup = ".bak")

Arguments

pkg

character(1) The directory location of the package usually the current directory (default: ".")

backup

character(1) The file extension to add for backing up the original news file (default: '.bak')

Value

Saves a "NEWS.md" file with alternative format


waldronlab/newsfeed documentation built on July 30, 2023, 1:22 a.m.