Get started with jade CDN

MIT licensed

Jade: popular Node.js templating engine compiling HTML from unique syntax templates.

Tags:
  • template
  • jade

Stable version

Copied!

How to start using jade CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with jade CDN - cdnhub.io</title>
  <script src="https://cdn.cdnhub.io/jade/1.11.0/jade.min.js"></script>
  <script>
    const jade = require('jade');

    const template = `
      doctype html
      html(lang="en")
        head
          meta(charset="UTF-8")
          meta(name="viewport", content="width=device-width, initial-scale=1.0")
          title Jade Example
        body
          h1 Hello, Jade!
          p Welcome to the Jade template engine!
    `;

    const compiled = jade.compile(template);
    const html = jade.render(null, compiled);

    document.open();
    document.write(html);
    document.close();
  </script>
</head>
<body>
</body>
</html>
Copied!
Copied!
Copied!
Copied!

All versions