[英]Github pages' jekyll creates 1 line HTML files
I am using Github pages to deploy a static website built using jekyll.我正在使用 Github 页面部署使用 jekyll 构建的静态网站。 The porject was forked from https://academicpages.github.io/ (I am a beginner in all of this)
该项目是从https://academicpages.github.io/分叉的(我是这一切的初学者)
For some reason, the "local" (on my machine) behavior of jekyll and the "remote" (ie using Github Actions) behavior are different :出于某种原因,jekyll 的“本地”(在我的机器上)行为和“远程”(即使用 Github 操作)行为是不同的:
Remotely, the built HTML files are 1-liners.远程地,构建的 HTML 文件是 1-liners。 This is quite annoying since Javascript comments (starting with \ and ending at the end of the line) are all over the place.
这很烦人,因为到处都是 Javascript 注释(以 \ 开始并在行尾结束)。
This undesirable behavior is not present locally.这种不良行为在本地不存在。
How can I make configure the jekyll from github pages to behave the same locally and remotely ?如何从 github 页面配置 jekyll 以在本地和远程运行相同?
Cheers,干杯,
Gabriel加布里埃尔
This is due to the compress_html plugin in the production config.这是由于生产配置中的compress_html插件。 The dev config doesn't have this so it doesn't minify locally.
开发配置没有这个,所以它不会在本地缩小。 You could remove the plugin entirely or experiment with options to fit your needs.
您可以完全删除该插件或尝试选择适合您需求的选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.