我添加了要在主页上显示的视频的元数据,如下所示:
index.html的:
---
layout: default
title: lorem ipsum
description: |
loren ipsum dolor sit amet, consectetur adipiscing elit.
Pellentesque rutrum lacus sed quam pulvinar cursus. Fusce dictum dolor.
animVideo:
mp4: /videos/Satoshi-intro.mp4
webm: /videos/Satoshi-intro.webm
ogv: /videos/Satoshi-intro.ogv
poster: /videos/Satoshi-intro.png
(...more data)
---
{% include hero-slider.html %}
<div class="section text-center bg-gray" id="content" >
<div class="container">
...
{% include why-use-s.html %}
当我运行'bundle exec jekyll serve'时,我得到错误:
Liquid Exception: couldn't find file '' in `index.html' Checked in these paths: /var/etcetcetc ...
jekyll 3.8.1 | Error: couldn't find file '' in `index.html'
我可以确认错误是由于上面添加的元数据 animVideo
. 没有它,该网站运行良好 . 但是,添加了视频文件后,我收到了上述错误 . 视频文件的文件夹路径似乎正确,位于根文件夹 /videos/[files]
上 . 元数据的格式似乎也很好 .
我没有想法,如何进一步,如何调试和找到问题的原因,因此转向Stackoverflow .
谢谢
编辑:根据要求,这是视频嵌入代码(我认为这不是一个令人讨厌的问题 .
为什么使用-s.html:
<div class="container">
{% if page.animVideo %}
<div class="row">
<div class="col-sm-12 text-center">
<video id="introVideo" controls preload="auto" poster="{{ page.animVideo.poster }}">
<source src="{{ page.animVideo.mp4 }}" type="video/mp4"/>
<source src="{{ page.animVideo.webm }}" type='video/webm; codecs="vp8, vorbis"'/>
<source src="{{ page.animVideo.ogv }}" type='video/ogg codecs="theora, vorbis"' />
<!-- Fallback object using Flow Player -->
<object type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf"
width="640" height="360">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf"/>
<param name="allowFullScreen" value="true"/>
<param name="wmode" value="transparent"/>
<param name="flashVars"
value="config={'playlist':[ '{% pic '{{ page.image }}' %}',{'url':'{{ page.animVideo.mp4 }}','autoPlay':true}]}"/>
<img alt="My Movie" src="{{ page.animVideo.poster }}" width="640" height="360"
title="No video playback capabilities."/>
</object>
<!-- Fallback Text -->
Your browser does not appear to support a video.
</video>
</div>
</div>
...
这里是文件夹结构, index.html
在 pages
文件夹中, videos
在根文件夹中:
1 回答
没有代码来调试我只能猜测你有这个自定义标记的问题:
如果
page.image
为null,则pic
标签正在寻找''
,它不存在 .