-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_config.js
56 lines (47 loc) · 1.27 KB
/
_config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import lume from 'lume/mod.ts';
import imagick from 'lume/plugins/imagick.ts';
import lightning_css from 'lume/plugins/lightningcss.ts';
import source_maps from 'lume/plugins/source_maps.ts';
import { getLumeVersion } from 'lume/core/utils.ts';
import { computeTargets } from './helpers/util.ts';
const site = lume({
src: 'src',
dest: 'out',
});
site.data('lume_version', getLumeVersion());
site.filter('log', console.log);
site.addEventListener('afterBuild', async (_event) => {
const fontFiles = [
'files/noto-serif-hebrew-hebrew-wght-normal.woff2',
'files/noto-serif-hebrew-latin-wght-normal.woff2',
'files/noto-serif-hebrew-latin-ext-wght-normal.woff2',
'wght.css',
];
await Deno.mkdir(site.dest('fonts/noto-serif-hebrew/files'), {
recursive: true,
});
for await (const file of fontFiles) {
await Deno.copyFile(
`${Deno.cwd()}/node_modules/@fontsource-variable/noto-serif-hebrew/${file}`,
site.dest('fonts/noto-serif-hebrew/' + file),
);
}
});
site.copy('static', '.');
site.loadAssets(['.js']);
site.use(lightning_css({
includes: 'css/includes',
options: {
targets: computeTargets([
'> 0.5%',
'last 2 versions',
'FF ESR',
'not dead',
]),
},
}));
site.use(source_maps({
sourceContent: true,
}));
site.use(imagick());
export default site;