图标不再渲染(显示为小方块),尽管我所做的唯一更改是从Meteor 0.7.0更新到Meteor 0.7.0.1
我收到这些警告
Resource interpreted as Font but transferred with MIME type text/html: "http://localhost:3000/client/fonts/glyphicons-halflings-regular.woff".
Resource interpreted as Font but transferred with MIME type text/html: "http://localhost:3000/client/fonts/glyphicons-halflings-regular.ttf".
Resource interpreted as Font but transferred with MIME type text/html: "http://localhost:3000/client/fonts/glyphicons-halflings-regular.svg".
这个问题后,我检查了我的目录,但我没有看到那里的问题:
$ ls
total 64
drwxr-xr-x@ 4 bdean staff 136 Oct 22 14:43 private/
-rw-r--r-- 1 bdean staff 93 Dec 11 14:31 smart.json
drwxr-xr-x 3 bdean staff 102 Dec 11 14:31 server/
drwxr-xr-x 3 bdean staff 102 Dec 11 14:31 public/
drwxr-xr-x 5 bdean staff 170 Dec 11 14:31 lib/
drwxr-xr-x 3 bdean staff 102 Dec 11 14:31 collections/
drwxr-xr-x 6 bdean staff 204 Dec 11 14:31 client/
-rw-r--r-- 1 bdean staff 2129 Dec 11 14:31 README.md
-rw-r--r-- 1 bdean staff 31 Dec 11 14:31 .gitignore
drwxr-xr-x 7 bdean staff 238 Dec 11 14:36 .meteor/
-rw-r--r--@ 1 bdean staff 12292 Dec 20 09:09 .DS_Store
drwxr-xr-x 6 bdean staff 204 Dec 24 13:38 packages/
-rw-r--r-- 1 bdean staff 718 Dec 24 13:38 smart.lock
drwxr-xr-x 12 bdean staff 408 Dec 24 14:27 .git/
$ ls public/fonts
lrwxr-xr-x 1 bdean staff 37 Dec 11 14:31 public/fonts@ -> ../packages/bootstrap3-less/lib/fonts
$ ls -f public/fonts/
total 304
drwxr-xr-x 6 bdean staff 204 Dec 11 14:36 ./
drwxr-xr-x 5 bdean staff 170 Dec 11 14:36 ../
-rw-r--r-- 1 bdean staff 20290 Dec 11 14:36 glyphicons-halflings-regular.eot
-rw-r--r-- 1 bdean staff 62850 Dec 11 14:36 glyphicons-halflings-regular.svg
-rw-r--r-- 1 bdean staff 41236 Dec 11 14:36 glyphicons-halflings-regular.ttf
-rw-r--r-- 1 bdean staff 23292 Dec 11 14:36 glyphicons-halflings-regular.woff
您的字体似乎未正确引用:
您的字体在/public/fonts
,但正在请求它们 /client/fonts
.看起来用于字体的路径存在问题。
这是此包的已知问题,请参阅 https://github.com/eprochasson/bootstrap3-less/issues/3。
如果要修复它,则必须更改路径 https://github.com/eprochasson/bootstrap3-less/blob/master/bootstrap.lessimport#L2
所以它是一个本地路径(类似于这样,所以它使用/public/fonts
的文件):
@icon-font-path: "/fonts/";