主页由pkgdown生成,但无法正确渲染。

huangapple go评论76阅读模式
英文:

home page generated by pkgdown not rendering properly

问题

在几个月没有更新我的包mRpostman之后,我决定在README.Rmd文件中包含GitHub Actions单元测试徽章。我使用了usethis::use_github_action("check-standard"),然后手动添加了徽章的URL,如推荐的那样。我还将pkgdown版本更新到了最新版本(截至2023年7月为止的2.0.7版本)。该包的网站在本地渲染得很顺利。然而,当将更改推送到GitHub时,包的主页无法正确渲染。准确地说,标志的大小超出了预期。当运行pkgdown::build_site()时,我得到的唯一警告信息是:

警告信息:
无法解析主题'ImapCon'的示例

尽管如此,代码或文档方面并没有任何变化。我相信这个警告在之前的版本中也存在。即便如此,页面在本地渲染时没有任何问题。

到目前为止,我尝试过以下方法,但都没有成功:

1)通过手动调整README.Rmd中的<img> HTML标签的宽度来调整图像的大小;

2)我还尝试了pkgdown::clean_site(),但问题没有解决。

复制问题的信息:

1)网站的URL是http://allanvc.github.io/mRpostman

2)源代码可在https://github.com/allanvc/mRpostman/找到

以下是页面的本地和发布后的外观:

本地:

主页由pkgdown生成,但无法正确渲染。

发布后:

主页由pkgdown生成,但无法正确渲染。

英文:

After a few months without updating my package mRpostman, I decided to include GitHub Actions unit test badge on README.Rmd file. I used usethis::use_github_action(&quot;check-standard&quot;) then manually added the URL to the badge as recommended. I have also updated pkgdown version to the newest one (2.0.7) as of July 2023. The package web site renders smoothly locally. Nonetheless, when pushing the changes to github, the package's home page does not render properly. The logo is oversized to be more precise. The only warning message I get when running pkgdown::build_site() is:

Warning message:
Failed to parse example for topic &#39;ImapCon&#39;

Nonetheless, nothing has changed in terms of code or documentation. I believe this warning was also present in the previous version. Even so, the page is rendered without any problems locally.

Things I have tried so far without any success:

  1. resizing the figure by manually adjusting the width in the <img> HTML tag on README.Rmd;

  2. I have also tried pkgdown::clean_site(), but that did not solve the problem.

Info to replicate the problem:

  1. The URL to the website is http://allanvc.github.io/mRpostman

  2. The source code is available at https://github.com/allanvc/mRpostman/

Here is how the page looks (locally vs. published):

Local:

主页由pkgdown生成,但无法正确渲染。

Published:

主页由pkgdown生成,但无法正确渲染。

答案1

得分: 0

几天后,唯一解决问题的方法是将pkgdown降级到之前出现问题的版本。
现在,使用pkgdown版本1.6.1,软件包主页可以正常显示。

英文:

After a couple of days, the only thing that solved the problem was downgrading pkgdown to the version I had before things got broken.
Now, the package home page renders smoothly with pkdown version 1.6.1.

huangapple
  • 本文由 发表于 2023年7月27日 17:51:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/76778527.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定