Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error: undefined method `excerpt_separator' for #<Jekyll::Page> #9544

Closed
remarkablemark opened this issue Feb 7, 2024 · 36 comments
Closed

Comments

@remarkablemark
Copy link

Operating System

Ubuntu 22.04.3

Ruby Version

ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]

Jekyll Version

jekyll 3.9.4

GitHub Pages Version

github-pages 229

Expected Behavior

I expected my site to be built successfully when I run the following:

bundle exec jekyll build --safe

Current Behavior

I get an error when I have an excerpt in a page: remarkablemark/remarkablemark.github.io#71

jekyll 3.9.4 | Error:  undefined method `excerpt_separator' for #<Jekyll::Page>

Relevant log output

Run bundle exec jekyll build --safe
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Configuration file: /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/_config.yml
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
            Source: /home/runner/work/remarkablemark.github.io/remarkablemark.github.io
       Destination: /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
       Jekyll Feed: Generating feed for posts
jekyll 3.9.4 | Error:  undefined method `excerpt_separator' for #<Jekyll::Page @name="404.md">

      head, _, tail = doc_content.to_s.partition(doc.excerpt_separator)
                                                    ^^^^^^^^^^^^^^^^^^
/home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in `extract_excerpt': undefined method `excerpt_separator' for #<Jekyll::Page @name="404.md"> (NoMethodError)

      head, _, tail = doc_content.to_s.partition(doc.excerpt_separator)
                                                    ^^^^^^^^^^^^^^^^^^
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:25:in `initialize'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:173:in `new'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:173:in `replace_relative_links_excerpt!'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:[6](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:7)4:in `replace_relative_links!'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-relative-links-0.[7](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:8).0/lib/jekyll-relative-links/generator.rb:44:in `block in generate'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:39:in `each'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:39:in `generate'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:175:in `block in generate'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:173:in `each'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:173:in `generate'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:70:in `process'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/command.rb:2[8](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:9):in `process_site'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.[9](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:10).4/lib/jekyll/commands/build.rb:65:in `build'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/commands/build.rb:36:in `process'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/gems/jekyll-3.9.4/exe/jekyll:15:in `<top (required)>'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/bin/jekyll:25:in `load'
	from /home/runner/work/remarkablemark.github.io/remarkablemark.github.io/vendor/bundle/ruby/3.1.0/bin/jekyll:25:in `<top (required)>'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:[12](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:13)7:in `invoke_command'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:1[23](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:24):in `with_friendly_errors'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/lib/ruby/gems/3.1.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/bin/bundle:[25](https://github.com/remarkablemark/remarkablemark.github.io/actions/runs/7820440961/job/21335167976?pr=71#step:4:26):in `load'
	from /opt/hostedtoolcache/Ruby/3.1.2/x64/bin/bundle:25:in `<main>'
Error: Process completed with exit code 1.

Code Sample

Steps to reproduce issue

Clone repository:

git clone https://github.com/remarkablemark/remarkablemark.github.io.git
cd remarkablemark.github.io

Checkout branch:

git checkout jekyll-error-undefined-method-excerpt_separator

Build site:

bundle exec jekyll build --safe

See remarkablemark/remarkablemark.github.io#71

@JingshanDu
Copy link

Experiencing the same error.

jekyll 3.9.4 | Error:  undefined method `excerpt_separator" for #<Jekyll::Page @name="404.md">

/opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in `extract_excerpt": undefined method `excerpt_separator" for #<Jekyll::Page @name="404.md"> (NoMethodError)
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:25:in `initialize"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:173:in `new"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:173:in `replace_relative_links_excerpt!"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:64:in `replace_relative_links!"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:44:in `block in generate"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:39:in `each"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:39:in `generate"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:175:in `block in generate"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:173:in `each"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:173:in `generate"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:70:in `process"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-3.9.4/lib/jekyll/command.rb:28:in `process_site"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-3.9.4/lib/jekyll/commands/build.rb:65:in `build"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-3.9.4/lib/jekyll/commands/build.rb:36:in `process"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-3.9.4/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program"
	from /opt/build/cache/bundle/ruby/2.7.0/gems/jekyll-3.9.4/exe/jekyll:15:in `<top (required)>"
	from /opt/build/cache/bundle/ruby/2.7.0/bin/jekyll:23:in `load"
	from /opt/build/cache/bundle/ruby/2.7.0/bin/jekyll:23:in `<main>"
	from /opt/build/cache/bundle/ruby/2.7.0/bin/ruby_executable_hooks:22:in `eval"
	from /opt/build/cache/bundle/ruby/2.7.0/bin/ruby_executable_hooks:22:in `<main>"

@branden1992
Copy link

branden1992 commented Feb 8, 2024 via email

@lidingxu
Copy link

lidingxu commented Feb 8, 2024

I experience a similar problem building my own site. Anyone knows how to resolve this problem?

       Jekyll Feed: Generating feed for posts
jekyll 3.9.4 | Error:  undefined method `excerpt_separator' for #<Jekyll::Page @name="404.md">
/var/lib/gems/3.0.0/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in `extract_excerpt': undefined method `excerpt_separator' for #<Jekyll::Page @name="404.md"> (NoMethodError)
	from /var/lib/gems/3.0.0/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:25:in `initialize'
	from /var/lib/gems/3.0.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:173:in `new'
	from /var/lib/gems/3.0.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:173:in `replace_relative_links_excerpt!'
	from /var/lib/gems/3.0.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:64:in `replace_relative_links!'
	from /var/lib/gems/3.0.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:44:in `block in generate'
	from /var/lib/gems/3.0.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:39:in `each'
	from /var/lib/gems/3.0.0/gems/jekyll-relative-links-0.7.0/lib/jekyll-relative-links/generator.rb:39:in `generate'
	from /var/lib/gems/3.0.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:175:in `block in generate'
	from /var/lib/gems/3.0.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:173:in `each'
	from /var/lib/gems/3.0.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:173:in `generate'
	from /var/lib/gems/3.0.0/gems/jekyll-3.9.4/lib/jekyll/site.rb:70:in `process'
	from /var/lib/gems/3.0.0/gems/jekyll-3.9.4/lib/jekyll/command.rb:28:in `process_site'
	from /var/lib/gems/3.0.0/gems/jekyll-3.9.4/lib/jekyll/commands/build.rb:65:in `build'
	from /var/lib/gems/3.0.0/gems/jekyll-3.9.4/lib/jekyll/commands/build.rb:36:in `process'
	from /var/lib/gems/3.0.0/gems/jekyll-3.9.4/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
	from /var/lib/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
	from /var/lib/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
	from /var/lib/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
	from /var/lib/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
	from /var/lib/gems/3.0.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
	from /var/lib/gems/3.0.0/gems/jekyll-3.9.4/exe/jekyll:15:in `<top (required)>'
	from /usr/local/bin/jekyll:25:in `load'
	from /usr/local/bin/jekyll:25:in `<main>'

@SatyajithBoyana
Copy link

I had the same issue. But I got it to work by rolling back to Jekyll 3.9.3.

@dieghernan
Copy link

Thanks to @SatyajithBoyana suggestion I was able to fix this. Also mentioned in https://talk.jekyllrb.com/t/local-windows-dev-environment-for-github-pages-theme/8938

See dieghernan/chulapa@f508ba1

@pettazz
Copy link

pettazz commented Feb 9, 2024

Also running into this on gh pages, where you cannot specify the Jekyll version

@monfresh
Copy link
Contributor

You can definitely specify the Jekyll version on GitHub Pages, and even use Jekyll 4. The trick is to use GitHub Actions instead of the github-pages gem.

https://github.blog/2022-08-10-github-pages-now-uses-actions-by-default/#how-can-i-upgrade-to-jekyll-4

You can also try my guide, although it's a bit outdated: https://www.moncefbelyamani.com/making-github-pages-work-with-latest-jekyll/

@monfresh
Copy link
Contributor

Also, even if you're still using the github-pages gem, you can specify the Jekyll version by specifying the github-pages gem version. For example, if you set the gem to version 228, it will use Jekyll 3.9.3: https://rubygems.org/gems/github-pages/versions/228

You can pin the version like this in your Gemfile:

gem "github-pages", "=228"

@pettazz
Copy link

pettazz commented Feb 10, 2024

Yes, sure, but I'm just talking about the built in gh pages functionality. I don't want to have to reconfigure the whole site because there appears to be an issue in one version of Jekyll.

Pinning the github-pages version does not appear to work, the builder uses the versions it wants regardless with the message:

Warning: The github-pages gem can't satisfy your Gemfile's dependencies.

I think the gem is meant for easily replicating the builder environment on your local machine rather than telling the builder what to use.

@monfresh
Copy link
Contributor

You're right. I forgot about that, and I even mention it in my guide. That's why I recommend using GitHub Actions since you have more control over the gem versions, and you can take advantage of Jekyll 4's improvements.

Alternatively, as mentioned in my guide, you can build your site locally with Jekyll 3.9.3, and then push the contents of the _site folder to a branch called gh-pages, and GitHub will serve the contents directly without building.

@QuantKang
Copy link

QuantKang commented Feb 10, 2024

A simple way to work around this issue is defining a new workflow by copying Jekyll workflow:

  1. Go to your repository
  2. Click Action menu
  3. Press New workflow button
  4. Search Jekyll
  5. Find the workflow named Jekyll and click Configure button
  6. Press Commit changes

You may need to pull and push from your local repository to sync with the commit.

The workflow seems designed for the latest stable Jekyll. It uses Jekyll 4.3.3.

@pettazz
Copy link

pettazz commented Feb 10, 2024

It's not that simple if you've been dragging the same Jekyll site around for nearly a decade and it doesn't work on 4.x without some changes.

@marksherriff
Copy link

marksherriff commented Feb 10, 2024

For those having this issue specifically with the academicpages template (evidenced potentially by specifically the 404.md file error), it turns out if you remove the excerpt line from 404.md, about.md, and non-menu-page.md, everything deploys properly.

academicpages/academicpages.github.io#1878

@ayrat555
Copy link

after hours of debugging I was able to fix it - ayrat555/ayrat555.github.io@eae9cdc

I added a custom workflow suggested in #9544 (comment)

had to modify gem and config files

also, had to modify the source of the github pages in config

image

paiforsyth added a commit to paiforsyth/paiforsyth.github.io that referenced this issue Feb 10, 2024
juliusgarbe added a commit to juliusgarbe/juliusgarbe.github.io that referenced this issue Feb 10, 2024
juliusgarbe added a commit to juliusgarbe/juliusgarbe.github.io that referenced this issue Feb 10, 2024
HiltonTod added a commit to HiltonTod/HiltonTod.github.io that referenced this issue Feb 10, 2024
There's a bug in Jekyll version 3.9.4 (recently released), something to do with the Excerpt tag in the metadata.

According to the workaround, removing the Excerpt tag from the 404.md, about.md, and non-menu-page.md should work.

Bug details: jekyll/jekyll#9544

Workaround: academicpages/academicpages.github.io#1878
HiltonTod added a commit to HiltonTod/HiltonTod.github.io that referenced this issue Feb 10, 2024
There's a bug in Jekyll version 3.9.4 (recently released), something to do with the Excerpt tag in the metadata.

According to the workaround, removing the Excerpt tag from files in the _pages directory (ex: 404.md, allyship.md) should work. The error in my build file points to a problem with 404.md (see below).

Bug details: jekyll/jekyll#9544

Workaround: academicpages/academicpages.github.io#1878

First error in the build file:
/usr/local/bundle/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in extract_excerpt': undefined method excerpt_separator' for #<Jekyll::Page @name="404.md"> (NoMethodError)

Second error in the build file, that leads me to think it's all files in the _pages directory.
/usr/local/bundle/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in `extract_excerpt': undefined method `excerpt_separator' for #<Jekyll::Page @name="allyship.md"> (NoMethodError)
HiltonTod added a commit to HiltonTod/HiltonTod.github.io that referenced this issue Feb 10, 2024
There's a bug in Jekyll version 3.9.4 (recently released), something to do with the Excerpt tag in the frontmatter (metadata).

