我正试图在本地加载我的jekyll网站,但得到以下错误。我不知道从哪里开始,因为有这么多错误。
(base) ➜ angoodkind.github.io git:(master) ✗ bundle exec jekyll serve
Configuration file: /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/_config.yml
Source: /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io
Destination: /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Error reading file /Users/adamg/Dropbox/Website/github_io/angoodkind.github.io/blog/index.html: (<unknown>): did not find expected key while parsing a block mapping at line 7 column 5
### ERROR REPEATED 9 TIMES ###
Liquid Exception: Liquid syntax error (line 8): Unknown tag 'when' in vendor/cache/ruby/2.6.0/gems/liquid-4.0.0/lib/liquid/locales/en.yml
jekyll 3.5.2 | Error: Liquid syntax error (line 8): Unknown tag 'when'
我有一个 index.html
文件,既在我的基础目录下,也在我的 blog/
子目录。我应该看哪些文件?非常感谢所有的指导。
你应该看的文件是 blog/index.html
. 任何Jekyll对你的HTML源的解析都是在看YAML前缀或液体标签(如果你使用它们)。
你不正确地注释了前面的标题照片。
---
layout: page
title: Recent blog posts
<!-- subtitle: Welcome to my winding road, under construction. -->
use-site-title: true
<!-- bigimg:
- "/img/HomeImage.jpg" : "Somewhere in Wyoming (2010)" -->
---
YAML注释和HTML注释是不一样的。虽然这个源文件是一个HTML文件类型,但你正在处理的部分是YAML。根据 本回答在YAML中的注释使用单一的 #
符号来开始一条评论,并一直持续到该行结束。没有多行注释。