Method for allowing pagination #31

rattboi opened this Issue Jan 17, 2013 · 4 comments

2 participants


I'm using Misaki for my new blog, and just realized there's no way to have a something like a frontpage that has pagination. There's a 1-to-1 mapping between posts and the pages they generate, and I don't see how you would define a page (like index.html) that would actually compile to many pages with pagination.


Thank you for using misaki!

Do you want to realize pagination between index.html.clj, A.html.clj and B.html.clj in following file structure?

  +- posts dir
  |   |
  |   +- post files...
  +- index.html.clj
  +- A.html.clj
  +- B.html.clj

Actually, what I'm hoping for is something where I have a single template defined like "index.html.clj", and when there's a specific amount of information on the page, maybe defined as @numposts in the beginning, it will compile to multiple pages. Either like jekyll does, where you have index.html, then ./page2/index.html, ./page3/index.html, etc, OR have it render to index.html, index-1.html, index-2.html, etc.

For an example, look at my blog template at . Index.html.clj defines summarized blog posts, and the way misaki works now, all the posts I ever write will be shown on the page (unless I give some arbitrary drop number).

I'm not positive how this would fit into the compiler as it is now, but was hoping for some ideas.

@liquidz liquidz was assigned Jan 27, 2013
@liquidz liquidz added a commit that referenced this issue Jan 28, 2013
@liquidz #31 fix misaki.core/get-post-files ca6efec

@rattboi In dev branch, I added options such as :posts-per-page, :page-file-format, and :index-template-regexp.
Templates matching by :index-template-regexp will be compiled with pagination.

Sample pagination config is here.

@liquidz liquidz added a commit that referenced this issue Feb 6, 2013
@liquidz #31 add document 64914c6

Merged to master branch.

@liquidz liquidz closed this Feb 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment