网站不加载css文件在某一页 [英] Website not loading css files on certain page
问题描述
我正在建立的网站没有加载任何css / javascript文件的某些页面。有问题的页面是markdown的帖子文件。
这里是链接
您可以看到索引页面工作,但博客帖子不。 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
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屋!