GitHub Pages Jekyll won't build - jekyll

I'm trying to add a new post to a blog using Jekyll and Github Pages (Untouched since 08/2015)
However even though the Travis build passes, the Github Pages build fails without a single error message
I'm guessing it's about some outdated plugins, but I've got no idea what is it
// _config.yml
// Gemfile
Here's the repository:
https://github.com/wende/wende.github.io/

It turns out Github Pages use Jekyll 3.2.1 now. Which requires .config.yml"theme" property to be empty.
Changing theme to theme_settings and all references to it fixed the issue

Related

Setting a GitHub pages site from a Jekyll-generated page

I cannot setup a new Jekyll-based GitHub pages site based on the tutorials I've read. Here is the full list of steps I took:
Ran jekyll new jek_test. This created a new dir.
Used GitHub desktop to create a git repository in that dir, then pushed it to a new git repository, jek_test.
In the project settings GitHub Pages panel, I choose master branch as source.
So far this had no effect I could see. Navigating to https://gadial.github.io/jek_test/ yielded a 404 error.
I added the following two lines to the projects Gemfile:
source "https://rubygems.org"
gem "github-pages", group: :jekyll_plugins
Now, after pushing to GitHub, the https://gadial.github.io/jek_test/ link is working, but the page loaded is obviously incorrect; the CSS is not loaded, the links are wrong, etc.
I guess I am missing several crucial steps, but all the tutorials I've found either go "simply push it and everything will be ok", or seem to assume I am not using a Gem-based theme, meaning all the layouts, css files etc. are explicitly stored in the _layouts directories etc.
Am I going about this the right way? What is the simplest method to get a Jekyll-generated site up and running on GitHub pages?
You are using minima which is the default so, that's not the issue but, if you have a look at your about.md you'll see that it is looking for a layout called page. You currently don't have a _layouts folder
Try creating a folder called _layouts and create a layout in that called page.html with however you want it to display the contents of all files with layout : page
The default page.html can be found here.
You will need to change url to "https://gadial.github.io" and baseurl to "/jek_test".
If this two attributes are not set up properly, Jekyll won't know where to look for your resources.

html-proof jekyll website with .html extension-less internal links

I have created a static website using Jekyll and recently upgraded from Jekyll 2.5.3 to 3.1.1. Since Jekyll version 3 .html extensions are dropped from internal links, which gives us nice urls. This I love.
Since all pages are still created using the html extension, verifying the site using HTML Proofer now fails, because it detects dead links.
This breaks my continuous integration system (setup according to jekyllrb ci docs) on Travis CI.
So, I love the .html-less links AND that html-proofer checks my internal links. But how do can I verify the .html-less links using html-proofer?
There is a Jekyll talk on this subject; as well as a Github PR. Neither helps me very much.
I've got a new working PR for this in https://github.com/gjtorikian/html-proofer/pull/311. You can use it like this until it gets merged:
Gemfile: gem 'html-proofer', github: "Floppy/html-proofer", branch: "jekyll-3-extensionless-links"
It adds a assume_extension option: HTML::Proofer.new("./_site", assume_extension: ".html").run
Or you can use the --assume-extension=.html command line switch if you're using the binary.
Edit: this was released and available in html-proofer 3.0.4 I'm currently using. The api is slightly different, assume_extension has become a switch, defaulting to false. So you'd do:
HTML::Proofer.new("./_site", assume_extension: true).run
or
htmlproofer ./Site --assume-extension
It works in combination with the extension options if you'd like a different extension for your pages than the default .html.

Jekyll-Redirect-From Redirects Not Being Applied

I'm contributing to an open source project that has its documentation built in Jekyll and hosted on Github Pages. I'm trying to add a redirect in the documentation, so I've forked it and am using jekyll-redirect-from in the fork. However, the redirect simply doesn't seem to be applied. That is, the jekyll build folder doesn't contain any static file to hold the <meta redirect> html that jekyll-redirect-from is supposed to generate. Instead, when I visite the URI that's supposed to be redirected, I just get a 404.
I've followed all the steps in the jekyll-redirect-from docs, including:
Adding jekyll-redirect-from to the Gemfile (code)
Adding it to my _config.yml file (code)
Adding the redirect_from key to my page's front matter (code)
I'm using jekyll 2.5.0 and jekyll-redirect-from 0.8.0 (the full gemfile is linked above). I'm building the project with bundler (using bundle exec jekyll serve), which is how the project's always been built.
Jekyll isn't showing any errors—the static file that should hold the redirect simply doesn't show up.
I can't for the life of me figure out the problem. Maybe I'm overlooking something obvious, or maybe there's some sort of subtle incompatibility in my dependencies?
D'oh. The issue was that the safe option needed to be set to false for the plugin to run. This tripped me up because I know Github Pages sets safe to false as well, and yet jekyll-redirect-from generally runs there. But that appears to be because GH Pages has made an explicit exception to allow it.
My issue was that I had:
redirect_from: /a/path/
redirect_from: /other/path
And repeated directives don't work like that in YAML.
Instead, it should be:
redirect_from:
- /a/path/
- /other/path

The tag `img` is not a recognized Liquid tag GitHub pages with Octopress

I have created a post which has some image tags. These images are getting displayed at local rake preview.
Here is the code in the post
{% img left /images/books_1.png 220 300 %}
{% img left /images/books_2.png 220 300 %}
{% img /images/books_3.png 220 300 %}
But when I push to github pages. Git hub sent me build failure error saying.
The tag img in 'source/_posts/2014-11-29-pages.markdown/#excerpt' is not a recognized Liquid tag.
Am i need to add any plugin to use img tag in github pages?
This bit me recently when I updated my blog and started getting page build errors all of a sudden. It turns out that GitHub Pages recently changed to automatically build any content included in the repo.
The reason it fails is that Octopress is not supported (directly) by GH pages -- GH Pages supports a relatively small number of plugins, and Octopress is not one of them.
The solution for me was to create and commit a file named ".nojekyll" in the root of the blog (as mentioned in the link).
Just to be clear -- when you use Octopress you're generating all the html for the blog locally and pushing that generated html to GitHub Pages. So, GH doesn't need to do any rendering on the markdown files -- that is all being done on your local machine, before GH ever sees it.
Octopress does, however, also commit your blog source to the repo (specifically the "rake deploy" command) -- and with the change to GH Pages, GH tries (and fails) to render the markdown files. The .nojekyll file turns that off, and all is well.
You cannot run octopress plugins on Github pages (see allowed plugins here).
You must use the 'rake generate && rake deploy' command (see Octopress documentation here)

Liquid Exception: Included file _includes/JB/setup not found in

I have been using Jekyll for the past day and it has been working. I added a new file and one of my existing files began receiving the error above. I got Jekyll because it was suppose to be an easy blogging solution. This is not proving true. If I need to learn a framework just to blog I mind as well just use wordpress.
You are trying to perform jekyll serve from inside the _posts/ directory. You can only perform jekyll serve from the root directory.
One of your _layouts, post or page use an {% include JB/setup %} which is supposed to work with Jekyll Bootstrap.
This _layouts, post or page, borrowed from Jekyll Boostrap will certainly need some variables from JB/setup to work as expected.