网站不加载css文件在某一页 [英] Website not loading css files on certain page

查看:133
本文介绍了网站不加载css文件在某一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立的网站没有加载任何css / javascript文件的某些页面。有问题的页面是markdown的帖子文件。

这里是链接



http://joshhornby.co.uk/



您可以看到索引页面工作,但博客帖子不。 href 不以开头

解决方案

/ 也不是绝对的( http:// ),因此它将使用相对于当前页面的路径。



它在文件夹 http://joshhornby.co.uk/2012/11/14/中查找CSS



之前的样式表/ 之前添加 / href ,你应该是好的。


The site i am building isn't loading any css/javascript file for certain pages. The pages in question are the markdown post files. I am using Jekyll to build the site.

Here is the link

http://joshhornby.co.uk/

As you can see the index page works but the blog posts dont.

解决方案

your href does not start with / nor is it absolute (http://) so it will use a path relative to the current page.

It is looking for CSS in the folder http://joshhornby.co.uk/2012/11/14/

Add / before your stylesheet/ in the href and you should be good.

这篇关于网站不加载css文件在某一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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