Windows:创建Jekyll页面不起作用 [英] Windows: creating Jekyll pages not working

查看:52
本文介绍了Windows:创建Jekyll页面不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法在浏览器中呈现新页面.我在Win7上,并安装了Ruby1.9.3和DevKit.当我创建一个新的Jekyll网站时,一切正常.我在根目录中复制了index.html,并将其重命名为about.html,这样可以正常工作并且能够在浏览器中查看两个页面.我复制了about.html页面并重命名为contact.html,该页面无法继承布局,仅在浏览器中呈现文本内容和Liquid标签.所有这些都在我的本地计算机上.感谢您的任何建议.

Unable to render new page in browser. I'm on Win7 and have Ruby1.9.3 and DevKit installed. When I create a new Jekyll site everything works. I copied the index.html in root and renamed to about.html and that worked and was able to view both pages in the browser. I copied the about.html page and renamed to contact.html and the page fails to inherit the layout and only renders text content and Liquid tags in the browser. All of this is on my local machine. Thanks for any advice.

回购: https://github.com/greenlightjspence/JekyllWin7/

推荐答案

我今天遇到了类似的问题,经过近一个小时的战斗,我终于发现Visual Studio使用"UTF-8带签名"编码保存了文件,问题.帮助将文件编码更改为不带签名的UTF-8".要更改文件编码,请打开文件(在我的情况下为index.html),然后转到文件->高级保存选项.希望它也会对您有帮助.

I had similar problem today and after almost hour fighting with it I finally found that Visual Studio saved my file with 'UTF-8 with Signature' encoding which was causing issues. Changing file encoding to 'UTF-8 without Signature' helped. To change file encoding, open file (index.html in my case) and go to File->Advanced Save Options. Hope it will help you as well.

看起来像Jekyll官方网站上提到的已知问题( http://jekyllrb.com/docs/frontmatter/).

Looks like it's known issue mentioned on official Jekyll site (http://jekyllrb.com/docs/frontmatter/).

这篇关于Windows:创建Jekyll页面不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