added site generator meta

This commit is contained in:
suroh 2023-01-10 18:07:18 +01:00
parent 16df272804
commit 2aff9d06fc
4 changed files with 82 additions and 53 deletions

View File

@ -2,7 +2,6 @@ const markdownIt = require('markdown-it')
const mdla = require('markdown-it-link-attributes') const mdla = require('markdown-it-link-attributes')
module.exports = (config) => { module.exports = (config) => {
// markdown setup // markdown setup
const mdOptions = { const mdOptions = {
html: true, html: true,
@ -16,13 +15,12 @@ module.exports = (config) => {
}, },
attrs: { attrs: {
rel: 'me', rel: 'me',
target: '_blank' target: '_blank',
} },
}) })
.disable("code") .disable('code')
config.setLibrary("md", markdownLib)
config.setLibrary('md', markdownLib)
// add collection for pages // add collection for pages
config.addCollection('pages', (collection) => { config.addCollection('pages', (collection) => {
@ -46,24 +44,24 @@ module.exports = (config) => {
}) })
// custom filters // custom filters
config.addFilter("makeLowercase", (value) => { config.addFilter('makeLowercase', (value) => {
if (typeof value === 'string' || value instanceof String) { if (typeof value === 'string' || value instanceof String) {
return value.toLowerCase() return value.toLowerCase()
} }
}) })
// added passthrough for global assets // added passthrough for global assets
config.addPassthroughCopy("assets") config.addPassthroughCopy('assets')
// added passthrough for images in their respective folders // added passthrough for images in their respective folders
config.addPassthroughCopy("_content/**/images/**") config.addPassthroughCopy('_content/**/images/**')
// reutrn updated config // reutrn updated config
return { return {
dir: { dir: {
input: "_content", // content input: '_content', // content
includes: "../_includes", // templates includes: '../_includes', // templates
output: "_site", // rendered site output: '_site', // rendered site
data: "../_data" // global data files data: '../_data', // global data files
} },
} }
} }

View File

@ -1,36 +1,72 @@
{ {
"env": { "env": {
"browser": true, "browser": true,
"commonjs": true, "commonjs": true,
"es2021": false, "es2021": false,
"node": true "node": true
}, },
"extends": "eslint:recommended", "extends": "eslint:recommended",
"parserOptions": { "parserOptions": {
"ecmaVersion": "latest" "ecmaVersion": "latest"
}, },
"rules": { "rules": {
"no-var": "error", "no-var": "error",
"semi": ["error", "never"], "semi": [
"quotes": ["error", "single"], "error",
"indent": ["error", 2], "never"
"arrow-spacing": "error", ],
"array-bracket-spacing": ["error", "always"], "quotes": [
"array-bracket-newline": ["error", "consistent"], "error",
"object-curly-spacing": ["error", "always"], "single"
"object-curly-newline": ["error", { "consistent": true }], ],
"space-before-blocks": ["error", "always"] "indent": [
}, "error",
"overrides": [ 2
],
"arrow-spacing": "error",
"array-bracket-spacing": [
"error",
"always"
],
"array-bracket-newline": [
"error",
"consistent"
],
"object-curly-spacing": [
"error",
"always"
],
"object-curly-newline": [
"error",
{ {
"files": ["./assets/**/*.js"], "consistent": true
"env": { }
"commonjs": false, ],
"node": false "space-before-blocks": [
}, "error",
"parserOptions": { "always"
"sourceType": "module" ],
} "array-bracket-spacing": [
"error",
"always",
{
"objectsInArrays": "false",
"arraysInArrays": "false"
} }
] ]
},
"overrides": [
{
"files": [
"./assets/**/*.js"
],
"env": {
"commonjs": false,
"node": false
},
"parserOptions": {
"sourceType": "module"
}
}
]
} }

View File

@ -1,8 +0,0 @@
{
"siteName" : "wrk.suroh",
"categories": [
"work",
"audio",
"other"
]
}

View File

@ -7,6 +7,9 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{ siteSettings.siteName }}</title> <title>{{ siteSettings.siteName }}</title>
<meta name="generator" content="{{ siteSettings.generator }}">
<!-- styles --> <!-- styles -->
<link rel="stylesheet" href="/assets/css/master.css"> <link rel="stylesheet" href="/assets/css/master.css">