【发布时间】:2014-07-30 03:32:48
【问题描述】:
我今天才开始使用 Jekyll,到目前为止我很喜欢它。
我正在使用默认主题之一(简称为bootstrap-3),就文件结构而言,它似乎编译得很好。
但是,当我在本地服务器(或 github.io)上运行它时,一些文件丢失了,尤其是 Bootstrap 默认提供的 glyphicon 字体。
fonts 文件夹存在于_site/assets 目录以及外部assets 目录中,据我所知,_site 目录的内容是服务器上提供的内容。
但是,当我使用 Google 开发工具查找资产时,我根本找不到字体。 CSS 生成得很好,但字体不是。
有趣的是,当我使用另一个主题(如the-project)时,字体加载正常。
我的bootstrap.min.css里面有glyphicons,我唯一能想到的就是url()的代码错了:
src:url('../fonts/glyphicons-halflings-regular.eot') 在我的bootstrap.css 中,并且我的文件结构设置为父文件夹包含fonts 文件夹。
这是我的目录树:
bootstrap-3
├── bootstrap
│ ├── css
│ │ ├── bootstrap.min.css
│ │ └── bootstrap.theme.min.css
│ ├── fonts
│ │ ├── glyphicons-halflings-regular.eot
│ │ ├── glyphicons-halflings-regular.svg
│ │ ├── glyphicons-halflings-regular.ttf
│ │ └── glyphicons-halflings-regular.woff
│ └── js
│ └── bootstrap.min.js
└── css
└── style.css
还有here is my output site,我想在联系页面的submit 按钮中放置一个字形图标(从主站点看不到,因为我还没有专注于UI)。
有趣的是,当我在按钮中非的某处放置一个字形图标时,它会显示出来。
编辑:哇,不小心在类名中添加了>。
【问题讨论】:
标签: twitter-bootstrap-3 jekyll jekyll-bootstrap