Adding Jekyll to an existing website

戏子无情 提交于 2019-12-24 04:01:36

问题


I have a simple website and tried to add a Jekyll blog in it in a new folder blog thus I have run jekyll new blog in the folder /path. However when I'm running the command jekyll build in /path I have these errors:

$ jekyll build
Configuration file: none
Source: /path
Destination: /path/_site
Generating... 
Build Warning: Layout 'post' requested in blog/_posts/2015-06-14-welcome-to-jekyll.markdown does not exist.
Build Warning: Layout 'default' requested in blog/index.html does not exist.
Conversion error: Jekyll::Converters::Scss encountered an error converting 'blog/css/main.scss'.
Conversion error: File to import not found or unreadable: /blog/_sass/base.scss. Load paths: on line 47

I solved the first problem (Configuration file: none) by moving _config.ymlin the parent folder, however I still have problems when requesting layout using

---
layout: default
---

The imports in main.scssare also not working (last error).

If I'm doing the same command jekyll build in /path/blogafter moving again _config.yml, I have no errors. Does someone know how to be able to do a jekyll buildin the parent folder with the configuration I have? Do I have to entirely change the architecture of my website to include a Jekyll blog in it?


回答1:


You config.yml is in /path with

source: /_jekyll
destination: /blog
baseurl: /blog

Your jekyll sources are in /path/_jekyll.

And you generated files will be in /path/blog.

Ready to deploy !



来源:https://stackoverflow.com/questions/30828211/adding-jekyll-to-an-existing-website

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!