Skip to content
Closed
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
5 changes: 4 additions & 1 deletion lib/jekyll-paginate-v2/generator/paginationPage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ def initialize(page_to_copy, cur_page_nr, total_pages, index_pageandext)
@site = page_to_copy.site
@base = ''
@url = ''
@name = index_pageandext.nil? ? 'index.html' : index_pageandext
@name = (index_pageandext.nil? || index_pageandext == '.html') ? 'index.html' : index_pageandext
@path = page_to_copy.path

self.process(@name) # Creates the basename and ext member values

Expand Down Expand Up @@ -41,6 +42,8 @@ def initialize(page_to_copy, cur_page_nr, total_pages, index_pageandext)
end

def set_url(url_value)
@path = url_value[0] == '/' ? url_value[1..-1] : url_value
@dir = File.dirname(@path)
@url = url_value
end
end # class PaginationPage
Expand Down