bridgetownrb / bridgetown-feed

A Bridgetown plugin to generate an Atom feed of your Bridgetown posts
MIT License
20 stars 5 forks source link

Liquid syntax error (line 5): Unknown tag 'feed_meta' #6

Closed fuzzygroup closed 1 year ago

fuzzygroup commented 1 year ago

Hi,

I just created a new Bridgetown blog for a product I created. Having feeds matters a lot to me so I:

❯ bundle add bridgetown-feed

Fetching bridgetown-feed 2.1.0 Installing bridgetown-feed 2.1.0

bundle show bridgetown-feed /Users/sjohnson/.gem/ruby/3.1.2/gems/bridgetown-feed-2.1.0

I created config/initializers.rb (it wasn't there)

❯ cat config/initializers.rb init :"bridgetown-feed"%

There wasn't the layouts indicated in the docs so I guessed that default.liquid was the equivalent and I added it to the head element:

cat src/_layouts/default.liquid

<!doctype html>

{% render "head", metadata: site.metadata, title: resource.data.title %} {% feed_meta %} {% render "navbar", metadata: site.metadata, resource: resource %}
{{ content }}
{% render "footer", metadata: site.metadata %}

❯ bin/bridgetown start [Bridgetown] Starting: Bridgetown v1.1.0 (codename "Belmont") [Server] Puma version: 5.6.5 (ruby 3.1.2-p20) ("Birdie's Version") [Server] PID: 46126 [Server] * Listening on http://0.0.0.0:4000 [Server] Use Ctrl-C to stop [Frontend] yarn run esbuild-dev [Frontend] yarn run v1.22.19 [Frontend] $ node esbuild.config.js --watch [Frontend] esbuild: frontend bundling started... [Frontend] esbuild: frontend bundling complete! [Frontend] esbuild: entrypoints processed: [Frontend] - index.6X27IUHB.js: 153B [Frontend] - index.54YWA64G.css: 4.48KB [Bridgetown] Environment: development [Bridgetown] Source: /Users/sjohnson/Sync/blogging/bridgetown/cartazzi/src [Bridgetown] Destination: /Users/sjohnson/Sync/blogging/bridgetown/cartazzi/output [Bridgetown] Custom Plugins: /Users/sjohnson/Sync/blogging/bridgetown/cartazzi/plugins [Bridgetown] Generating… [Bridgetown] Pagination: disabled. Enable in site config with pagination:\n enabled: true [Bridgetown] Liquid Exception: Liquid syntax error (line 5): Unknown tag 'feed_meta' in /Users/sjohnson/Sync/blogging/bridgetown/cartazzi/src/_layouts/default.liquid [Bridgetown] Conversion error: Bridgetown::Converters::LiquidTemplates encountered an error while converting _posts/2022-12-10-welcome-to-bridgetown.md' [Server] - Gracefully stopping, waiting for requests to finish [Server] === puma shutdown: 2022-12-10 04:28:43 -0500 === [Server] - Goodbye! [Bridgetown] Stopping auxiliary processes... [Bridgetown] Exception raised: Liquid::SyntaxError [Bridgetown] Liquid syntax error (line 5): Unknown tag 'feed_meta' [Bridgetown] 1: /Users/sjohnson/.gem/ruby/3.1.2/gems/liquid-5.4.0/lib/liquid/document.rb:36:inunknown_tag' [Bridgetown] 2: /Users/sjohnson/.gem/ruby/3.1.2/gems/liquid-5.4.0/lib/liquid/document.rb:57:in block in parse_body' [Bridgetown] 3: /Users/sjohnson/.gem/ruby/3.1.2/gems/liquid-5.4.0/lib/liquid/block_body.rb:138:inparse_for_document' [Bridgetown] 4: /Users/sjohnson/.gem/ruby/3.1.2/gems/liquid-5.4.0/lib/liquid/block_body.rb:29:in parse' [Bridgetown] 5: /Users/sjohnson/.gem/ruby/3.1.2/gems/liquid-5.4.0/lib/liquid/document.rb:55:inparse_body' [Bridgetown] Backtrace: Use the --trace option for complete information.

I'm guessing something has changed in the 1.1 plugin system but that's just a guess.

Thoughts?

jaredcwhite commented 1 year ago

I think you're trying to set up the feed plugin as if you're using Bridgetown 1.2, but it looks like you're using 1.1 actually. Are you trying to get it working with 1.1, or 1.2?