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

@ -11,19 +11,55 @@
}, },
"rules": { "rules": {
"no-var": "error", "no-var": "error",
"semi": ["error", "never"], "semi": [
"quotes": ["error", "single"], "error",
"indent": ["error", 2], "never"
],
"quotes": [
"error",
"single"
],
"indent": [
"error",
2
],
"arrow-spacing": "error", "arrow-spacing": "error",
"array-bracket-spacing": ["error", "always"], "array-bracket-spacing": [
"array-bracket-newline": ["error", "consistent"], "error",
"object-curly-spacing": ["error", "always"], "always"
"object-curly-newline": ["error", { "consistent": true }], ],
"space-before-blocks": ["error", "always"] "array-bracket-newline": [
"error",
"consistent"
],
"object-curly-spacing": [
"error",
"always"
],
"object-curly-newline": [
"error",
{
"consistent": true
}
],
"space-before-blocks": [
"error",
"always"
],
"array-bracket-spacing": [
"error",
"always",
{
"objectsInArrays": "false",
"arraysInArrays": "false"
}
]
}, },
"overrides": [ "overrides": [
{ {
"files": ["./assets/**/*.js"], "files": [
"./assets/**/*.js"
],
"env": { "env": {
"commonjs": false, "commonjs": false,
"node": false "node": false

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">