Skip to content

etabits/wintersmith-nap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wintersmith-nap

Minimalistic plugin to connect wintersmith with nap

Usage

Installation

npm install wintersmith-nap

Or alternatively, define it as a dependency in your wintersmith's project package.json

Configuration

In wintersmith's config.json, add wintersmith-nap to your plugins array, and provide nap config inside nap key:

{
  "locals": {
    "title": "My Amazing Static Site!"
  },
  "plugins": ["wintersmith-nap"],
  "nap": {
    "assets": {
      "css": {
        "main": ["/css/*"]
      },
      "js": {
        "main": ["/js/*"]
      }
    }
  }
}

Embedding into template

Next, in your template files, probably layout, you can call nap to output your assets links:

!!! 5
html(lang='en')
  head
    meta(charset='utf-8')
    title= locals.title
    != nap.css('main')
  body
    h1= title
    != nap.js('main')

That's it!


For a production website as an example, refer to etabits/website

About

Minimalistic plugin to connect wintersmith with nap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •