英文:
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/找到
以下是页面的本地和发布后的外观:
本地:
发布后:
英文:
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("check-standard")
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 'ImapCon'
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:
-
resizing the figure by manually adjusting the width in the <img> HTML tag on README.Rmd;
-
I have also tried
pkgdown::clean_site()
, but that did not solve the problem.
Info to replicate the problem:
-
The URL to the website is http://allanvc.github.io/mRpostman
-
The source code is available at https://github.com/allanvc/mRpostman/
Here is how the page looks (locally vs. published):
Local:
Published:
答案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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论