My news md does not show up in my pkgdown site

72 Views Asked by At

I have a R package called relper, recently I did some updating in my news file, here a sample:

# relper 3 (Calculations all the way)

To improve data analysis, I added functions that compute metrics and other calculations.

## 3.6.8

**Improvements:**

-   Parameter `prefix` to the function `dttm_vars`
-   Use of `format_num` to breaks labels, with `...` in the function `plt_scale_y_mirror`

## 3.5.0

**Addition:**

-   Function `stat_missing_values`.

In RStudio when I do a preview it shows ups perfectly:

enter image description here

But when I build the news (pkgdown::build_news()) or push to my repo the site look like this:

enter image description here

I'm not sure what caused it, because I just formatted some of the text.

2

There are 2 best solutions below

0
Vinícius Félix On

So a NEWS.md file just accepts sections broken up into versions using level one (#) or level two headings (##) that (partially) match one of the following forms (ignoring case):

{package name} 1.3.0

{package name} v1.3.0

Version 1.3.0

Changes in 1.3.0

Changes in v1.3.0
0
scfurl On

I had the same problem. The answer provided by Vinicius is technically correct, but to expand...

The build_news function will parse lines of markdown code looking for header_1 (h_1) lines designated with one # and header_2 lines (h_2) lines (starting with ##). It will also look for the correct package name and a valid version number.

Your NEWS.md file does not have the correct format consistently.

I would do this (putting the first few lines elsewhere in your site)


# relper 3.6.8

## Improvements:

* Parameter `prefix` to the function `dttm_vars`
* Use of `format_num` to breaks labels, with `...` in the function `plt_scale_y_mirror`

# relper 3.5.0

## Addition

* Function `stat_missing_values`.