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

View File

@ -11,19 +11,55 @@
},
"rules": {
"no-var": "error",
"semi": ["error", "never"],
"quotes": ["error", "single"],
"indent": ["error", 2],
"semi": [
"error",
"never"
],
"quotes": [
"error",
"single"
],
"indent": [
"error",
2
],
"arrow-spacing": "error",
"array-bracket-spacing": ["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"
],
"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": [
{
"files": ["./assets/**/*.js"],
"files": [
"./assets/**/*.js"
],
"env": {
"commonjs": 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">
<title>{{ siteSettings.siteName }}</title>
<meta name="generator" content="{{ siteSettings.generator }}">
<!-- styles -->
<link rel="stylesheet" href="/assets/css/master.css">