Jekyll page failing on github but works successfully locally with --safe flag - syntax-highlighting

I have a Jekyll based post which works successfully when running locally with the --safe flag on. However, the page build fails on github pages. I am not using any plugins either. Can someone please help me figure out what is not compatible with github? Their page is not very helpful. I'm already following their advice of not plugins and using --safe locally to test before committing.
Link to my post: https://raw.github.com/danishm/danishm.github.com/master/_posts/2012-07-23-maintaning-read-more-links-when-moving-from-drupal-to-jekyll.md
Could it be the usage of {% raw %}? or the fact that I am trying to talk about liquid template code itself and trying to syntax highlight it

The issue is due to the fact that github pages uses liquid 2.2.2 and my local install was using liquig 2.3.0. The filter {% raw %} is new in 2.3 and not available in 2.2.2. In version 2.2.2, you need to use {% literal %} instead.
Once I made that change, the page got built successfully on github pages and is now visible on my blog.
I was also able to reproduce the issue locally by installing Jekyll 0.11.0 and liquid 2.2.2, which is what github pages use.

Not sure, but there might be something wrong on GitHub, their status page shows that there was some problems with Pages (25th Jul 2012), that should be fixed now, but I still have same issues as you, pages won't compile, and local run w/ jekyll --pygments --safe works fine.

If you had used Jekyll version 1.0 at the beginning, you may config 'auto' option in _config.yml file. But the current version of Jekyll is 1.2.x, so this option is depreciated. In my case, it made my errors: successfully in local but not working in git page. The solution is so easy, just comment this line: "auto:true". Everything seems OK. In more details, you must comment that line to turn on Auto-regeneration feature which allow the server regenerate html pages automatically.

Related

Unable to load the markdown code locally using jekyll

I am trying to locally host some git-hub pages served using Jekyll. It displays the theme and all, but breaks the place where markdown code is written. Snapshot below:
A snippet of the markdown code is below:
Can someone help me understand what might be going wrong?
System Specs: Ubuntu 16.04, Jekyll version 2.5, ruby 2.3.lp112
First of all, your Jekyll version is way too old.
Secondly, ensure that your page contains front matter dashes at the very top:
---
title: My Page
---
Page content
Then ensure your code-blocks are formatted properly and closed properly:
```<lang>
<code contents>
```

Jekyll blog theme now showing blog posts on GitLab Pages

I've been using the Emerald jekyll theme for my blog on GitHub Pages. It all works great on GitHub, but I've wanted to move to GitLab.
I got the blog working with all necessary gems (like jekyll and jekyll-paginate), but the blog posts aren't working and I get 404.
Test it live here
I made the repo public so everyone can have a look and possibly identify my problem.
Just add a .html extension to your links.
https://remieditor.gitlab.io/blog/plausible-gitlab-moving.html
Github provides an option for serving without the extension, however I don't believe that Gitlab allows this yet. See this thread: https://gitlab.com/gitlab-org/gitlab-pages/issues/95
Change your permalink configuration:
permalink: /:title:output_ext
Since GitLab 11.8 (February 2019) this should work
.html extensions are now automatically resolved for Pages sites
A file in your Pages site called /sub-page.html can now also be accessed as /sub-page, giving you more options over how your site appears to your users.
See documentation and gitlab-org/gitlab-pages issue 95

Ruby Webdrivers Gem Cannot Reach Site

I am using the webdrivers gem for Ruby (not selenium webdriver) https://rubygems.org/gems/webdrivers/versions/3.2.0
I can get the gem to update chrome fine, it places it in webdrivers new directory and sees the version of the chrome driver. I only used the update and latest methods on Webdrivers::Chromedriver. My issue is when trying to get the Webdrivers::Geckodriver installed (firefox). I get the error message: Cannot reach site. The documentation is a little lacking, does anyone know the proper setup for firefox? or why i get this error?
First, update to the latest version, there are a couple minor bugs that were fixed since your version.
You should only be seeing that error if the gem can't access the github site where mozilla stores its release binaries. So very likely a temporary issue.
If it isn't already working again, set Webdrivers.logger.level = :debug to get more info about what is happening, and we can debug it.

Jekyll not Generating Folders

I am trying to use Jekyll to build my portfolio site which is hosted through Github Pages. However, after going through the setup process and watching some tutorials this is what I have in my project folder:
As you'll notice, it seems to be missing some important folder such as _layouts, but it also seems to be working fine. What am I missing here?
The tutorials or docs you saw may be missing gem themes, Jekyll 3.2.0 introduced gem based themes: By default you won't have these typical directories:
/assets
/_layouts
/_includes
/_sass
But you can always overwrite them or copy to your jekyll instance to modify them.

Octopress - Generating blank files

Asked this on superuser.com, not sure if stackoverflow is a better suitable place for it, but I am not getting any answers yet:
===
I am trying to generate a new blog entry in my octopress setup, but I noticed that some previous posts are being generated as empty files in public, so are the new ones I am trying to generte.
There seems to be no difference at all between the markup files from one entry which is being properly generated to another that isn't
I've got two octopress installations, one's working and this one I am talking about isn't, updates octopress on both, reinstalled bundle but no luck, files as atom.xml are also not being generated correctly.
Also updated from ruby 1.9.2p290 to latest release from 1.9.3 but also did not difference.
Anyone's encountered this before?
===
This is most likely because you started using codeblocks. This was happening to me, and even posts/pages that didn't use codeblocks would fail to generate. My problem (on Windows) was that I didn't even have Python installed (thought I did). Installing it fixed the problem, then gave me another error, which was fixed by updating the pygments.rb (note .rb) gem. Doing these two things fixed all my problems.
There's a similar issue if you're on arch linux which defaults python to version 3 which isn't supported by pygments.rb yet. You'll have to look around to figure out how to fix that to use 2.7 instead, but it should be pretty straightforward.
Can you provide an example of: a) a post that doesn't generate correctly, and b) a post that does generate correctly?
I assume they are just individual posts (and not, for example, pages like /about/). I would also assume that they render as blank both in the blog index on your front page and on the individual post page.
Also - what does render? Is it rendering the rest of the page, but just without the "content" of the post itself? Or does the page not even exist? (404?)

Resources