0
votes

I've got a blog built on Jekyll 3.0.1 based on this Kasper theme with some modification. I've removed all the posts but one in an effort to reduce the degrees of freedom in the problem I'm having. The site builds fine when I include an "excerpt" tag and a value for it inside the post's YAML front matter, but when I remove this I get an error (shown below). I've tried using an "excerpt_separator" tag and value in the _config.yml file and putting the separator in the post, but this doesn't help. Just for the hell of it I even put in a default "excerpt" tag and value inside the _config.yml and this didn't help either. It seems to me like my Jekyll installation is no longer auto-generating excerpts properly since it does build when I manually include an "excerpt" in the post's YAML front matter.

Here is the Github repository: https://github.com/jtelszasz/kasper-trial

users-MacBook-Air:kasper-trial user$ jekyll serve --trace
Configuration file: /Users/user/Documents/kasper-trial/_config.yml
Source: /Users/user/Documents/kasper-trial
Destination: /Users/user/Documents/kasper-trial/_site
Incremental build: disabled. Enable with --incremental
Generating... 
Deprecation: Collection#map should be called on the #docs array directly.
Called by /Users/user/Documents/kasper-trial/_plugins/rssgenerator.rb:46:in `block in generate'.
Deprecation: Collection#count should be called on the #docs array directly.
Called by /Users/user/Documents/kasper-trial/_plugins/rssgenerator.rb:49:in `rescue in block in generate'.
Deprecation: Collection#reverse should be called on the #docs array directly.
Called by /Users/user/Documents/kasper-trial/_plugins/rssgenerator.rb:51:in `block in generate'.
Deprecation: Document#title is now a key in the #data hash.
Called by /Users/user/Documents/kasper-trial/_plugins/rssgenerator.rb:53:in `block (3 levels) in generate'.
/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/document.rb:471:in `method_missing': undefined method `excerpt' for #<Jekyll::Document _posts/2015-11-30-blah.md collection=posts> (NoMethodError)
from /Users/user/Documents/kasper-trial/_plugins/rssgenerator.rb:55:in `block (3 levels) in generate'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/rss/maker/base.rb:57:in `new_item'
from /Users/user/Documents/kasper-trial/_plugins/rssgenerator.rb:52:in `block (2 levels) in generate'
from /Users/user/Documents/kasper-trial/_plugins/rssgenerator.rb:51:in `each'
from /Users/user/Documents/kasper-trial/_plugins/rssgenerator.rb:51:in `block in generate'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/rss/maker/base.rb:438:in `make'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/rss/maker/base.rb:402:in `make'
from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/rss/maker.rb:28:in `make'
from /Users/user/Documents/kasper-trial/_plugins/rssgenerator.rb:41:in `generate'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/site.rb:154:in `block in generate'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/site.rb:153:in `each'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/site.rb:153:in `generate'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/site.rb:58:in `process'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/command.rb:28:in `process_site'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/commands/build.rb:60:in `build'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/commands/build.rb:35:in `process'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
from /usr/local/lib/ruby/gems/2.2.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
from /usr/local/lib/ruby/gems/2.2.0/gems/jekyll-3.0.1/bin/jekyll:17:in `<top (required)>'
from /usr/local/bin/jekyll:23:in `load'
from /usr/local/bin/jekyll:23:in `<main>'
1
Did you have github repository ?David Jacquel
Just added to the post. Thanks for taking a look!Justin

1 Answers

0
votes

You have a problem in _plugins/rssgenerator.rb line 55.

item.description = parser.convert(post.excerpt)

should be :

item.description = parser.convert(post.to_liquid['excerpt'])

Remove it and use standard jekyll file to generate your feed (find it here).

In _config.yml add :

excerpt_separator: "<!--excerpt-->"

Your post :

---
layout: post
title: Post Title
description: "blah."
modified: 2014-12-17
category: articles
tags: [futbol]
---
excerpt

<!--excerpt-->

asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf