Skip to content

Commit 6abdcbd

Browse files
authored
Implement 11ty (#6)
* Implement 11ty * Update 11ty * Replace everything by 11ty * finish * Fix header * remove additional script * Remove some lit implementation for inline * Put inline some detail pages * Remove amap of lit and remove content showing without css at first
1 parent 74b29d5 commit 6abdcbd

36 files changed

Lines changed: 3289 additions & 1419 deletions

.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)