Search code examples
blogger

How do I upload my vanilla js project to blogger blogspot.com?


I've made an application in plain javascript and I want to host it in blogger i.e blogspot.com. How do I do it?

I could not find any articles for it online.


Solution

  • Here is how you can do it:

    edit the HTML (Theme > customize > Edit HTML), strip down the XML template, removing all non-essential elements.

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE html>
    <html b:css='false' b:js='false'>
      <head>
        <b:if cond='false'><b:skin><![CDATA[]]></b:skin></b:if>
        <!-- add head contents here -->
      </head>
      <body>
        <b:if cond='false'><b:section id='section'/></b:if>
        <!-- add body contents here -->
      </body>
    </html>
    

    copy the files from your project to Blogger HTML editor