According to the workaround, removing the Excerpt tag from the 404.md, about.md, and non-menu-page.md should work. The error in my first build points to a problem with 404.md (see below), but after fixing that the error went to allyship.md. I think the Excerpt tag needs to be removed from all files under the _pages directory.

I removed it from several of the .md files, but it's still present in a few of them and the build is breaking on those.

Bug details: jekyll/jekyll#9544

Workaround: academicpages/academicpages.github.io#1878

Error in the build file first time:
/usr/local/bundle/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in extract_excerpt': undefined method excerpt_separator' for #<Jekyll::Page @name="404.md"> (NoMethodError)

Error in the build file second time:
/usr/local/bundle/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in extract_excerpt': undefined method excerpt_separator' for #<Jekyll::Page @name="allyship.md"> (NoMethodError)

Error in the build file third time:
/usr/local/bundle/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in `extract_excerpt': undefined method `excerpt_separator' for #<Jekyll::Page @name="discoveries.md"> (NoMethodError)
HiltonTod added a commit to HiltonTod/HiltonTod.github.io that referenced this issue Feb 10, 2024
There's a bug in Jekyll version 3.9.4 (recently released), something to do with the Excerpt tag in the frontmatter (metadata).

According to the workaround, removing the Excerpt tag from the 404.md, about.md, and non-menu-page.md should work. The error in my first build points to a problem with 404.md (see below), but after fixing that the error went to allyship.md. I think the Excerpt tag needs to be removed from all files under the _pages directory.

