Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 1 | 'use strict'; |
2 | |||||
3 | // TODO: Automate this. Use Gulp | ||||
4 | const posthtml = require('posthtml'); | ||||
5 | const html = require('fs').readFileSync('partials/lightbox.html').toString(); | ||||
6 | |||||
7 | posthtml() | ||||
8 | .use(require('posthtml-include')({ encoding: 'utf-8', root: 'partials/' })) | ||||
9 | .process(html /*, options */) | ||||
10 | .then(function(result) { | ||||
11 | console.log(result.html); | ||||
12 | }) | ||||
13 | .catch(function(error) { | ||||
14 | console.error(error); | ||||
15 | }); |