Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于版本切换 #100

Closed
BNDong opened this issue Feb 29, 2020 · 0 comments
Closed

关于版本切换 #100

BNDong opened this issue Feb 29, 2020 · 0 comments

Comments

@BNDong
Copy link
Owner

BNDong commented Feb 29, 2020

版本切换

注意:任何版本的切换,最好都更新一下对应版本的css样式,不然可能会发生兼容性问题!

v1.0.0 、 v1.*.* 、 v2.*.* 之间切换版本

由于 v1.0.0 、 v1.*.* 、 v2.*.* 版本的配置方式不同,所以建议依据各版本的配置方式重新配置主题。

v2.*.* 之间切换版本

使用 jsdelivr 加载资源

只需要更改 simpleMemory.js 文件引入的版本。

例如:

<script src="https://cdn.jsdelivr.net/gh/BNDong/Cnblogs-Theme-SimpleMemory@v2.0.0/dist/simpleMemory.js" defer></script>

变为

<script src="https://cdn.jsdelivr.net/gh/BNDong/Cnblogs-Theme-SimpleMemory@v2.0.1/dist/simpleMemory" defer></script>

版本变更: v2.0.0 >>> v2.0.1

使用自己的云资源

如果你的资源是托管到自己的云资源上。

随机参方式更新加载资源

推荐这种方式来更新加载资源。

例如:

<script src="https://dbnuo.com/dist/simpleMemory.js?_12311" defer></script>

变为

<script src="https://dbnuo.com/dist/simpleMemory.js?_12322" defer></script>

这样浏览器就会加载最新的代码。

更换文件方式更新加载资源

/dist 目录除了 simpleMemory.js 文件,还有一个带随机后缀名的文件:simpleMemory.[8位随机串].js
也可以每次更新代码后引入此文件,来达到更新加载资源的目的。

例如:

<script src="https://dbnuo.com/dist/simpleMemory.y7i7sx47.js" defer></script>

变为

<script src="https://dbnuo.com/dist/simpleMemory.s8kn7hd6.js" defer></script>

这样浏览器就会加载最新的代码。

@BNDong BNDong pinned this issue Feb 29, 2020
@BNDong BNDong closed this as completed Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant