I have a message from github telling me that my page build failed.
Without any more information. :(
Of course I have read this page...
But how can I have more info on what's going wrong?
It builds really fine locally:
jekyll build
Configuration file: /srv/jekyll/_config.yml
Source: /srv/jekyll
Destination: /srv/jekyll/_site
Incremental build: disabled. Enable with --incremental
Generating...
Building site for default language: "fr" to: /srv/jekyll/_site
Loading translation from file /srv/jekyll/_i18n/fr.yml
GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
Building site for language: "en" to: /srv/jekyll/_site/en
Loading translation from file /srv/jekyll/_i18n/en.yml
Build complete
done in 1.265 seconds.
Auto-regeneration: disabled. Use --watch to enable.
Here's my _config.yml:
title: My site
description: My description
email: email#example.com
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: example
github_username: example
# Build settings
markdown: kramdown
theme: minima
plugins:
- jekyll-feed
- jekyll-multiple-languages-plugin
- jekyll-redirect-from
languages: ['fr', 'en']
exclude_from_localizations: ['assets', 'CNAME']
defaultLang: fr
languageNames:
fr: Français
en: English
it: Italiano
Any tip?
Cheers
The plugin jekyll-multiple-languages-plugin is not supported by GitHub Pages.
Test if your site builds fine locally with github-pages gem instead of jekyll gem
Related
I'm unable to see the index.html get rendered with jekyll's front matter. In fact, the front matter is all I see on the webpage.
Here is the folder layout:
and the _config.yml:
title: badabing badaboom
email: xyz#gmail.com
description: tbd
#baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username:
github_username:
encoding: utf-8
# Build settings
theme: jekyll-theme-clean-blog
plugins:
- jekyll-feed
remote_theme: StartBootstrap/startbootstrap-clean-blog-jekyll
# Exclude from processing.
# The following items will not be processed, by default.
# Any item listed under the `exclude:` key here will be automatically added to
# the internal "default list".
#
# Excluded items can be processed by explicitly listing the directories or
# their entries' file path in the `include:` list.
Any ideas on how I could fix this, or what I should look into?
My god... *facepalm
I just needed to get rid of .nojekyll
GitHub Pages will use Jekyll to build your site by default. If you
want to use a static site generator other than Jekyll, disable the
Jekyll build process by creating an empty file called .nojekyll in the
root of your publishing source, then follow your static site
generator's instructions to build your site locally.
I have installed the jekyll-compose gem to streamline creating pages, posts etc. In the documentation. I have it working (i.e using the CLI commands I am able to generate, drafts, posts and pages).
However when I generate a post for example, I want it to have certain variables in the front matter. There is functionality mentioned in the ReadMe of Jekyll Compose that says you can set front matter defaults for posts and for drafts.
I have followed the instructions by adding the required lines in the config.yaml of my site, however posts and drafts that I generate using jekyll-compose do not generate with the variables I want.
Jekyll-compose states that if you want default front matter variables you need add something like this to your _config.yaml:
jekyll_compose:
default_front_matter:
drafts:
description:
image:
category:
tags:
posts:
description:
image:
category:
tags:
published: false
sitemap: false
I have tried both their default config above and also my own below
jekyll_compose:
default_front_matter:
drafts:
main_img_url:
author_name:
categories:
description:
posts:
main_img_url:
author_name:
categories:
description:
But neither work when I generate a new post or draft. There are no error messages which makes it difficult to debug.
Originally my Jekyll version was at 3.7.0, I thought it might be an problem of a Jekyll version being too old. However this problem persisted when I updated Jekyll to 3.8.6.
It also does not work when I put default values for my custom variables, i.e:
jekyll_compose:
default_front_matter:
drafts:
main_img_url: "https://images-we-got-pop.imgix.net/website/blog/pop-logo-small.png"
author_name: "Me"
categories: "general"
description: "Description"
posts:
main_img_url: "https://images-we-got-pop.imgix.net/website/blog/pop-logo-small.png"
author_name: "Me"
categories: "general"
description: "Description"
My _config file looks like this:
title: Title
email: your-email#domain.com
description: > # this means to ignore newlines until "baseurl:"
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: name
github_username: name
# Build settings
markdown: kramdown
theme: minima
plugins:
- jekyll-feed
- jekyll-paginate-v2
exclude:
- Gemfile
- Gemfile.lock
- Makefile
- README.md
permalink: /pages/:year/:month/:day/:title/
jekyll_compose:
default_front_matter:
drafts:
main_img_url:
author_name:
categories:
description:
posts:
main_img_url:
author_name:
categories:
description:
future: true
pagination:
enabled: true
sort_reverse: true
trail:
before: 1
after: 1
and my Gemfile looks like this:
source "https://rubygems.org"
ruby RUBY_VERSION
gem "jekyll", "3.8.6"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem "jekyll-paginate-v2", "~> 1.9"
gem 'jekyll-compose', "~> 0.11"
end
I am expecting my custom front matter to appear in my newly generated posts:
---
title: this-is-a-new-post
date: 2019-10-09 10:45 +0100
main_img_url:
author_name:
categories:
description:
---
But I only get the standard ones that get created with the post/draft, eg:
---
title: this-is-a-new-post
date: 2019-10-09 10:45 +0100
---
Any ideas??
Ok I managed to fix this myself after seeing the syntax for the custom variables was different on GH compared to what I found when digging into the jekyll-compose post creation methods on rubydoc.info.
Basically there was PR that changed the syntax merged in to master but not yet released, hence why I was having difficulty getting it to work
The current syntax as of the latest release:
jekyll_compose:
draft_default_front_matter:
description:
image:
category:
tags:
post_default_front_matter:
description:
image:
category:
tags:
published: false
sitemap: false
Compared to the config structure illustrated in the Readme and on master in the jekyll-compose repo, but had't been released at the time when I looked at the docs:
jekyll_compose:
default_front_matter:
drafts:
description:
image:
category:
tags:
posts:
description:
image:
category:
tags:
published: false
sitemap: false
I am trying to implement related_posts-jekyll_plugin plugin to show the related post based on post tag on jekyll blog. When running jekyll server I got following error, how can I solve it?
$ jekyll serve
Configuration file: D:/git/blog/_config.yml
Dependency Error: Yikes! It looks like you don't have D:/git/blog/_plugins/related_posts.rb or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll/post' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
jekyll 3.6.0 | Error: D:/git/blog/_plugins/related_posts.rb
My _config.yml file contains following content.
title: Kiran's blog | Kiran Shahi is a .NET developer from Nepal
email: mail#example.com
description: > # this means to ignore newlines until "baseurl:"
Welcome to kiran's blog. Kiran Shahi is a .NET guy. He is passionate about technology.
baseurl: "/blog" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: itskirans
github_username: kiranshahi
future: true
paginate: 5
# Build settings
markdown: kramdown
gems:
- jekyll-feed
- jekyll-paginate
exclude:
- Gemfile
- Gemfile.lock
Although we can't see your config file, It Looks like you have related_posts.rb in your gem list in your config file. As this plugin is not a gem but just a plugin file you do not need to list it there. Just remove it from that section.
There are so many posts describing this same error, and I have tried to read them all to find out exactly what is causing my error.
I have tried mangling this file eleven different ways, even reverting it back to the original file - still no luck. What am I missing?
The error is supposedly on "line 3 column 22" - which does not exist. I have no jekyll parser on the client side, everything is being handled through GitHub Pages.
https://github.com/drovani/drovani.github.io/commits/master/_config.yml
#
# This file contains configuration flags to customize your site
#
# Name of your site (displayed in the header)
name: "Rovani in C#"
# Short bio or description (displayed in the header)
description: "Ostinato, Pensato, Scordatura"
# URL of your avatar or profile pic (you could use your GitHub profile pic)
avatar: https://avatars3.githubusercontent.com/u/898478
#
# Flags below are optional
#
# Includes an icon in the footer for each username you enter
footer-links:
dribbble:
email: dev#rovani.net
facebook:
flickr:
github: drovani
instagram:
linkedin:
pinterest:
rss: # just type anything here for a working RSS icon
twitter: davidrovani
stackoverflow: "users/28310/drovani"
youtube: # channel/<your_long_string> or user/<user-name>
googleplus: # anything in your profile username that comes after plus.google.com/
# Enter your Disqus shortname (not your username) to enable commenting on posts
# You can find your shortname on the Settings page of your Disqus account
disqus: drovani
# Enter your Google Analytics web tracking code (e.g. UA-2110908-2) to activate tracking
google_analytics: UA-82341148-1
# Your website URL (e.g. http://barryclark.github.io or http://www.barryclark.co)
# Used for Sitemap.xml and your RSS feed
url:
# If you're hosting your site at a Project repository on GitHub pages
# (http://yourusername.github.io/repository-name)
# and NOT your User repository (http://yourusername.github.io)
# then add in the baseurl here, like this: "/repository-name"
baseurl: ""
#
# !! You don't need to change any of the configuration flags below !!
#
permalink: /:title/
# The release of Jekyll Now that you're using
version: v1.2.0
# Jekyll 3 now only supports Kramdown for Markdown
kramdown:
# Use GitHub flavored markdown, including triple backtick fenced code blocks
input: GFM
# Jekyll 3 and GitHub Pages now only support rouge for syntax highlighting
syntax_highlighter: rouge
syntax_highlighter_opts:
# Use existing pygments syntax highlighting css
css_class: 'highlight'
# Set the Sass partials directory, as we're using #imports
sass:
style: :expanded # You might prefer to minify using :compressed
# Use the following plug-ins
gems:
- jekyll-sitemap # Create a sitemap using the official Jekyll sitemap gem
- jekyll-feed # Create an Atom feed using the official Jekyll feed gem
# Exclude these files from your production _site
exclude:
- Gemfile
- Gemfile.lock
- LICENSE
- README.md
- CNAME
Instead of the issue being in the _config.yml file, it was in a completely different file altogether. So, if you get this error message from building a github-pages Jekyll page, don't assume that it is in the only "YAML" file. Search any new file that you have added for a Line 3 Column 22 and that will track down the error.
In my case, it was a title for a post in the front matter had a colon with a space after it - which I needed to put double-quotes around.
I have created a blog using Jekyll now theme. And I've created repo in github to publish the blog. But the posts are not showing in github pages.
repo: https://github.com/mubumbz/blog
blog: http://mubumbz.github.io/blog/
In my case the blog post time was a future date (due to timezone mismatch) hence it was not published though _posts folder had my markdown file
executing 'jekyll build' will give the same message
sachinms#MS:/my-new-blog/my-personal-blog$ jekyll build
Configuration file: /my-new-blog/my-personal-blog/_config.yml
Theme Config file: /home/sachinms/gems/gems/jekyll-theme-chirpy-4.0.1/_config.yml
Source: /my-new-blog/my-personal-blog
Destination: /my-new-blog/my-personal-blog/_site
Incremental build: disabled. Enable with --incremental
Generating...
Skipping: _posts/2021-07-17-Minimal-API-ASPNET-6.md has a future date
done in 0.38 seconds.
Auto-regeneration: disabled. Use --watch to enable.
you must post added _post directory and post name must be year-mouth-day-post_name.md format
after on the blog main directory run command bundle exec jekyll build or jekyll build and push remote repo.