build: ✨ initialize project
This commit is contained in:
commit
98eb24f9d0
5 changed files with 3182 additions and 0 deletions
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
.cache
|
||||||
|
.vscode
|
||||||
|
node_modules
|
||||||
|
public
|
8
.prettierrc
Normal file
8
.prettierrc
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/prettierrc",
|
||||||
|
"semi": true,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"singleQuote": true,
|
||||||
|
"printWidth": 100,
|
||||||
|
"trailingComma": "none"
|
||||||
|
}
|
48
eleventy.config.js
Normal file
48
eleventy.config.js
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
import eleventyPluginNavigation from '@11ty/eleventy-navigation';
|
||||||
|
import eleventyPluginWebc from '@11ty/eleventy-plugin-webc';
|
||||||
|
import { eleventyImagePlugin, eleventyImageTransformPlugin } from '@11ty/eleventy-img';
|
||||||
|
|
||||||
|
const IMAGE_TRANSFORM_OPTS = {
|
||||||
|
// Set global default options
|
||||||
|
formats: ['avif', 'webp', 'auto'],
|
||||||
|
sharpJpegOptions: { mozjpeg: true, optimiseScans: true, quality: 95 },
|
||||||
|
sharpPngOptions: { compressionLevel: 9 },
|
||||||
|
urlPath: '/img/',
|
||||||
|
// Notably `outputDir` is resolved automatically
|
||||||
|
// to the project output directory
|
||||||
|
defaultAttributes: {
|
||||||
|
loading: 'lazy',
|
||||||
|
decoding: 'async',
|
||||||
|
sizes: '(min-width: 64em) 500px, (min-width: 50em) 420px, 375px'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default async function (eleventyConfig) {
|
||||||
|
eleventyConfig.addPassthroughCopy("./src/fonts/");
|
||||||
|
|
||||||
|
eleventyConfig.addCollection('sebin', (collection) =>
|
||||||
|
collection.getFilteredByGlob('./src/sebin/*.md')
|
||||||
|
);
|
||||||
|
eleventyConfig.addCollection('viktor', (collection) =>
|
||||||
|
collection.getFilteredByGlob('./src/viktor/*.md')
|
||||||
|
);
|
||||||
|
eleventyConfig.addCollection('jarek', (collection) =>
|
||||||
|
collection.getFilteredByGlob('./src/jarek/*.md')
|
||||||
|
);
|
||||||
|
|
||||||
|
eleventyConfig.addPlugin(eleventyPluginWebc, {
|
||||||
|
components: ['src/components/*.webc', 'npm:@11ty/eleventy-img/*.webc']
|
||||||
|
});
|
||||||
|
eleventyConfig.addPlugin(eleventyPluginNavigation);
|
||||||
|
eleventyConfig.addPlugin(eleventyImagePlugin, IMAGE_TRANSFORM_OPTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const config = {
|
||||||
|
dir: {
|
||||||
|
input: 'src',
|
||||||
|
output: 'public',
|
||||||
|
layouts: 'layouts',
|
||||||
|
includes: 'includes'
|
||||||
|
},
|
||||||
|
markdownTemplateEngine: 'webc'
|
||||||
|
};
|
3101
package-lock.json
generated
Normal file
3101
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
21
package.json
Normal file
21
package.json
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "character-ref",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"start": "eleventy --serve ",
|
||||||
|
"build": "ELEVENTY_PRODUCTION=true eleventy",
|
||||||
|
"prebuild": "rm -rf ./public"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"description": "",
|
||||||
|
"type": "module",
|
||||||
|
"dependencies": {
|
||||||
|
"@11ty/eleventy": "^3.0.0",
|
||||||
|
"@11ty/eleventy-img": "^6.0.1",
|
||||||
|
"@11ty/eleventy-navigation": "^1.0.1",
|
||||||
|
"@11ty/eleventy-plugin-webc": "^0.11.2"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue