Adding Jekyll to an existing website

2k Views Asked by At

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

There are 1 best solutions below

2
On BEST ANSWER

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 !