Created
          May 6, 2014 19:50 
        
      - 
      
 - 
        
Save intuxicated/9eb0562adfd89ce8af34 to your computer and use it in GitHub Desktop.  
    bootstrap 3 pagination for jekyll
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | {% if paginator.total_pages > 1 %} | |
| <ul class="pagination"> | |
| {% if paginator.previous_page %} | |
| <li><a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">قبلی</a></li> | |
| {% else %} | |
| <li class="disabled"><a>قبلی</a></li> | |
| {% endif %} | |
| {% for page in (1..paginator.total_pages) %} | |
| {% if page == paginator.page %} | |
| <li class="active"><a>{{ page | pnumber }}</a></li> | |
| {% elsif page == 1 %} | |
| <li><a href="{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}">{{ page | pnumber }}</a></li> | |
| {% else %} | |
| <li><a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page | pnumber }}</a></li> | |
| {% endif %} | |
| {% endfor %} | |
| {% if paginator.next_page %} | |
| <li><a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">بعدی</a></li> | |
| {% else %} | |
| <li class="disabled"><a>بعدی</a></li> | |
| {% endif %} | |
| </ul> | |
| {% endif %} | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment