Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Alberto Matus
    hey all, how to get the title of document in ejs, eg: in javascript alert(document.title)
    want to assign it to a variable
    Ksusha Rodchenko
    Hi, Is anybody here?
    Owen Mills
    I am :#
    Kirill Berezin
    Sup guys?
    Sorry, im here
    @ajMatus_twitter <% var test = document.title %>
    Yeahia Md Abid

    Can anyone tell me how can i render data in html..
    my temple engine set to

    app.engine('html', require('ejs').renderFile);
    app.set('view engine', 'html');

    i want render file in html with ejs render syntex
    like <%= title %>
    I am having some trouble figuring out how the header and body and footer are working together, and how I can link to an external styling file. I Am working with one of the bigger file systems that I have delt with, and I am trying to stay organized, especially as I get more into the project
    Right now, the file system stands like this: Screen Shot 2018-06-18 at 12.49.12 PM
    Screen Shot 2018-06-18 at 12.49.12 PM.png
    And I am trying to get from the header file in the partials folder to load the style part in the public folder. There are going to be more directories added, so I am not sure what to do here
    Maciej Pędzich
    Hi guys! Just enrolled...

    why does

    // this 
    <% if(value != null) { %>
    // this
    <% if(value != ‘undefined’) {%>
    or with double ==

    doesn’t work? I get the following error

    TypeError: Cannot read property '0' of null

    Backend Code is as follows

    render(‘page’, { value : [{a,b,c}] })

    anyone has idea? how do you evaluate codes in EJS template?

    Brian Yang

    hello! has anybody else had issues using ejs with rollup?

    seems it will only allow me to use cjs. when i use es6 import i get this error:

    rollup v0.62.0
    bundles src/index.tsx → dist/index.es.js...
    [!] Error: Unexpected token
    node_modules/ejs/package.json (2:8)
    1: {
    2:   "name": "ejs",
    3:   "description": "Embedded JavaScript templates",
    4:   "keywords": [

    in my application file with typescript i'm using this:
    import * as ejs from 'ejs'

    in my rollup config i have this:

    export default {
      input: 'src/index.tsx',
      output: [
          file: pkg.module,
          format: 'es',
          exports: 'named',
          sourcemap: true,
          external: [ 'ejs' ] // <-- suppresses the warning
      plugins: [
          modules: false

    anybody with suggestions on where i should look?

    Thanks in advance!