XTLS / Xray-docs-next

Xray-docs-next
https://xtls.github.io
Creative Commons Attribution Share Alike 4.0 International
161 stars 217 forks source link

png 文件尺寸大有优化空间 #560

Closed Artoria2e5 closed 3 weeks ago

Artoria2e5 commented 3 weeks ago

由于本库 git clone 时消耗较长时间,我发现库内有多个超过 500 K 的 png 文件,严重怀疑用 pngquant 可以变小很多。提升用户浏览体验,也提升开发者体验。

Fangliding commented 3 weeks ago

其实是因为每次更新都会把build后的文件推送到 gh-pages 分支(为了部署到github page) 导致这个分支存的历史数据过大 解决办法是fork仓库的时候选择仅fork main分支即可

mmmray commented 3 weeks ago

since the docs are already deployed to xtls.github.io repo, what is the use in having another gh-pages here?

Artoria2e5 commented 3 weeks ago

并不是历史数据过大:clone --filter=tree:0 基本没有历史数据也要下载 5 MB 的图片!请跑 du -sh **/*.png 调查一下,获取一点发言权。

Fangliding commented 3 weeks ago

since the docs are already deployed to xtls.github.io repo, what is the use in having another gh-pages here?

Because the principle of github page is to publish a branch as a static asset on github.io

mmmray commented 3 weeks ago

what i mean is, in build.yml, the docs are built twice and deployed twice to different targets. once to the gh-pages of xtls.github.io, and once to the gh-pages of this repo. as a result, the docs are accessible from two different places:

https://xtls.github.io/Xray-docs-next/ https://xtls.github.io/

yuhan6665 commented 3 weeks ago

https://xtls.github.io/Xray-docs-next/ was legacy as there was another project for the old doc. Anyone interested can do the clean up thanks!