I removed it from several of the .md files, but it's still present in a few of them and the build is breaking on those.

Bug details: jekyll/jekyll#9544

Workaround: academicpages/academicpages.github.io#1878

Error in the build file first time:
/usr/local/bundle/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in extract_excerpt': undefined method excerpt_separator' for #<Jekyll::Page @name="404.md"> (NoMethodError)

Error in the build file second time:
/usr/local/bundle/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in extract_excerpt': undefined method excerpt_separator' for #<Jekyll::Page @name="allyship.md"> (NoMethodError)

Error in the build file fourth time:
/usr/local/bundle/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in `extract_excerpt': undefined method `excerpt_separator' for #<Jekyll::Page @name="kimber.md"> (NoMethodError)
HiltonTod added a commit to HiltonTod/HiltonTod.github.io that referenced this issue Feb 10, 2024
There's a bug in Jekyll version 3.9.4 (recently released), something to do with the Excerpt tag in the frontmatter (metadata).

According to the workaround, removing the Excerpt tag from the 404.md, about.md, and non-menu-page.md should work. The error in my first build points to a problem with 404.md (see below), but after fixing that the error went to allyship.md. I think the Excerpt tag needs to be removed from all files under the _pages directory.

I removed it from several of the .md files, but it's still present in a few of them and the build is breaking on those.

Bug details: jekyll/jekyll#9544

Workaround: academicpages/academicpages.github.io#1878

Error in the build file first time:
/usr/local/bundle/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in extract_excerpt': undefined method excerpt_separator' for #<Jekyll::Page @name="404.md"> (NoMethodError)

Error in the build file second time:
/usr/local/bundle/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in extract_excerpt': undefined method excerpt_separator' for #<Jekyll::Page @name="allyship.md"> (NoMethodError)

Error in the build file third time:
/usr/local/bundle/gems/jekyll-3.9.4/lib/jekyll/excerpt.rb:135:in `extract_excerpt': undefined method `excerpt_separator' for #<Jekyll::Page @name="reads.md"> (NoMethodError)
HiltonTod added a commit to HiltonTod/HiltonTod.github.io that referenced this issue Feb 10, 2024
@parkr parkr mentioned this issue Feb 13, 2024
veelenga added a commit to veelenga/veelenga.github.io that referenced this issue Feb 13, 2024
coduinix added a commit to coduinix/coduinix.github.io that referenced this issue Feb 13, 2024
GitHub pages build failed because of some Jekyll version issue

See for more info: jekyll/jekyll#9544
juhannc added a commit to juhannc/juhannc.github.io that referenced this issue Feb 13, 2024
phasefactor added a commit to phasefactor/minimal-jekyll that referenced this issue Feb 13, 2024
Fixing error caused by GitHub's Jekyll upgrade:
jekyll/jekyll#9544
mikeoleary added a commit to mikeoleary/mikeoleary.github.io that referenced this issue Feb 13, 2024
@yoannchaudet
Copy link

If you build your site with Actions (which is the majority of cases), your build should be fixed now. The change made it in https://github.com/actions/jekyll-build-pages/releases/tag/v1.0.11.

