expose more data for blog ext
This commit is contained in:
parent
97e1dfa339
commit
cd63ec2248
|
@ -79,7 +79,7 @@ module Middleman::Base
|
||||||
app.register Middleman::CoreExtensions::FrontMatter
|
app.register Middleman::CoreExtensions::FrontMatter
|
||||||
|
|
||||||
app.set :default_features, [
|
app.set :default_features, [
|
||||||
# :lorem,
|
:lorem,
|
||||||
# :sitemap_tree
|
# :sitemap_tree
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ module Middleman::CoreExtensions::Sitemap
|
||||||
@app = app
|
@app = app
|
||||||
@source = File.expand_path(@app.views, @app.root)
|
@source = File.expand_path(@app.views, @app.root)
|
||||||
@map = {}
|
@map = {}
|
||||||
|
@source_map = {}
|
||||||
@ignored_paths = false
|
@ignored_paths = false
|
||||||
@generic_paths = false
|
@generic_paths = false
|
||||||
@proxied_paths = false
|
@proxied_paths = false
|
||||||
|
@ -155,6 +156,10 @@ module Middleman::CoreExtensions::Sitemap
|
||||||
@map.delete(path) if path_exists?(path)
|
@map.delete(path) if path_exists?(path)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def source_map
|
||||||
|
@source_map
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def build_static_map
|
def build_static_map
|
||||||
Find.find(@source) do |file|
|
Find.find(@source) do |file|
|
||||||
|
@ -182,6 +187,7 @@ module Middleman::CoreExtensions::Sitemap
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@source_map[path] = file
|
||||||
path
|
path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue