Go Templates
I normally split the HTML templates into several "sub templates". Here is the sub template for the "charts".
Go HTML template for the charts
<div id="chrt_cnt"> <canvas id="chrt1"></canvas> <canvas id="chrt2"></canvas> <canvas id="chrt3"></canvas> </div> <article> <p>Lorem ipsum..</p> </article> <script> {{ chart "tsk/bar/status/1" }} </script> <script> {{ chart "tsk/pie/status/2" }} </script> <script> {{ chart "tsk/line/status/3" }} </script>