Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Code snippets are loaded twice #644
The second trace is the legit one (the command runner loads the site in order to compile it). The first one happens because the custom command loading:
def self.load_custom_commands if Nanoc::Int::SiteLoader.cwd_is_nanoc_site? site = Nanoc::Int::SiteLoader.new.new_from_cwd site.config[:commands_dirs].each do |path| load_commands_at(path) end end end
This was not an issue before, because sites were loaded lazily.
It probably makes sense to extract the configuration loading into its own system, so that loading custom commands doesn’t mean loading the entire site.