Make Site.source and Site.dest "immutable"
This commit is contained in:
parent
bd72265e74
commit
314dce62cf
|
@ -3,8 +3,9 @@ require 'csv'
|
||||||
|
|
||||||
module Jekyll
|
module Jekyll
|
||||||
class Site
|
class Site
|
||||||
|
attr_reader :source, :dest
|
||||||
attr_accessor :config, :layouts, :posts, :pages, :static_files,
|
attr_accessor :config, :layouts, :posts, :pages, :static_files,
|
||||||
:exclude, :include, :source, :dest, :lsi, :highlighter,
|
:exclude, :include, :lsi, :highlighter,
|
||||||
:permalink_style, :time, :future, :unpublished, :safe, :plugins, :limit_posts,
|
:permalink_style, :time, :future, :unpublished, :safe, :plugins, :limit_posts,
|
||||||
:show_drafts, :keep_files, :baseurl, :data, :file_read_opts, :gems,
|
:show_drafts, :keep_files, :baseurl, :data, :file_read_opts, :gems,
|
||||||
:plugin_manager
|
:plugin_manager
|
||||||
|
@ -22,8 +23,8 @@ module Jekyll
|
||||||
self.send("#{opt}=", config[opt])
|
self.send("#{opt}=", config[opt])
|
||||||
end
|
end
|
||||||
|
|
||||||
self.source = File.expand_path(config['source'])
|
@source = File.expand_path(config['source']).freeze
|
||||||
self.dest = File.expand_path(config['destination'])
|
@dest = File.expand_path(config['destination']).freeze
|
||||||
self.permalink_style = config['permalink'].to_sym
|
self.permalink_style = config['permalink'].to_sym
|
||||||
|
|
||||||
self.plugin_manager = Jekyll::PluginManager.new(self)
|
self.plugin_manager = Jekyll::PluginManager.new(self)
|
||||||
|
|
Loading…
Reference in New Issue