我正在使用 Jekyll 制作一个简单的静态网站。
当我的项目根目录中有 Jekyll HTML 文件(与 _layouts 文件夹和配置文件位于同一文件夹中)时,它们会完美呈现,我可以在 http://localhost:4000/welcome.html 立即。
我开始在根目录中获取大量文件,并希望将动态文件组织到文件夹中。
因此,当我将文件移动到子文件夹中时,Jekyll 会停止更新它。我可以看到我以前的编辑(从它位于根目录时开始),但如果我进行任何编辑,它不会更新。
http://localhost:4000/mydirectory/welcome.html - 返回 404
我应该编辑吗配置文件来检查这些文件夹?类似 -
source: [mydirectory1,mydirectory2]
或者我错过了一些明显的东西?
I'm using Jekyll to make a simple static site.
When I have Jekyll HTML files on the root of my project (in the same folder as the _layouts folder & config file) they render perfectly and I can preview them on http://localhost:4000/welcome.html instantly.
I'm starting to get alot of files on the root and want to organize the dynamic files into folders.
So, when I move a file into a subfolder Jekyll stops updating it. I can see my previous edits ( from when it was on the root ) but if I make any edits, it doesn't update.
http://localhost:4000/mydirectory/welcome.html - returns a 404
Should I be editing the config file to check for these folders? Something like -
source: [mydirectory1,mydirectory2]
Or am I missing something obvious?
发布评论
评论(1)
我假设您已经运行 jekyll --server 来检查这一点?
我刚刚检查了我的目录设置,并且 config.yaml 中没有任何内容告诉它在哪里查找。如果您从存储所有内容的目录运行 jekyll --server ,它只会递归地查找所有内容并根据每种文件类型的规则对其进行处理。
您是否从正确的目录运行 jekyll --server ?
I assume you've run jekyll --server to check this?
I just checked my directory settings and I don't have anything in config.yaml that tell it where to look. If you run jekyll --server from the directory where you are storing everything it just recursively looks through everything and processess it according to the rules it has for each file type.
Are you running jekyll --server from the right directory?