Skip to content

Restructuring#14

Open
jondashkyle wants to merge 18 commits intomasterfrom
dev
Open

Restructuring#14
jondashkyle wants to merge 18 commits intomasterfrom
dev

Conversation

@jondashkyle
Copy link
Copy Markdown
Owner

@jondashkyle jondashkyle commented May 20, 2018

Added all sorts of fun stuff here.

  • Flat state for files, no more files key in pages, but uses regex in the same way as find.
  • 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?

@jondashkyle jondashkyle requested a review from jongacnik May 20, 2018 05:12
@jondashkyle jondashkyle mentioned this pull request May 20, 2018
Closed
@jondashkyle
Copy link
Copy Markdown
Owner Author

Can now start messing with this by using the next tag on npm.

npm i nanopage@next --save

@jondashkyle
Copy link
Copy Markdown
Owner Author

jondashkyle commented May 24, 2018

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()

@jondashkyle
Copy link
Copy Markdown
Owner Author

Relative urls have also been introduced.

var parentTitle = page('../').value('title')

This has been published as next2 to npm under the @next tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant