【问题标题】:Windows R CMD check top-level files: (README) [WARNING] This document format requires a nonempty <title> elementWindows R CMD 检查顶级文件:(README) [警告] 此文档格式需要非空 <title> 元素
【发布时间】:2020-04-17 09:38:00
【问题描述】:

我已在 Win、OSX 和 Linux 上为 R 激活 GitHub Action to CI。在 Windows 上只会出现以下警告(这会变成错误)。

* 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 完整报告。

好像是直接通过CMD检查调用的,所以我不能改调用pandoc。

另一方面,我尝试在 README.Rmd 标头中包含一个 pandoc 参数,因为它被建议为 here

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

没有效果。

注意:我不会从 CMD 检查中删除 error_on = "warning"

我该怎么做才能让测试也通过胜利?

【问题讨论】:

  • 我认为 R CMD 检查没有看到你的 .Rmd 文件,它只看到 .md 文件。 pagetitle: 线路到那里了吗?
  • 是的,我确认R CMD check 看不到.Rmd(即它包含在.Rbuiltignore 中)。每次更改时,我都会编织.Rmdpagetitle: 似乎对.md 文件完全没有影响
  • 你的标题看起来很奇怪;我在 Rmd 文件中看到了title: "`{covid19ita}` &lt;img src='man/figures/logo-laims.jpg' align='right' height='120' /&gt;&lt;img src='man/figures/logo-ubep.png' align='right' height='120' /&gt;"。也许将其简化为纯文本?
  • 使用简单的文本不会改变:github.com/UBESP-DCTV/covid19ita/pull/62/… 也很奇怪,R3.5 通过了 R3.6 没有,而here(旧标题)恰恰相反......我我开始认为这可能与以下从 AppVeyor 获取徽章的错误有关......现在我尝试停用它
  • codecov here 中丢失的徽章也会发生同样的情况所以,我认为问题与获取徽章的能力有关

标签: r r-markdown pandoc r-package github-actions


【解决方案1】:

似乎主要问题与无法在呈现的文档中获取徽章有关。可以看到here(R3.5 通过,但 R3.6 不通过),或 here(R3.6 通过,但 R3.5 不通过)和here(缺少的徽章是 no更多的 AppVeyor,但 CodeCov 之一)。

所以我目前的解决方案是确保所有的徽章都准备好之前或更改之后检查操作发生(例如,仅使用 gh-action)。 p>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-02-08
    • 2011-07-12
    • 2019-08-13
    • 1970-01-01
    • 2017-05-28
    • 2012-07-02
    • 1970-01-01
    • 2015-01-27
    相关资源
    最近更新 更多