0

I am using deno and denjucks as templating engine. in template .html file header section, I am linking my external css file but failed. the code-

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
        integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
    <!-- custom css -->
    <link rel="stylesheet" href='../static/style.css'>

the file format is -

main
 static
  style.css
 templates
  index.html

Bootstrap link is working but custom css link is not working. Please suggest what is wrong.

  • Show your server code. – Marcos Casagrande Jun 06 '20 at 17:23
  • import denjucks from "https://deno.land/x/denjucks/mod.js"; denjucks.configure("templates", { autoescape: true }); const users = db.collection("users"); export default { main(context: any) { context.response.body = denjucks.render( "index.html", { txt: " This is my World" }, ); } This is the server code from where template is calling. – ashok kumar Jun 07 '20 at 02:50
  • 1
    Update your answer with the code, thanks :) – Marcos Casagrande Jun 07 '20 at 10:53
  • If I use Flask and Jinja2, I can do something like this: How do I do something like this with denjucks, deno and oak ? Or lets say what is the standard approach in denjucks to tell the index.html which folders it should use to look for css, js & img files? – ashok kumar Jun 07 '20 at 11:59
  • 1
    Update your function with your server code, and I'll give you the answer, without knowing what you have, it's hard to tell. – Marcos Casagrande Jun 07 '20 at 12:40

0 Answers0