Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/jekyll-paginate-v2/autopages/pages/baseAutoPage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(site, base, autopage_config, pagination_config, layout_name, set_
@base = base
@name = 'index.html'

layout_dir = '_layouts'
layout_dir = site.config['layouts_dir'] || '_layouts'

# Path is only used by the convertible module and accessed below when calling read_yaml
# Handling themes stored in a gem
Expand Down Expand Up @@ -40,7 +40,8 @@ def initialize(site, base, autopage_config, pagination_config, layout_name, set_
@url = File.join(permalink_formatted, @name)
@dir = permalink_formatted

self.data['layout'] = File.basename(layout_name, File.extname(layout_name))
self.data['layout'] = File.join(File.dirname(layout_name),
File.basename(layout_name, '.*'))
self.data['title'] = get_autopage_title_lambda.call( page_title )
self.data['pagination'] = pagination_layout_config # Store the pagination configuration

Expand All @@ -57,4 +58,4 @@ def initialize(site, base, autopage_config, pagination_config, layout_name, set_
end #function initialize
end #class BaseAutoPage
end # module PaginateV2
end # module Jekyll
end # module Jekyll