After installing Jekyll the first site I generated (as per tutorial) did not generate underscore folders (_includes, _Layouts, _sass). Only generated _posts.
Any help appreciated.
From version 3.2, those files and folders from the jekyll new command are stored within the Gem-based themes. I answered this here: Jekyll default installation doesn't have _layouts directory
You must be running the recent Jekyll version 3.2, which introduces Gem based themes (from https://jekyllrb.com/docs/themes/):
Jekyll themes package layouts, includes, and stylesheets in a way that can be overridden by your site’s content. The theme is set in _config.yml:
theme: minima
Initial files that were previously in _layouts, _includes, and _sass are now packaged with the theme.
Related
I have a GitHub Pages site that I generated by creating a repository and choosing a theme on GitHub. While the site is technically built using Jekyll, it has no gemfile, and the _config.yml is very concise:
theme: jekyll-theme-dinky
title: "<site name>"
In contrast, proper Jekyll sites created with jekyll new . have proper gemfile and gemfile.lock files, and a verbose _config.yml. Pardon my general ignorance with Jekyll and Ruby, but I assume these are necessary for Jekyll to build the site locally.
Running jekyll serve on a local clone of my site doesn't build the site properly. Yet GitHub's own pipeline can.
The question: Is there a way to locally build and preview my site without adding a gemfile/gemfile.lock and changing _config.yml? I.e. do exactly what GitHub's pipeline does, just on my computer.
I have a jekyll site that I want to deploy as github-pages. It works fine standalone but fails to build within github-pages with the include error from _index.html. I don't even have an _include directory. I am using the minimal-mistakes theme. I have slimmed down my site to the bare bones it can be found at https://github.com/laredo/mm-jekyll
The exact error is: A file was included in index.html that is a symlink or does not exist in your _includes directory.
https://github.com/laredo/mm-jekyll/blob/master/index.html
Looking for suggestions to successfully build the site
In your _config.yml
delete theme: minimal-mistakes-jekyll
add remote_theme: mmistakes/minimal-mistakes
enable jekyll-include-cache in the plugins configuration
Plugins config is now :
plugins:
- jekyll-feed
- jekyll-include-cache
I have a blog based on Jekyll and Minimal Mistakes. It's already hosted in github-pages. I don't know how you started your project, but what worked to me was just clone the minimal mistakes Github repository and change the _config.yml.
i have a mixed situation where i have my custom website generated in a _dev folder, and i want jekyll generated blog files to go in that same folder. of course i don't want jekyll to wipe up any of the files that are already there, but just to wipe up and rebuild the jekyll related files.
i don't want to list all the things i want to keep like this:
keep_files: [js,css,images,*.html]
plus the *.html, while building, throws an error. is there a way to tell jekyll to just wipe up and rebuild the jekyll related files only?
i can't find many options on this on the official documentation.
i'm on jekyll 3.4.3
By default Jekyll deletes the output folder before building the site. Unless you change that behaviour in source code you can build your website in a temporal folder and copy the contents replacing the old files in your website folder.
jekyll build --destination /tmp/jk
cp -r /tmp/jk/* _dev/
This way it will only replace the Jekyll related files.
I created a simple jekyll site as https://github.com/nagachinta/nagachinta.github.io, but throws 404 error. I observed the git commits I made and the commits in the git says.
" A file was included in about.md that is a symlink , doesnot exist in your '_includes', directory."
The file is not a symlink, it's just a real file.
The index files , etc are real files not symlinks.
You're using Jekyll 3.2 locally. This means that you're now using gem based themes. No more _includes, _layouts and _sass folder when you do your jekyll new.
On the other side github pages uses Jekyll 3.1.6 (reference).
So when you pull a site created without _includes, _layouts and _sass folders on github pages, it results in build errors. Your site is not created and you get 404s errors.
If you want to be sure that a site developed locally to work on github pages, you can go with gh-pages gems. See install instructions here.
If you just want to stay with jekyll 3.2 locally and copy themes's files, you can have a look at this answer.
My Code.
https://github.com/shingo-nakanishi/jekyll-dojo/tree/03e7541c602daab320b18ec7545e4259433dcaf4
jekyll work in local but not work github.
The page build failed with the following error:
Your SCSS file css/main.scss has an error on line 36: File to import not found or unreadable: minima. For more information, see https://help.github.com/articles/page-build-failed-invalid-sass-or-scss.
Why work in local? How to work in github?
Jekyll 3.2 use gem based themes but github pages is still at version 3.1.X.
You have to first locate your minima gem :
bundle show minima
Will give you something like /very/long/path/to/2.2.0/gems/minima-1.0.1. You can then copy/paste _includes, _layouts and _sass folders from your gem to your site root from the file explorer.
Or you can do it with the command line from your root :
cd your/root/folder
cp -R `echo "$(bundle show minima)/_*/"` .
cp -R `echo "$(bundle show minima)/assets/"` .
Your site will now work on gh pages. And theme gem is now useless, because overridden by copied files.
Github Pages does not have the gem minima available to it. You'll have to manually import that into your repo
I believe that you used other theme for your blog, if that so, after you create new Jekyll blog, the default theme is 'minima'. If you copied other theme from the zip file, most of them have the css file inside 'public' folder. So just remove your default 'css' folder that existed after created new Jekyll blog because the actual 'css' file that you'll use is inside 'public' folder created by theme author.
Hope this help.