Class: Jekyll::Page
- Inherits:
-
Object
- Object
- Jekyll::Page
- Defined in:
- lib/jekyll/pagination.rb
Instance Method Summary collapse
- #_pagination_original_dir= ⇒ Object
- #_pagination_original_index? ⇒ Object
-
#dir=(dir) ⇒ Object
Overwrites the original method to also set
basename
when there’s apager
. -
#index? ⇒ Boolean
Overwrites the original method to also include the configured paginate file(s) in the evaluation.
Instance Method Details
#_pagination_original_dir= ⇒ Object
33 |
# File 'lib/jekyll/pagination.rb', line 33 alias_method :_pagination_original_dir=, :dir= |
#_pagination_original_index? ⇒ Object
42 |
# File 'lib/jekyll/pagination.rb', line 42 alias_method :_pagination_original_index?, :index? |
#dir=(dir) ⇒ Object
Overwrites the original method to also set basename
when there’s a pager
. NOTE: Depends on pager
being set before setting dir
.
37 38 39 40 |
# File 'lib/jekyll/pagination.rb', line 37 def dir=(dir) @basename = 'index' if @pager @dir = dir end |
#index? ⇒ Boolean
Overwrites the original method to also include the configured paginate file(s) in the evaluation.
46 47 48 |
# File 'lib/jekyll/pagination.rb', line 46 def index? Pager.paginate_files(@site.config).include?("#{basename}.html") end |