我在自己的帖子中也插入了外链音乐,在本地建站是可以显示音乐并正常播放,但push到网上的博客之后却没有显示这个插入外链音乐的帖子。
我插入的外链音乐如下:<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=1874946820&auto=1&height=66"></iframe>
提出问题以前,我根据本贴tctcab大哥和谢大哥的建议都试了一遍。
由于我的config文件是.yaml的,所以代码如下:
markup:
goldmark:
renderer:
unsafe: true
但其实没求助之前以上代码就已经存在,只是unsafe那里是yes,后来我改成了现在的true,但一样不行。
奇怪的地方在于:修改前后本地建站预览都是有外链音乐显示,还可以正常播放,但不知为什么把帖子上传之后,网站里却没有显示这篇帖子(仅仅是没有显示帖子,其他的帖子、主页面什么的都正常显示)。
帖子源码:
https://github.com/residualsun1/Residualsun/blob/main/content/en/post/2023/05/may-have-hope.md?plain=1
设置unsafe的config.yaml的源码:
https://github.com/residualsun1/Residualsun/blob/main/config/_default/config.yaml
仓库位置:
https://github.com/residualsun1/Residualsun
主题模板anatole位置:
https://github.com/lxndrblz/anatole
部署环境:
使用的是Netlify。
R配置环境:
> sessionInfo()
R version 4.2.3 (2023-03-15 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8 LC_CTYPE=Chinese (Simplified)_China.utf8
[3] LC_MONETARY=Chinese (Simplified)_China.utf8 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shiny_1.7.4
loaded via a namespace (and not attached):
[1] Rcpp_1.0.10 rstudioapi_0.14 knitr_1.43 servr_0.27 magrittr_2.0.3
[6] xtable_1.8-4 R6_2.5.1 rlang_1.1.1 fastmap_1.1.1 tools_4.2.3
[11] xfun_0.39 miniUI_0.1.1.1 cli_3.6.1 jquerylib_0.1.4 htmltools_0.5.5
[16] ellipsis_0.3.2 yaml_2.3.7 digest_0.6.31 lifecycle_1.0.3 bookdown_0.34
[21] processx_3.8.1 later_1.3.1 sass_0.4.6 promises_1.2.0.1 ps_1.7.5
[26] memoise_2.0.1 cachem_1.0.8 evaluate_0.21 mime_0.12 rmarkdown_2.21
[31] blogdown_1.17.2 bslib_0.4.2 compiler_4.2.3 jsonlite_1.8.4 httpuv_1.6.11
烦请各位前辈指导。