Sha256: 843f8c9a87a142d1d54d8e4bfddd38f97e41997de6f1feecfc76c428c10e45e4
Contents?: true
Size: 1.18 KB
Versions: 18
Compression:
Stored size: 1.18 KB
Contents
# # This is a sample callbacks file. It is designed to be a starting # point for your own site's callbacks. You can uncomment any of the # callback examples below to see how they work. # #################################################################### # A sample site callback to be called after the entire site build has finished. # # This callback adds a humans.txt file in the root of your site with the author's name # after each site build. # callback :site, :after_render do |site| # page = DynamicPage.new(site, '/humans.txt') # # page.layout = false # page.content = <<-content # /* AUTHOR */ # Name: #{site.meta.author} # # /* SITE */ # Software: Generated with Plate! http://platerb.com # content # # page.write! # end #################################################################### # This sample callback is registered on each blog post. It adds a `rel=external` # attribute to all `<a>` tags that have an external link. # # This is just an example to show how to manipulate the body content of a post # or page before it is written to the destination. # callback :post, :after_render do |post| # post.body.gsub!('<a href="http://', '<a rel="external" href="http://') # end
Version data entries
18 entries across 18 versions & 1 rubygems