Giter VIP home page Giter VIP logo

shaekuronen / grunt-ejs-static Goto Github PK

View Code? Open in Web Editor NEW
31.0 31.0 8.0 990 KB

Grunt EJS Static is a static site generator built with EJS and Grunt. Pages are defined in JSON by declaring the layout file and any additional data needed at render time. The layout file manages EJS Includes, which are partials organized in the components directory.

Home Page: https://npmjs.org/package/grunt-ejs-static

License: MIT License

JavaScript 69.67% CSS 30.33%

grunt-ejs-static's People

Contributors

shaekuronen avatar simonwgill avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

grunt-ejs-static's Issues

Internationalization

I would like to use grunt-ejs-static with i18n-2, is this something you have planned to enable at some point?

path_to_data to accept array of strings inside Gruntfile too?

I would love for the path_to_data option to be able to accept an array of strings as well as a string as it can inside of the data.json files. I'm trying to build an i18n enabled website and want to be able to run this inside of a Grunt custom task to loop through and build separate templates from a single source with multiple languages, eg:
path_to_data: ['json/site.json', 'json/i18n/en.json'],
path_to_data: ['json/site.json', 'json/i18n/de.json']

etc.

What do you think of this idea? If you like it, I'll happily fork this and provide a pull request if needed :)

template extending

Hi! I'm just looking for an HTML-like template engine to compile many different html pieces into many other pages. EJS looks great and your grunt-ejs-static task too!

Include feature makes possible to include some partials into a single file, which is great, but extending is more likely to be correct for layouting. Imagine that I want to build 3 pages with different content but within one layout: main, blog and post.

Now I'm set to make 3 different so-called layouts looking pretty the same. The first one will include head.ejs, main.ejs and foot.ejs, the second one will have head.ejs, blog.ejs and foot.ejs included and the last one will have head.ejs, post.ejs and foot.ejs.

Instead of this duplication I'll be happy to make one layout with head and foot includes, then create there a block named content for example and then create pages. Each page may redefine this block using keyword extend with block name or something similar.

I realize EJS itself didn't have importing features before you made it.
Is it possible to make extending? May I help you with this job?
Thanks!

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.