jekyll / jekyll-feed

:memo: A Jekyll plugin to generate an Atom (RSS-like) feed of your Jekyll posts
MIT License
837 stars 203 forks source link

Fold private methods into the `:render` method as local variables #327

Closed ashmaroli closed 2 years ago

ashmaroli commented 3 years ago

Since the meta tag contents doesn't depend on page-specific metadata, the resulting markup is essentially the same for all pages / documents in a site: https://github.com/jekyll/jekyll-feed/blob/653999c975564e30003d2c0c247d59e5a89eecda/lib/jekyll-feed/meta-tag.rb#L23-L38

Therefore in theory, the result can be safely memoized to avoid generating arrays for every page / document..

ashmaroli commented 3 years ago

/cc @parkr to verify that this doesn't interfere with the jekyll-github-metadata plugin..

parkr commented 2 years ago

@jekyllbot: merge +bug