简体   繁体   中英

Windows R CMD check top-level files: (README) [WARNING] This document format requires a nonempty <title> element

I have activated GitHub Action to CI for R on Win, OSX, and Linux. On Windows only happen the following warning (which is turned into an error).

* checking top-level files ... WARNING

Conversion of 'README.md' failed:

[WARNING] This document format requires a nonempty <title> element.

  Please specify either 'title' or 'pagetitle' in the metadata,

  e.g. by using --metadata pagetitle="..." on the command line.

  Falling back to 'README'

here the full report.

It seems it is called by CMD check directly, hence I cannot change the call to pandoc.

On the other hand, I tried to include a pandoc argument into the README.Rmd header as it was suggested here :

output:
  github_document: 
    pandoc_args: "--number-offset=1,0"
    toc: true
pagetitle: covid19ita

It has no effect.

NOTE: I would not remove error_on = "warning" from CMD check.

What can I do to make the test pass on win too?

It seems that the main issue is related to the inability to fetch badges in the rendered document. That could be seen here (pass for R3.5 but not for R3.6), or here (pass for R3.6 but not for R3.5), and here (where the missing badge is no more the AppVeyor one but the CodeCov one).

So my current solution is to be sure all the badges are ready before or change after the check action takes place (eg using only gh-action).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM