jeffreytse / jekyll-spaceship

πŸš€ A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
MIT License
605 stars 63 forks source link

Undefined method `excerpt_separator` for <#Jekyll::Page ...> #66

Closed jeffreytse closed 2 years ago

jeffreytse commented 2 years ago

This undefined method issue was introduced by 2c008ed commit. The error was as below:

❯ jekyll serve --livereload --trace
  Jekyll Spaceship: πŸš€ Jekyll-Spaceship 0.10.1
  Jekyll Spaceship: πŸŽ‰ A Jekyll plugin to provide powerful supports.
  Jekyll Spaceship: πŸ‘‰ https://github.com/jeffreytse/jekyll-spaceship
Configuration file: /Users/seven/Projects/Me/longavailable.github.io/_config.yml
  Jekyll Spaceship: πŸ—‚  use table-processor
  Jekyll Spaceship: πŸ—‚  use mathjax-processor
  Jekyll Spaceship: πŸ—‚  use plantuml-processor
  Jekyll Spaceship: πŸ—‚  use mermaid-processor
  Jekyll Spaceship: πŸ—‚  use polyfill-processor
  Jekyll Spaceship: πŸ—‚  use media-processor
  Jekyll Spaceship: πŸ—‚  use emoji-processor
  Jekyll Spaceship: πŸ—‚  use element-processor
  Jekyll Spaceship: πŸ—‚  use search-processor
            Source: /Users/seven/Projects/Me/longavailable.github.io
       Destination: /Users/seven/Projects/Me/longavailable.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
       Jekyll Feed: Generating feed for posts
  Jekyll Spaceship: [EmojiProcessor] myCollections/_posts/2020-02-15-add-search-bar.md
  Jekyll Spaceship: [TableProcessor] myCollections/_posts/2019-06-22-docker-commands.md
  Jekyll Spaceship: [TableProcessor] myCollections/_posts/2020-12-29-academic-conferences-on-water-and-environment.md
  Jekyll Spaceship: [TableProcessor] myCollections/_posts/2021-03-13-useful-tools.md
  Jekyll Spaceship: [TableProcessor] myCollections/_posts/2021-03-25-hydrological-models.md
  Jekyll Spaceship: [TableProcessor] myCollections/_posts/2019-11-19-metrics-gis.md
  Jekyll Spaceship: [MathjaxProcessor] myCollections/_posts/2019-11-19-metrics-gis.md
  Jekyll Spaceship: [TableProcessor] myCollections/_posts/2021-04-13-similarity-in-dinamicaego.md
  Jekyll Spaceship: [TableProcessor] myCollections/_posts/2020-10-19-academic-journals-on-water-and-environment.md
  Jekyll Spaceship: [TableProcessor] myCollections/_posts/2020-07-30-free-softwares-for-hydrodynamics.md
  Jekyll Spaceship: [EmojiProcessor] myCollections/_posts/2021-11-08-colon-double-colons-and-ellipsis.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2009-01-01-Impact-of-human-activities-on.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2009-01-01-Spatial-temporal-variations-of-evapotranspiration-in.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2011-01-01-Genetic-algorithms-based-hydropower-optimization.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2011-01-01-Impacts-of-Three-Gorges-Gezhouba-reservoir.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2011-01-01-Impacts-of-the-Gezhouba-and.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2011-01-01-Impacts-of-the-Three-Gorges-Gezhouba.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2012-01-01-Impact-of-the-Three-Gorges.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2012-01-01-Impacts-of-Danjiangkou-reservoir-on.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2012-01-01-Investigation-into-the-impacts-of.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2013-01-01-Investigation-into-the-Impacts-of02.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2013-01-01-Investigation-into-the-impacts-of01.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2014-01-01-Are-droughts-becoming-more-frequent.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2015-01-01-Development-and-application-of-a.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2015-01-01-Drought-assessment-using-a-multivariate.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2015-01-01-Drought-assessment-using-a-multivariate01.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2015-01-01-Drought-assessment-using-a-multivariate02.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2015-01-01-Investigation-into-impacts-of-land-use.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2016-01-01-Drought-assessment-by-a-short-long-term.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2016-01-01-Hydrological-drought-forecasting-and-assessment.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2016-01-01-Potential-evapotranspiration-estimation-in-the.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2016-01-01-Quantifying-the-effect-on-flood.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2017-01-01-Is-the-water-level-during.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2019-01-01-Impacts-of-the-Three-Gorges.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2019-01-01-Potential-impact-of-a-large-scale.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2019-01-01-Responses-of-meteorological-drought-hydrological-drought.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2020-01-01-Assessment-of-potential-ecological-risk.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2020-01-01-Enhanced-potential-ecological-risk-induced.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2020-01-01-Responses-of-storm-based-soil-erosion.md
  Jekyll Spaceship: [TableProcessor] myCollections/_publications/2021-01-01-Assessing-sponge-cities-performance-at.md
bundler: failed to load command: jekyll (/Users/seven/.asdf/installs/ruby/2.6.8/bin/jekyll)
/Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/excerpt.rb:138:in `extract_excerpt': undefined method `excerpt_separator' for #<Jekyll::Page @relative_path="index.html"> (NoMethodError)
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/excerpt.rb:26:in `initialize'
        from /Users/seven/Projects/Me/jekyll-spaceship/lib/jekyll-spaceship/cores/manager.rb:82:in `new'
        from /Users/seven/Projects/Me/jekyll-spaceship/lib/jekyll-spaceship/cores/manager.rb:82:in `block in dispatch'
        from /Users/seven/Projects/Me/jekyll-spaceship/lib/jekyll-spaceship/cores/manager.rb:80:in `each'
        from /Users/seven/Projects/Me/jekyll-spaceship/lib/jekyll-spaceship/cores/manager.rb:80:in `dispatch'
        from /Users/seven/Projects/Me/jekyll-spaceship/lib/jekyll-spaceship/cores/manager.rb:35:in `block in hook'
        from /Users/seven/Projects/Me/jekyll-spaceship/lib/jekyll-spaceship/cores/manager.rb:45:in `block in hook'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/hooks.rb:102:in `block in trigger'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/hooks.rb:101:in `each'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/hooks.rb:101:in `trigger'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/page.rb:179:in `trigger_hooks'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:524:in `render_regenerated'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:516:in `block in render_pages'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:515:in `each'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:515:in `render_pages'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:202:in `render'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/site.rb:76:in `process'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:28:in `process_site'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/commands/build.rb:65:in `build'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/commands/build.rb:36:in `process'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `each'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/jekyll-4.0.1/exe/jekyll:15:in `<top (required)>'
        from /Users/seven/.asdf/installs/ruby/2.6.8/bin/jekyll:23:in `load'
        from /Users/seven/.asdf/installs/ruby/2.6.8/bin/jekyll:23:in `<top (required)>'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/lib/bundler/cli/exec.rb:58:in `load'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/lib/bundler/cli/exec.rb:58:in `kernel_load'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/lib/bundler/cli/exec.rb:23:in `run'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/lib/bundler/cli.rb:477:in `exec'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/lib/bundler/cli.rb:31:in `dispatch'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/lib/bundler/cli.rb:25:in `start'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/exe/bundle:49:in `block in <top (required)>'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
        from /Users/seven/.asdf/installs/ruby/2.6.8/lib/ruby/gems/2.6.0/gems/bundler-2.2.27/exe/bundle:37:in `<top (required)>'
        from /Users/seven/.asdf/installs/ruby/2.6.8/bin/bundle:23:in `load'
        from /Users/seven/.asdf/installs/ruby/2.6.8/bin/bundle:23:in `<main>'

In Jekyll, only the Jekyll::Document has excerpt_seperator, to fix this issue, we should filter the objects which aren't instances of Jekyll::Document.

longavailable commented 2 years ago

I've updated to 2c008ed. It works perfectly!