Class: Jekyll::Site
- Inherits:
-
Object
- Object
- Jekyll::Site
- Defined in:
- lib/jekyll/site.rb
Instance Attribute Summary collapse
-
#baseurl ⇒ Object
Returns the value of attribute baseurl.
-
#cache_dir ⇒ Object
readonly
Returns the value of attribute cache_dir.
-
#config ⇒ Object
Returns the value of attribute config.
-
#converters ⇒ Object
Returns the value of attribute converters.
-
#data ⇒ Object
Returns the value of attribute data.
-
#dest ⇒ Object
readonly
Returns the value of attribute dest.
-
#drafts ⇒ Object
Returns the value of attribute drafts.
-
#exclude ⇒ Object
Returns the value of attribute exclude.
-
#file_read_opts ⇒ Object
Returns the value of attribute file_read_opts.
-
#filter_cache ⇒ Object
readonly
Returns the value of attribute filter_cache.
-
#future ⇒ Object
Returns the value of attribute future.
-
#gems ⇒ Object
Returns the value of attribute gems.
-
#generators ⇒ Object
Returns the value of attribute generators.
-
#highlighter ⇒ Object
Returns the value of attribute highlighter.
-
#include ⇒ Object
Returns the value of attribute include.
-
#includes_load_paths ⇒ Object
readonly
Returns the value of attribute includes_load_paths.
-
#inclusions ⇒ Object
Returns the value of attribute inclusions.
-
#keep_files ⇒ Object
Returns the value of attribute keep_files.
-
#layouts ⇒ Object
Returns the value of attribute layouts.
-
#limit_posts ⇒ Object
Returns the value of attribute limit_posts.
-
#liquid_renderer ⇒ Object
readonly
Returns the value of attribute liquid_renderer.
-
#lsi ⇒ Object
Returns the value of attribute lsi.
-
#pages ⇒ Object
Returns the value of attribute pages.
-
#permalink_style ⇒ Object
Returns the value of attribute permalink_style.
-
#plugin_manager ⇒ Object
Returns the value of attribute plugin_manager.
-
#plugins ⇒ Object
Returns the value of attribute plugins.
-
#profiler ⇒ Object
readonly
Returns the value of attribute profiler.
-
#reader ⇒ Object
Returns the value of attribute reader.
-
#regenerator ⇒ Object
readonly
Returns the value of attribute regenerator.
-
#safe ⇒ Object
Returns the value of attribute safe.
-
#show_drafts ⇒ Object
Returns the value of attribute show_drafts.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#static_files ⇒ Object
Returns the value of attribute static_files.
-
#theme ⇒ Object
Returns the value of attribute theme.
-
#time ⇒ Object
Returns the value of attribute time.
-
#unpublished ⇒ Object
Returns the value of attribute unpublished.
Instance Method Summary collapse
- #categories ⇒ Object
-
#cleanup ⇒ Object
Remove orphaned files and empty directories in destination.
-
#collection_names ⇒ Object
The list of collection names.
-
#collections ⇒ Object
The list of collections and their corresponding Jekyll::Collection instances.
-
#collections_path ⇒ Object
Public: The full path to the directory that houses all the collections registered with the current site.
-
#docs_to_write ⇒ Object
Get the to be written documents.
-
#documents ⇒ Object
Get all the documents.
- #each_site_file ⇒ Object
-
#ensure_not_in_dest ⇒ Object
Check that the destination dir isn’t the source dir or a directory parent to the source dir.
-
#find_converter_instance(klass) ⇒ Object
Get the implementation class for the given Converter.
-
#frontmatter_defaults ⇒ Object
Returns the FrontmatterDefaults or creates a new FrontmatterDefaults if it doesn’t already exist.
-
#generate ⇒ Object
Run each of the Generators.
-
#in_cache_dir(*paths) ⇒ Object
Public: Prefix a given path with the cache directory.
-
#in_dest_dir(*paths) ⇒ Object
Public: Prefix a given path with the destination directory.
-
#in_source_dir(*paths) ⇒ Object
Public: Prefix a given path with the source directory.
-
#in_theme_dir(*paths) ⇒ Object
Public: Prefix a given path with the theme directory.
-
#incremental?(override = {}) ⇒ Boolean
Whether to perform a full rebuild without incremental regeneration.
-
#initialize(config) ⇒ Site
constructor
Public: Initialize a new Site.
-
#inspect ⇒ Object
Public.
-
#instantiate_subclasses(klass) ⇒ Object
klass - class or module containing the subclasses.
-
#post_attr_hash(post_attr) ⇒ Object
Construct a Hash of Posts indexed by the specified Post attribute.
- #posts ⇒ Object
- #print_stats ⇒ Object
-
#process ⇒ Object
Public: Read, process, and write this Site to output.
-
#publisher ⇒ Object
Returns the publisher or creates a new publisher if it doesn’t already exist.
-
#read ⇒ Object
Read Site data from disk and load it into internal data structures.
-
#relative_permalinks_are_deprecated ⇒ Object
Warns the user if permanent links are relative to the parent directory.
-
#render ⇒ Object
Render the site to the destination.
-
#reset ⇒ Object
rubocop:disable Metrics/AbcSize rubocop:disable Metrics/MethodLength.
-
#setup ⇒ Object
Load necessary libraries, plugins, converters, and generators.
-
#site_data ⇒ Object
Prepare site data for site payload.
-
#site_payload ⇒ Object
(also: #to_liquid)
The Hash payload containing site-wide data.
-
#static_files_to_write ⇒ Object
Get the to be written static files.
- #tags ⇒ Object
-
#write ⇒ Object
Write static files, pages, and posts.
Constructor Details
#initialize(config) ⇒ Site
Public: Initialize a new Site.
config - A Hash containing site configuration details.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/jekyll/site.rb', line 18 def initialize(config) # Source and destination may not be changed after the site has been created. @source = File.(config["source"]).freeze @dest = File.(config["destination"]).freeze self.config = config @cache_dir = in_source_dir(config["cache_dir"]) @filter_cache = {} @reader = Reader.new(self) @profiler = Profiler.new(self) @regenerator = Regenerator.new(self) @liquid_renderer = LiquidRenderer.new(self) Jekyll.sites << self reset setup Jekyll::Hooks.trigger :site, :after_init, self end |
Instance Attribute Details
#baseurl ⇒ Object
Returns the value of attribute baseurl.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def baseurl @baseurl end |
#cache_dir ⇒ Object (readonly)
Returns the value of attribute cache_dir.
12 13 14 |
# File 'lib/jekyll/site.rb', line 12 def cache_dir @cache_dir end |
#config ⇒ Object
Returns the value of attribute config.
12 13 14 |
# File 'lib/jekyll/site.rb', line 12 def config @config end |
#converters ⇒ Object
Returns the value of attribute converters.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def converters @converters end |
#data ⇒ Object
Returns the value of attribute data.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def data @data end |
#dest ⇒ Object (readonly)
Returns the value of attribute dest.
12 13 14 |
# File 'lib/jekyll/site.rb', line 12 def dest @dest end |
#drafts ⇒ Object
Returns the value of attribute drafts.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def drafts @drafts end |
#exclude ⇒ Object
Returns the value of attribute exclude.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def exclude @exclude end |
#file_read_opts ⇒ Object
Returns the value of attribute file_read_opts.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def file_read_opts @file_read_opts end |
#filter_cache ⇒ Object (readonly)
Returns the value of attribute filter_cache.
12 13 14 |
# File 'lib/jekyll/site.rb', line 12 def filter_cache @filter_cache end |
#future ⇒ Object
Returns the value of attribute future.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def future @future end |
#gems ⇒ Object
Returns the value of attribute gems.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def gems @gems end |
#generators ⇒ Object
Returns the value of attribute generators.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def generators @generators end |
#highlighter ⇒ Object
Returns the value of attribute highlighter.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def highlighter @highlighter end |
#include ⇒ Object
Returns the value of attribute include.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def include @include end |
#includes_load_paths ⇒ Object (readonly)
Returns the value of attribute includes_load_paths.
12 13 14 |
# File 'lib/jekyll/site.rb', line 12 def includes_load_paths @includes_load_paths end |
#inclusions ⇒ Object
Returns the value of attribute inclusions.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def inclusions @inclusions end |
#keep_files ⇒ Object
Returns the value of attribute keep_files.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def keep_files @keep_files end |
#layouts ⇒ Object
Returns the value of attribute layouts.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def layouts @layouts end |
#limit_posts ⇒ Object
Returns the value of attribute limit_posts.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def limit_posts @limit_posts end |
#liquid_renderer ⇒ Object (readonly)
Returns the value of attribute liquid_renderer.
12 13 14 |
# File 'lib/jekyll/site.rb', line 12 def liquid_renderer @liquid_renderer end |
#lsi ⇒ Object
Returns the value of attribute lsi.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def lsi @lsi end |
#pages ⇒ Object
Returns the value of attribute pages.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def pages @pages end |
#permalink_style ⇒ Object
Returns the value of attribute permalink_style.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def permalink_style @permalink_style end |
#plugin_manager ⇒ Object
Returns the value of attribute plugin_manager.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def plugin_manager @plugin_manager end |
#plugins ⇒ Object
Returns the value of attribute plugins.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def plugins @plugins end |
#profiler ⇒ Object (readonly)
Returns the value of attribute profiler.
12 13 14 |
# File 'lib/jekyll/site.rb', line 12 def profiler @profiler end |
#reader ⇒ Object
Returns the value of attribute reader.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def reader @reader end |
#regenerator ⇒ Object (readonly)
Returns the value of attribute regenerator.
12 13 14 |
# File 'lib/jekyll/site.rb', line 12 def regenerator @regenerator end |
#safe ⇒ Object
Returns the value of attribute safe.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def safe @safe end |
#show_drafts ⇒ Object
Returns the value of attribute show_drafts.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def show_drafts @show_drafts end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
12 13 14 |
# File 'lib/jekyll/site.rb', line 12 def source @source end |
#static_files ⇒ Object
Returns the value of attribute static_files.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def static_files @static_files end |
#theme ⇒ Object
Returns the value of attribute theme.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def theme @theme end |
#time ⇒ Object
Returns the value of attribute time.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def time @time end |
#unpublished ⇒ Object
Returns the value of attribute unpublished.
5 6 7 |
# File 'lib/jekyll/site.rb', line 5 def unpublished @unpublished end |
Instance Method Details
#categories ⇒ Object
272 273 274 |
# File 'lib/jekyll/site.rb', line 272 def categories post_attr_hash("categories") end |
#cleanup ⇒ Object
Remove orphaned files and empty directories in destination.
Returns nothing.
220 221 222 223 |
# File 'lib/jekyll/site.rb', line 220 def cleanup site_cleaner.cleanup! nil end |
#collection_names ⇒ Object
The list of collection names.
Returns an array of collection names from the configuration,
or an empty array if the `collections` key is not set.
164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/jekyll/site.rb', line 164 def collection_names case config["collections"] when Hash config["collections"].keys when Array config["collections"] when nil [] else raise ArgumentError, "Your `collections` key must be a hash or an array." end end |
#collections ⇒ Object
The list of collections and their corresponding Jekyll::Collection instances. If config is set, a new instance is created for each item in the collection, a new hash is returned otherwise.
Returns a Hash containing collection name-to-instance pairs.
154 155 156 157 158 |
# File 'lib/jekyll/site.rb', line 154 def collections @collections ||= collection_names.each_with_object({}) do |name, hsh| hsh[name] = Jekyll::Collection.new(self, name) end end |
#collections_path ⇒ Object
Public: The full path to the directory that houses all the collections registered with the current site.
Returns the source directory or the absolute path to the custom collections_dir
445 446 447 448 |
# File 'lib/jekyll/site.rb', line 445 def collections_path dir_str = config["collections_dir"] @collections_path ||= dir_str.empty? ? source : in_source_dir(dir_str) end |
#docs_to_write ⇒ Object
Get the to be written documents
Returns an Array of Documents which should be written
342 343 344 |
# File 'lib/jekyll/site.rb', line 342 def docs_to_write documents.select(&:write?) end |
#documents ⇒ Object
Get all the documents
Returns an Array of all Documents
356 357 358 359 360 |
# File 'lib/jekyll/site.rb', line 356 def documents collections.each_with_object(Set.new) do |(_, collection), set| set.merge(collection.docs).merge(collection.files) end.to_a end |
#each_site_file ⇒ Object
362 363 364 365 366 |
# File 'lib/jekyll/site.rb', line 362 def each_site_file pages.each { |page| yield page } static_files.each { |file| yield(file) if file.write? } collections.each_value { |coll| coll.docs.each { |doc| yield(doc) if doc.write? } } end |
#ensure_not_in_dest ⇒ Object
Check that the destination dir isn’t the source dir or a directory parent to the source dir.
139 140 141 142 143 144 145 146 147 |
# File 'lib/jekyll/site.rb', line 139 def ensure_not_in_dest dest_pathname = Pathname.new(dest) Pathname.new(source).ascend do |path| if path == dest_pathname raise Errors::FatalException, "Destination directory cannot be or contain the Source directory." end end end |
#find_converter_instance(klass) ⇒ Object
Get the implementation class for the given Converter. Returns the Converter instance implementing the given Converter. klass - The Class of the Converter to fetch.
305 306 307 308 309 310 311 |
# File 'lib/jekyll/site.rb', line 305 def find_converter_instance(klass) @find_converter_instance ||= {} @find_converter_instance[klass] ||= converters.find do |converter| converter.instance_of?(klass) end || \ raise("No Converters found for #{klass}") end |
#frontmatter_defaults ⇒ Object
Returns the FrontmatterDefaults or creates a new FrontmatterDefaults if it doesn’t already exist.
Returns The FrontmatterDefaults
372 373 374 |
# File 'lib/jekyll/site.rb', line 372 def frontmatter_defaults @frontmatter_defaults ||= FrontmatterDefaults.new(self) end |
#generate ⇒ Object
Run each of the Generators.
Returns nothing.
190 191 192 193 194 195 196 197 198 |
# File 'lib/jekyll/site.rb', line 190 def generate generators.each do |generator| start = Time.now generator.generate(self) Jekyll.logger.debug "Generating:", "#{generator.class} finished in #{Time.now - start} seconds." end nil end |
#in_cache_dir(*paths) ⇒ Object
Public: Prefix a given path with the cache directory.
paths - (optional) path elements to a file or directory within the
cache directory
Returns a path which is prefixed with the cache directory.
435 436 437 438 439 |
# File 'lib/jekyll/site.rb', line 435 def in_cache_dir(*paths) paths.reduce(cache_dir) do |base, path| Jekyll.sanitized_path(base, path) end end |
#in_dest_dir(*paths) ⇒ Object
Public: Prefix a given path with the destination directory.
paths - (optional) path elements to a file or directory within the
destination directory
Returns a path which is prefixed with the destination directory.
423 424 425 426 427 |
# File 'lib/jekyll/site.rb', line 423 def in_dest_dir(*paths) paths.reduce(dest) do |base, path| Jekyll.sanitized_path(base, path) end end |
#in_source_dir(*paths) ⇒ Object
Public: Prefix a given path with the source directory.
paths - (optional) path elements to a file or directory within the
source directory
Returns a path which is prefixed with the source directory.
397 398 399 400 401 |
# File 'lib/jekyll/site.rb', line 397 def in_source_dir(*paths) paths.reduce(source) do |base, path| Jekyll.sanitized_path(base, path) end end |
#in_theme_dir(*paths) ⇒ Object
Public: Prefix a given path with the theme directory.
paths - (optional) path elements to a file or directory within the
theme directory
Returns a path which is prefixed with the theme root directory.
409 410 411 412 413 414 415 |
# File 'lib/jekyll/site.rb', line 409 def in_theme_dir(*paths) return nil unless theme paths.reduce(theme.root) do |base, path| Jekyll.sanitized_path(base, path) end end |
#incremental?(override = {}) ⇒ Boolean
Whether to perform a full rebuild without incremental regeneration
Returns a Boolean: true for a full rebuild, false for normal build
379 380 381 |
# File 'lib/jekyll/site.rb', line 379 def incremental?(override = {}) override["incremental"] || config["incremental"] end |
#inspect ⇒ Object
Public
Returns the object as a debug String.
453 454 455 |
# File 'lib/jekyll/site.rb', line 453 def inspect "#<#{self.class} @source=#{@source}>" end |
#instantiate_subclasses(klass) ⇒ Object
klass - class or module containing the subclasses. Returns array of instances of subclasses of parameter. Create array of instances of the subclasses of the class or module passed in as argument.
318 319 320 321 322 323 |
# File 'lib/jekyll/site.rb', line 318 def instantiate_subclasses(klass) klass.descendants.select { |c| !safe || c.safe }.tap do |result| result.sort! result.map! { |c| c.new(config) } end end |
#post_attr_hash(post_attr) ⇒ Object
Construct a Hash of Posts indexed by the specified Post attribute.
post_attr - The String name of the Post attribute.
Examples
post_attr_hash('categories')
# => { 'tech' => [<Post A>, <Post B>],
# 'ruby' => [<Post B>] }
Returns the Hash: { attr => posts } where
attr - One of the values for the requested attribute.
posts - The Array of Posts with the given attr value.
255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/jekyll/site.rb', line 255 def post_attr_hash(post_attr) # Build a hash map based on the specified post attribute ( post attr => # array of posts ) then sort each array in reverse order. @post_attr_hash[post_attr] ||= begin hash = Hash.new { |h, key| h[key] = [] } posts.docs.each do |p| p.data[post_attr]&.each { |t| hash[t] << p } end hash.each_value { |posts| posts.sort!.reverse! } hash end end |
#posts ⇒ Object
238 239 240 |
# File 'lib/jekyll/site.rb', line 238 def posts collections["posts"] ||= Collection.new(self, "posts") end |
#print_stats ⇒ Object
85 86 87 |
# File 'lib/jekyll/site.rb', line 85 def print_stats Jekyll.logger.info @liquid_renderer.stats_table end |
#process ⇒ Object
Public: Read, process, and write this Site to output.
Returns nothing.
74 75 76 77 78 79 80 81 82 83 |
# File 'lib/jekyll/site.rb', line 74 def process return profiler.profile_process if config["profile"] reset read generate render cleanup write end |
#publisher ⇒ Object
Returns the publisher or creates a new publisher if it doesn’t already exist.
Returns The Publisher
387 388 389 |
# File 'lib/jekyll/site.rb', line 387 def publisher @publisher ||= Publisher.new(self) end |
#read ⇒ Object
Read Site data from disk and load it into internal data structures.
Returns nothing.
180 181 182 183 184 185 |
# File 'lib/jekyll/site.rb', line 180 def read reader.read limit_posts! Jekyll::Hooks.trigger :site, :post_read, self nil end |
#relative_permalinks_are_deprecated ⇒ Object
Warns the user if permanent links are relative to the parent directory. As this is a deprecated function of Jekyll.
Returns
329 330 331 332 333 334 335 336 337 |
# File 'lib/jekyll/site.rb', line 329 def relative_permalinks_are_deprecated if config["relative_permalinks"] Jekyll.logger.abort_with "Since v3.0, permalinks for pages " \ "in subfolders must be relative to the " \ "site source directory, not the parent " \ "directory. Check https://jekyllrb.com/docs/upgrading/ " \ "for more info." end end |
#render ⇒ Object
Render the site to the destination.
Returns nothing.
203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/jekyll/site.rb', line 203 def render relative_permalinks_are_deprecated payload = site_payload Jekyll::Hooks.trigger :site, :pre_render, self, payload render_docs(payload) render_pages(payload) Jekyll::Hooks.trigger :site, :post_render, self, payload nil end |
#reset ⇒ Object
rubocop:disable Metrics/AbcSize rubocop:disable Metrics/MethodLength
Reset Site details.
Returns nothing
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/jekyll/site.rb', line 95 def reset self.time = if config["time"] Utils.parse_date(config["time"].to_s, "Invalid time in _config.yml.") else Time.now end self.layouts = {} self.inclusions = {} self.pages = [] self.static_files = [] self.data = {} @post_attr_hash = {} @site_data = nil @collections = nil @documents = nil @docs_to_write = nil @regenerator.clear_cache @liquid_renderer.reset @site_cleaner = nil frontmatter_defaults.reset raise ArgumentError, "limit_posts must be a non-negative number" if limit_posts.negative? Jekyll::Cache.clear_if_config_changed config Jekyll::Hooks.trigger :site, :after_reset, self nil end |
#setup ⇒ Object
Load necessary libraries, plugins, converters, and generators.
Returns nothing.
128 129 130 131 132 133 134 135 |
# File 'lib/jekyll/site.rb', line 128 def setup ensure_not_in_dest plugin_manager.conscientious_require self.converters = instantiate_subclasses(Jekyll::Converter) self.generators = instantiate_subclasses(Jekyll::Generator) end |
#site_data ⇒ Object
Prepare site data for site payload. The method maintains backward compatibility if the key ‘data’ is already used in _config.yml.
Returns the Hash to be hooked to site.data.
280 281 282 |
# File 'lib/jekyll/site.rb', line 280 def site_data @site_data ||= (config["data"] || data) end |
#site_payload ⇒ Object Also known as: to_liquid
The Hash payload containing site-wide data.
Returns the Hash: { “site” => data } where data is a Hash with keys:
"time" - The Time as specified in the configuration or the
current time if none was specified.
"posts" - The Array of Posts, sorted chronologically by post date
and then title.
"pages" - The Array of all Pages.
"html_pages" - The Array of HTML Pages.
"categories" - The Hash of category values and Posts.
See Site#post_attr_hash for type info.
"tags" - The Hash of tag values and Posts.
See Site#post_attr_hash for type info.
297 298 299 |
# File 'lib/jekyll/site.rb', line 297 def site_payload Drops::UnifiedPayloadDrop.new self end |
#static_files_to_write ⇒ Object
Get the to be written static files
Returns an Array of StaticFiles which should be written
349 350 351 |
# File 'lib/jekyll/site.rb', line 349 def static_files_to_write static_files.select(&:write?) end |
#tags ⇒ Object
268 269 270 |
# File 'lib/jekyll/site.rb', line 268 def post_attr_hash("tags") end |
#write ⇒ Object
Write static files, pages, and posts.
Returns nothing.
228 229 230 231 232 233 234 235 236 |
# File 'lib/jekyll/site.rb', line 228 def write Jekyll::Commands::Doctor.conflicting_urls(self) each_site_file do |item| item.write(dest) if regenerator.regenerate?(item) end regenerator. Jekyll::Hooks.trigger :site, :post_write, self nil end |