Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.


    Customize Poi's Default index.html Template

    htmlHTML 5

    Poi ships with a sensible default for an index.html template, but it’s easy to override to customize and provide whatever you may need. You can change the title, update links, and even use the underscore templating system.



    Become a Member to view code

    You must be a Pro Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    orLog In




    Instructor: You'll notice in the DevTools, when Poi is running, there's a div with an id of app in here. Then it handles all the manifest, vendor, and client webpack stuff for you, but if you want to customize any of this stuff, you can just create a file called index.ejs.

    Then I'll create a div with an id of app. I'll put some text above it, so I'll say above, and some text below it -- I'll say below. Because I changed the template, I need to stop and start Poi again, so I'll run Poi. You can see now we have above, My awesome app, and below, which is reflected in the DevTools.

    If you need to configure anything in the head or anything outside of the body, then just delete the entire thing. I'll generate a page using Emmet, then I'll change the title to My awesome app, make sure I add back a div element with an id of app, hit save. You can see the title is now My awesome app, and the head changed to My awesome app, and webpack is still injecting all the scripts we need.