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
Comments
Experiencing the same error.
|
Remove all restrictions
…On Thu, Feb 8, 2024, 1:06 AM Jingshan S. Du ***@***.***> wrote:
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>"
—
Reply to this email directly, view it on GitHub
<#9544 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BEG4CYROEBDKA2GBPHHAWDTYSRTPZAVCNFSM6AAAAABC6OM276VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZTGQYTMNBSGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I experience a similar problem building my own site. Anyone knows how to resolve this problem?
|
I had the same issue. But I got it to work by rolling back to Jekyll 3.9.3. |
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 |
Also running into this on gh pages, where you cannot specify the Jekyll version |
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. You can also try my guide, although it's a bit outdated: https://www.moncefbelyamani.com/making-github-pages-work-with-latest-jekyll/ |
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" |
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
I think the gem is meant for easily replicating the builder environment on your local machine rather than telling the builder what to use. |
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 |
A simple way to work around this issue is defining a new workflow by copying
You may need to The workflow seems designed for the latest stable Jekyll. It uses Jekyll 4.3.3. |
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. |
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. |
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 |
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
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)
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)
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)
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)
GitHub pages build failed because of some Jekyll version issue See for more info: jekyll/jekyll#9544
Fixing error caused by GitHub's Jekyll upgrade: jekyll/jekyll#9544
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. |
@parkr @yoannchaudet I hate to be a pain, but 3.9.5 is broken for me with a new error:
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
dpa.md is a regular page in my site. Here is the start of the file
|
I can confirm I am getting the same error as @toddhgardner after upgrading |
Not regretting my decision to spend 5 minutes moving to a custom GitHub action and controlling what version of Jekyll is used. |
@chadpav This is the way 🙈. @toddhgardner Thanks for providing an example that trips the exception. I'll try and revert |
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
(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! 🥰 |
Second time a charm? We sent Let us know! |
Thanks @yoannchaudet! I can confirm that this fixed the issue for me: remarkablemark/remarkablemark.github.io#71 |
Yes, the pages are building now. Thanks for the fix. |
See discussion here: jekyll/jekyll#9544 (comment) See what I did according to this remedy: jekyll/jekyll#9544 (comment)
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#71Relevant log output
Code Sample
Steps to reproduce issue
Clone repository:
git clone https://github.com/remarkablemark/remarkablemark.github.io.git cd remarkablemark.github.io
Checkout branch:
Build site:
bundle exec jekyll build --safe
See remarkablemark/remarkablemark.github.io#71
The text was updated successfully, but these errors were encountered: