Jekyll Page Build Failure: a generic error

I keep getting page build failure messages with Jekyll Hackers theme.

(The page build failed for the main branch with the following error:

Page build failed. For more information, see …)

I checked my _config. and Gemfile but am not sure what’s the problem. Could anyone check what I missed? Or which file to check?

My repo: My Repo
My config:

Settings

title: “Data Journey”
description: “Blog on C S”
show_downloads: true
google_analytics:
theme: hacker

Where things are

source : .
destination : ./_site
collections_dir : .
plugins_dir : _plugins # takes an array of strings and loads plugins in that order
layouts_dir : _layouts
data_dir : _data
includes_dir : _includes
sass:
sass_dir: _sass
collections:
posts:
output : true

Handling Reading

safe : false
include : [".htaccess"]
exclude : [“Gemfile”, “Gemfile.lock”, “node_modules”, “vendor/bundle/”, “vendor/cache/”, “vendor/gems/”, “vendor/ruby/”]
keep_files : [".git", “.svn”]
encoding : “utf-8”
markdown_ext : “markdown,mkdown,mkdn,mkd,md”
strict_front_matter : false

Filtering Content

show_drafts : null
limit_posts : 0
future : false
unpublished : false

Plugins

whitelist : []
plugins :

  • jekyll-seo-tag
  • jekyll-sitemap
  • jekyll-gist
  • jekyll-feed
  • jekyll-include-cache

Conversion

markdown : kramdown
highlighter : rouge
lsi : false
excerpt_separator : “\n\n”
incremental : false

Serving

detach : false
port : 4000
host : 127.0.0.1
baseurl : “” # does not include hostname
show_dir_listing : false

Outputting

permalink : date
paginate_path : /page:num
timezone : null

quiet : false
verbose : false
defaults : []

liquid:
error_mode : warn
strict_filters : false
strict_variables : false

Markdown Processors

kramdown:
auto_ids : true
entity_output : as_char
toc_levels : [1, 2, 3, 4, 5, 6]
smart_quotes : lsquo,rsquo,ldquo,rdquo
input : GFM
hard_wrap : false
footnote_nr : 1
show_warnings : false
math_engine: mathjax
syntax_highlighter: rouge

My Gemfile:

frozen_string_literal: true

source ‘https://rubygems.org
gemspec
gem ‘github-pages’, group: :jekyll_plugins
gem ‘jekyll-seo-tag’
gem ‘jekyll-sitemap’
gem ‘jekyll-gist’
gem ‘jekyll-feed’
gem ‘jekyll-include-cache’

Thank you very much!

Have you tried building the site locally on your system?
That may provide you with more information.

1 Like

An error message is a lot more useful than very detailed info about your system that is difficult to use and may not be relevant.

As recommended, run locally.

bundle exec jekyll build --trace

Also you have a CI flow setup so check out the Actions tab and the latest commit to see the log.

It which tells me you have insufficient permissions on the bootstrap script on your build step.

build: scripts/bootstrap

Which can be solved with changing executable permissions locally

chmod +x scripts/bootstrap
git commit .
git push

Or change the line to:

build: sh scripts/bootstrap

Here is the log.

Separately, your repo has a lot of content that came from the theme and it makes your repo heavier to work with and hard to get changes when the theme is updated.

For your next Jekyll project, consider installing a theme as

# _config.yml
remote_theme: some-gh-user/jekyll-hacker-theme

Or if using GitHub Actions or Netlify to install from RubyGems where the theme is uploaded as a gem.

# _config.yml
theme: jekyll-hacker-theme

# Gemfile
gem "jekyll-hacker-theme", "1.2.3"

Then when your repo can be focused on your config and your content. Let the theme take care of layouts and plugins and includes. And you can always override or add to those folders in your project

That also means you can swap out a theme by changing a few lines only. Making your project flexible.

Thank you very much!!
sh script/bootstrap and sh script/cibuild worked for me.
Also, working in local gave me more info on error so I could solve some problems.

I truly appreciate your advice on how to make repo lighter, as I was thinking about that, too!!

Again, thank you very much!!

1 Like

I am glad to hear that worked

Regarding installing a theme, I have two flows documented here in a README. The Remote Theme one for GH Pages and a gem install flow for CI builds

If you see the gh-pages branch you’ll see a very light project which installs from the theme on master using the Remote Theme flow.

1 Like

Thanks a lot for your resources!!!

1 Like