Still deploying the changes to Pages' legacy infrastructure now.

Thanks @parkr for patching Jekyll for us ❤ and sorry for all the troubles.

@toddhgardner
Copy link

@parkr @yoannchaudet I hate to be a pain, but 3.9.5 is broken for me with a new error:

/usr/local/bundle/gems/jekyll-3.9.5/lib/jekyll/excerpt.rb:91: warning: Jekyll::Excerpt#yaml_file? at /usr/local/lib/ruby/2.7.0/forwardable.rb:154 forwarding to private method Jekyll::Page#yaml_file?
  Liquid Exception: undefined method `yaml_file?' for #<Jekyll::Page @name="dpa.md"> in /_layouts/empty.html

That error is from the Github pages build, and I see the same error locally with 3.9.5 on multiple sites. I don't think that's an issue with my setup, but for completeness, here is what those files look like for me:

/_layouts/empty.html is my basic layout, it has no front-matter

<!DOCTYPE html>
<html lang="en" class="no-js">
  {% include head.html %}
  <body class="{{ layout.body_class }} {{ page.body_class }} preload">
    <script>document.documentElement.classList.remove("no-js");</script>
    {{ content }}
    {% include scripts.html %}
    <script>document.body.classList.remove("preload");</script>
  </body>
</html>

dpa.md is a regular page in my site. Here is the start of the file

---
layout: policy
title: Data Processing Agreement
excerpt: "Standard agreement for the processing of Customer Data"
permalink: /dpa/
download: "/assets/documents/requestmetrics-dpa-v3.0.pdf"
sitemap:
  priority: 0.5
redirect_from:
  - /gdpr/
---

# Data Processing Agreement
Revision 3.0

@remarkablemark
Copy link
Author

I can confirm I am getting the same error as @toddhgardner after upgrading github-pages to 230 in remarkablemark/remarkablemark.github.io#71 (comment)

tiagomms pushed a commit to tiagomms/xr-portfolio that referenced this issue Feb 13, 2024
@chadpav
Copy link

chadpav commented Feb 13, 2024

Not regretting my decision to spend 5 minutes moving to a custom GitHub action and controlling what version of Jekyll is used.

@yoannchaudet
Copy link

@chadpav This is the way 🙈.

@toddhgardner Thanks for providing an example that trips the exception. I'll try and revert jekyll-relative-links to 0.6.1. I suspect this is the root cause of the issues we are seeing (changelog).

tianyun-zhang added a commit to tianyun-zhang/tianyun-zhang.github.io that referenced this issue Feb 14, 2024
lorenzo-crippa added a commit to lorenzo-crippa/lorenzo-crippa.github.io that referenced this issue Feb 14, 2024
Solve the problem where jekyll would fail now at building pages because of not finding the command "excerpt." Problem is documented here: https://stackoverflow.com/questions/77972098/github-jekyll-page-build-keeps-failing and jekyll/jekyll#9544 and academicpages/academicpages.github.io#1878
ShaneCurcuru added a commit to ArlingtonMA/arlingtonma.info that referenced this issue Feb 14, 2024
@ShaneCurcuru
Copy link

(aside) I totally get "you should just use a GH Pages Action like so..." But the popularity - and simplicity! - of GH Pages "just working out of the box" is huge, and it was disappointing (on GH's part, really, not your's!) that this now suddenly is breaking deploys to GHPages sites people thought were zero maintenance.

In any case, thanks Jekyll peeps for building and maintaining such an awesome system! 🥰

@yoannchaudet
Copy link

Second time a charm?

We sent pages-gem v231 everywhere. It reverted (for now) jekyll-relative-links to the previous release. Hopefully that clears up all the issues.

Let us know!

@remarkablemark
Copy link
Author

Thanks @yoannchaudet! I can confirm that this fixed the issue for me: remarkablemark/remarkablemark.github.io#71

@ozkary
Copy link

ozkary commented Feb 15, 2024

Yes, the pages are building now. Thanks for the fix.

shuai-zhou added a commit to shuai-zhou/shuai-zhou.github.io that referenced this issue May 12, 2024
See discussion here: jekyll/jekyll#9544 (comment)

See what I did according to this remedy: jekyll/jekyll#9544 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests