parent
3ce93abce7
commit
ead4375415
|
@ -53,6 +53,12 @@ module Jekyll
|
|||
page_title || site_title
|
||||
end
|
||||
end
|
||||
|
||||
if page_number
|
||||
return page_number + @title
|
||||
end
|
||||
|
||||
@title
|
||||
end
|
||||
|
||||
def name
|
||||
|
@ -175,6 +181,17 @@ module Jekyll
|
|||
page["url"] =~ HOMEPAGE_OR_ABOUT_REGEX
|
||||
end
|
||||
|
||||
def page_number
|
||||
return unless @context["paginator"] && @context["paginator"]["page"]
|
||||
|
||||
current = @context["paginator"]["page"]
|
||||
total = @context["paginator"]["total_pages"]
|
||||
|
||||
if current > 1
|
||||
return "Page #{current} of #{total} for "
|
||||
end
|
||||
end
|
||||
|
||||
attr_reader :context
|
||||
|
||||
def fallback_data
|
||||
|
|
Loading…
Reference in New Issue