nanopage
nanopage copied to clipboard
Restructuring
Added all sorts of fun stuff here.
-
Flat state for files, no more
files
key in pages, but uses regex in the same way asfind
. - Cleanup to reduce general clutter.
-
File utilities via
require('nanopage/file')
. - Testing to cover these changes.
- Documentation to explain what’s going on.
Still need some work, but though to create a pull request to begin tracking progress for what’s being discussed for content state
. For example, we should determine what utilities we’d like file
to expose. Perhaps something related to sizes
and dimensions
?
Can now start messing with this by using the next
tag on npm.
npm i nanopage@next --save
A fun new one. Both the page()
and file()
methods accept a glob in addition to a path (string) and state (obj).
var images = page('../*.jpg').toArray()
Relative urls have also been introduced.
var parentTitle = page('../').value('title')
This has been published as next2
to npm under the @next
tag.