BNDong / Cnblogs-Theme-SimpleMemory

🍭 Cnblogs theme _ Basic theme : SimpleMemory

Home Page:https://bndong.github.io/Cnblogs-Theme-SimpleMemory/v2.1/dist/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

使用该主题将导致搜索引擎错误识别发帖日期

theores opened this issue · comments

在博客套用该主题后,博文详情上方的日期时间缩写将导致搜索引擎把年-月-日错误识别为日-月-年,以致搜索结果极难搜到该贴。
如图:

  • 例一:

image

image

  • 例二:

image
image

  • 例三(主题作者BNDong博文):

image
image

您好!我 之前也遇见过相同问题,我已经解决。
参考该链接
我已经提交PR,但是由于原作者一直没有更新,无奈关闭。
然后可以将链接转移到我fork的仓库。具体参考链接内教程

博客时间问题,已修复方案

修复过程,原本找到了js的代码位置,仅仅是一个substring的问题,但是苦于环境无法编译
我最后只能直接修改生产的dict文件,该文件位于page-common-comArticle.b054622b.js,仅仅删除其substring page-common-comArticle.b054622b.js,由于jsdelivr缓存问题,我新生成了一个tage v2.1.1,可直接引用我的Fork仓库 https://github.com/Billyas/Cnblogs-Theme-SimpleMemory.git

配置时仅需进行如下修改
image

https://cdn.jsdelivr.net/gh/Billyas/Cnblogs-Theme-SimpleMemory@v2.1.1/dist/simpleMemory.js

经过校验发现,必须是2022-04-08 这种格式方能被bing搜索识别位置正确日期。重新修改。

https://cdn.jsdelivr.net/gh/Billyas/Cnblogs-Theme-SimpleMemory@v2.1.2/dist/simpleMemory.js

Originally posted by @Billyas in #333 (comment)

@Billyas 非常感谢,已经换成你的了。

编译的时候因为google-fonts的问题会出现编译错误,目前我是先把google-fonts给注释掉了

博客时间格式问题已在新版本内修复

可以替换链接为最新版本
<script src="https://cdn.jsdelivr.net/gh/BNDong/Cnblogs-Theme-SimpleMemory@v2.1.2/dist/simpleMemory.js" defer></script>