Giter Site home page Giter Site logo

njk-cli / njk Goto Github PK

View Code? Open in Web Editor NEW
19.0 4.0 6.0 828 KB

Render nunjucks templates with markdown and front-matter

Home Page: https://www.npmjs.com/package/njk

License: MIT License

JavaScript 100.00%
nunjucks markdown frontmatter zero-configuration njk cli template html

njk's People

Contributors

borracciablu avatar dependabot[bot] avatar greenkeeper[bot] avatar mohitsinghs avatar satoryu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

njk's Issues

thank you for service

sad to hear njk is no longer receiving lts. i enjoyed it while it lasted. may i ask what alternatives you are using?

globby error

I really wish this package would work like it claims to.

Here's the command line I'm trying to run

njk ./content -t ./templates -o _site/

I have .md files in ./content, .njk templates in ./templates and expecting everything to bundle up nicely in _site/. Instead, globby throws an error.

throw new TypeError('Patterns must be a string or an array of strings');

It looks like your package uses globby.sync twice, the first one seems to have the ['./content'] argument I'm passing but the second time around assigning -t ./templates just sends in undefined. I can see my process.argv is passing in all the arguments that I'm sending. Looks like your commander losing them.

Output directory

When using njk src/html/*.html --out dist files are being created in dist/src/html instead of directly to dist. So, for example src/html/index.html gets output to dist/src/html/index.html.

Is it possible to get the output to be dist/index.html instead of including the extra source folders? Thanks for the great CLI tool!

Watch mode failed to render

I'm pretty frequently getting messages like the following and an empty file when running in watch mode on Ubuntu 18.10:

ℹ Changed template src/html/index.html
⚠ Failed to render src/html/index.html, null output
✔ Wrote index.html

If I save the file again, it seems to build correctly. I also have the verbose flag enabled, but those are the only messages I'm seeing.

I think it might be related to babel/babel#4332 and postcss/postcss-cli#215, which were both fixed by adding awaitWriteFinish options to chokidar.watch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.