本地版本上的 Jekyll 到 css/js 的链接已损坏
我使用 Jekyll 来构建我的博客,这是 github 上的代码
当我使用命令 jekyll pygments
生成代码时,它会在_site
目录。
当我在浏览器中打开 _site/index.html 页面时,css/js 链接已损坏,因为它们看起来如下所示,
/css/style.css
要使其正常工作,链接不应以 /
我应该做什么来在本地测试该网站机器有 css/js 的工作链接吗?
谢谢
I use Jekyll to build my blog, here is the code on github
when I generate the code with the command jekyll pygments
, it builds the site in the _site
directory.
when I open the _site/index.html page in a browser, the css/js links are broken because they looks like the following
/css/style.css
to make it works the links should not begin with the /
what should I do to test the site on my local machine with working links to css/js?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,我找到了解决方案:
使用其独立服务器运行 Jekyll
,然后在浏览器中访问
ok i found the solution:
Running Jekyll with its standalone server
and then access in the browser at