Templates
A template is an HTML file with placeholders for variables. Brightspot’s templates are based on Handlebars.
The following snippet is an example of a simple template.
1<!DOCTYPE html>2<html>34<head>5<meta charset="UTF-8">6①<title>{{headline}}</title>7</head>89<body>10②<div>11<div>12③<h1>{{headline}}</h1>13</div>14<div>15④{{body}}16</div>17<div>18⑤<img src="{{imageUrl}}" height="300">19</div>20<div>21</body>2223</html>
- ①Declares a title tag, the value of which is a variable headline. (Literals in
{{double braces}}are placeholders for dynamic content.) - ②Opens an empty
<div>tag. - ③Declares an
h1tag, the value of which is a variable headline. - ④Declares a placeholder for the article's variable
body. - ⑤Declares an
imagetag, the source of which is a variable URL.