Upgrade to latest Lanyon

This commit is contained in:
Kevin van Zonneveld 2019-10-29 09:14:02 +01:00
parent b4048f3f12
commit 1152cc3cf7
6 changed files with 5030 additions and 3186 deletions

39
.gitignore vendored
View File

@ -1,23 +1,20 @@
npm-debug.log
node_modules
website/index.md
website/_site/
website/_vendor/
website/changelog.md
website/faq.md
website/.jekyll-metadata
env.sh
website/main.sh
website/assets/build
website/.lanyon
website/.lanyon/vendor/bin
website/.lanyon/bin
assets/build
.jekyll-cache/
.jekyll-metadata
.lanyon
.lanyon/bin
assets/build
env.sh
node_modules
npm-debug.log
website/_site/
website/_vendor/
website/.jekyll-metadata
website/.lanyon
website/.lanyon/bin
website/.lanyon/vendor/bin
website/assets/build
website/changelog.md
website/faq.md
website/index.md
website/main.shwebsite/.lanyon
website/main.sh

59
.lanyonrc.js Normal file
View File

@ -0,0 +1,59 @@
const path = require('path')
const _ = require('lodash')
module.exports.overrideRuntime = function ({ runtime, toolkit }) {
let preBuilds = []
let postBuilds = []
if (!runtime.isDev) {
preBuilds = preBuilds.concat([
'npm run inject',
])
postBuilds = postBuilds.concat([
// 'npm run redirects',
])
}
// "lanyon": {
// "projectDir": "website",
// "contentScandir": "../",
// "contentIgnore": [
// "website/*.md",
// "website/main.sh"
// ]
// },
// runtime['npmRoot'] = `${__dirname}`
runtime.projectDir = `${__dirname}/website`
runtime.cacheDir = path.join(runtime.projectDir, '.lanyon')
runtime.recordsPath = path.join(runtime.cacheDir, 'records.json')
runtime.assetsSourceDir = path.join(runtime.projectDir, 'assets')
runtime.assetsBuildDir = path.join(runtime.assetsSourceDir, 'build')
runtime.contentScandir = path.join(runtime.projectDir, runtime.contentScandir || '.')
runtime.contentBuildDir = path.join(runtime.projectDir, '_site')
runtime['prebuild:content'] = preBuilds.join(' && ')
runtime['postbuild:content'] = postBuilds.join(' && ')
return runtime
}
module.exports.overrideConfig = function ({ config, toolkit }) {
if (config.runtime.isDev) {
config.jekyll.url = 'http://localhost:3000'
}
config.jekyll.profile = true
config.jekyll.trace = true
if (config.runtime.isDev) {
config.jekyll.unpublished = true
config.jekyll.future = true
config.jekyll.incremental = true // <-- for clarify; incremental is the default also
} else {
config.jekyll.incremental = false
}
return config
}

View File

@ -33,10 +33,10 @@ before_install:
- awk --version
before_cache:
- rm -f ./node_modules/.bin/which
cache:
apt: true
directories:
- .lanyon
# cache:
# apt: true
# directories:
# - .lanyon
script: test/acceptance.sh
deploy:
skip_cleanup: true

View File

@ -7,6 +7,7 @@
"build": "lanyon build",
"deploy": "lanyon deploy",
"encrypt": "lanyon encrypt",
"inject": "./_scripts/inject.sh",
"install:lanyon": "lanyon install",
"lint": "shellcheck --shell=bash $(find . -name '*.sh' -maxdepth 2)",
"release:major": "env SEMANTIC=major npm run release",
@ -22,26 +23,16 @@
"version:current": "node -e 'console.log(require(\"./package.json\").version)'",
"version:replace": "replace 'v\\d+\\.\\d+\\.\\d+' \"v$(npm run --silent version:current)\" main.sh src/*.sh"
},
"lanyon": {
"projectDir": "website",
"prebuild": "./_scripts/inject.sh",
"contentScandir": "../",
"contentIgnore": [
"website/*.md",
"website/main.sh"
]
},
"optionalDependencies": {
"fsevents": "*"
},
"dependencies": {},
"devDependencies": {
"browser-sync": "2.18.5",
"cross-env": "3.1.3",
"fakefile": "0.0.8",
"lanyon": "0.0.92",
"lanyon": "0.1.7",
"next-update": "1.5.1",
"npm-run-all": "3.1.2",
"replace": "^0.3.0"
"replace": "0.3.0"
}
}

View File

@ -1,4 +1,4 @@
title: BASH3 Boilerplate
gems:
plugins:
- jekyll-redirect-from

8093
yarn.lock

File diff suppressed because it is too large Load Diff