GithubHelp home page GithubHelp logo

Comments (3)

aularon avatar aularon commented on July 17, 2024

The issue is fixed now: There's a .templatesPath that defaults to ./views/%s.jade inside the module directory, one can also override it to set his own views. I will close this issue and the pull request.

Thank you for taking the time and helping the development of this module! :)

from node-penguin.

joejean avatar joejean commented on July 17, 2024

I'm using nunjucks as my default view engine and when I go to /admin I get a template not found error: "template not found: /home/joe/Documents/chipin/node_modules/penguin/views/index.jade"
I have given all access penguin/views folder. Can you please help me with that issue? Thanks.

from node-penguin.

sogko avatar sogko commented on July 17, 2024

Hi @joejean

You can specify the templatesPath options, for e.g.:

path = require('path')
penguin = require("penguin")
admin = new penguin.Admin {
  templatesPath: path.resolve(__dirname, '../views/', '%s.html')
}
...

Assuming that your nunchucks templates have .html extensions and are in views folder one level up.
node-penguin will replace the %s with the name of the required view.

Hope this helps!

from node-penguin.

Related Issues (8)

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.