pugjs / pug

Pug – robust, elegant, feature rich template engine for Node.js
https://pugjs.org
21.68k stars 1.95k forks source link

Pagination without database of massive image gallery? Possible? #2106

Closed dlewand691 closed 9 years ago

dlewand691 commented 9 years ago

Wondering if there is a way to paginate a massive image gallery of what will probably be a few thousand entries without a database or PHP? If not, any recommendations? Jquery or similar? Trying to keep the site flat and clean.

TimothyGu commented 9 years ago

How is this related to Jade?

dlewand691 commented 9 years ago

I'm rebuilding a website from scratching using Jade, no CMS or back-end service so far. Was hoping there might be a solution given the rash of "flat-file", "No CMS" templating frameworks like Jekyll or Middleman.

Looking at other systems, if there was a way to build a loop that slices X number of entries into separate pages? Have not found any suggestions yet elsewhere, so thought I'd ask here as a possibility.

vai commented 9 years ago

I've enjoyed success using jade in tandem with front-matter, extracting metadata from the content provided as static, then using the json result as variables in the jade build. This allows for compile-time definition of menus, pagination etc. Specifically, I've used this approach with the http://roots.cx/ and https://github.com/carrot/roots-dynamic-content tooling. The idea also applies to gulp, grunt etc.

vai commented 9 years ago

more direct link to the idea: https://github.com/carrot/roots-dynamic-content/blob/master/docs/intro.md

dlewand691 commented 9 years ago

Wow thanks so much for the suggestions, I'll definitely check it out.

What are you thoughts on Harp, Wintersmith or Sigal?

TimothyGu commented 9 years ago

Not a Jade issue so closing. Feel free to continue the discussion though.