title: Get Jekyll Configuration Inside Plugin
body: <p>I'd like to make changes to the Jekyll <a href="https://github.com/sebcioz/jekyll-only_first_p">Only First Paragraph plugin</a> to make the generation of a 'read more ' link a configurable option.</p>
  
  <p>To do this I'd need to be able to access the Jekyll site config inside the plugin's <code>AssetFilter</code>. With the configuration available I can make the change. I don't know how to make the site configuration available to the plugin.</p>
  
  <p>The code below demonstrates where I'd like <code>site.config</code> available:</p>
  
  <pre><code>require 'nokogiri'
  
  module Jekyll
    module AssetFilter
      def only_first_p(post)
        # site.config needs to be available here to modify the output based on the configuration
  
        output = "&lt;p&gt;"
        output &lt;&lt; Nokogiri::HTML(post["content"]).at_css("p").inner_html
        output &lt;&lt; %{&lt;/p&gt;&lt;a class="readmore" href="#{post["url"]}"&gt;Read more&lt;/a&gt;}
  
        output
      end
    end
  end
  
  Liquid::Template.register_filter(Jekyll::AssetFilter)
  </code></pre>
  
  <p><br />
  Can this be achieved?</p>