Jekyll custom theme not working on Github pages - jekyll

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.

Related

How can I locally build a GitHub Pages site that has no gemfile?

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.

How can I fix 404 error importing css on GitHub Pages?

I currently have the following Git Repository:
https://github.com/SebastianGode/ansible-collection-cloud/tree/gh-pages
And the GitHub Page link:
https://sebastiangode.github.io/ansible-collection-cloud/
The problem is that GitHub Pages will only solve the index.html and will throw an 404 for all required css and image stuff:
As the documentation is getting automatically generated by a travis-ci pipeline it's probably impossible to change paths, but as it works when hosted it locally it also should work on GitHub pages.
Is there any solution to this problem?
I fixed it.
GitHub has Jekyll running behind it which will mess up special paths (here the underscore paths). You can disable jekyll by just creating a .nojekyll file in the root directory of the branch. If you use travis-CI for something like that and run a tox script just call the command touch {toxinidir}/.nojekyll
This will result in a working website for me.

Editing Jekyll themes for use with Github Pages

I just started working with Github pages and have no prior experience with Jekyll.
I'm trying to edit a github-pages theme to suit my needs. So I cloned it and started editing the default.html file in _layouts. But when I run bundle exec jekyll serve it still generates the original theme's default.html. I even pushed it to the remote and my user website generates the original theme.
The github-pages theme I'm working on is called midnight. And i'm trying to get rid of the nav
Any help would be appreciated

Jekyll theme jekyll-theme-clean-blog wont build on github pages

I downloaded the jekyll-theme-clean-blog theme and successfully built it locally.
Once I move it to github pages, I get the following build error:
Your SCSS file assets/main.scss has an error on line 2: File to import not found or unreadable: ../assets/vendor/startbootstrap-clean-blog/scss/clean-blog.scss. Load paths: _sass /hoosegow/.bundle/ruby/2.7.0/gems/jekyll-theme-primer-0.5.4/_sass /hoosegow/.bundle/ruby/2.7.0/gems/jekyll-theme-primer-0.5.4/_sass.
I added
sass: sass_dir: _sass style: :compressed
to config file, still wont build on github pages.
Any help would be much appreciated.
GitHub Pages only supports a select number of themes (https://pages.github.com/themes/) listed below:
Architect
Cayman
Dinky
Hacker
Leap day
Merlot
Midnight
Minima
Minimal
Modernist
Slate
Tactile
Time machine
The one you've named isn't in that list. Basically this is the same issue as not being able to use Jekyll plugins. The solutions there are to use a different hosting solution, or commit the built output of your site to a repo.

Jekyll blog shows 404 error

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.