Skip to content

Commit 3e7698c

Browse files
authored
Merge pull request #9 from OpenHomeFoundation/11ty-fix
11ty fix
2 parents b720d02 + cf1f608 commit 3e7698c

36 files changed

+3292
-1419
lines changed

.eleventy.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { env } from 'process';
2+
3+
import { minify } from 'html-minifier-terser';
4+
5+
export default function (eleventyConfig) {
6+
// Copy static assets
7+
eleventyConfig.addPassthroughCopy('public');
8+
9+
// In dev mode, don't minify
10+
if (env.NODE_ENV === 'production') {
11+
eleventyConfig.addTransform('htmlmin', function (content, outputPath) {
12+
if (outputPath?.endsWith('.html')) {
13+
const minified = minify(content, {
14+
useShortDoctype: true,
15+
removeComments: true,
16+
collapseWhitespace: true,
17+
minifyCSS: true,
18+
minifyJS: {
19+
safari10: false,
20+
ecma: undefined,
21+
output: { comments: false },
22+
},
23+
});
24+
return minified;
25+
}
26+
return content;
27+
});
28+
}
29+
30+
return {
31+
dir: {
32+
input: 'src-11ty',
33+
output: 'dist',
34+
},
35+
};
36+
}

home-assistant-connect-zwa-2/index.html

Lines changed: 0 additions & 27 deletions
This file was deleted.

home-assistant-connect-zwa-2/install-portable.html

Lines changed: 0 additions & 102 deletions
This file was deleted.

home-assistant-connect-zwa-2/install.html

Lines changed: 0 additions & 98 deletions
This file was deleted.

home-assistant-connect-zwa-2/use-poe.html

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)