mirror of
https://github.com/kvz/bash3boilerplate.git
synced 2025-01-31 07:25:20 +00:00
Upgrade to latest Lanyon
This commit is contained in:
parent
b4048f3f12
commit
1152cc3cf7
39
.gitignore
vendored
39
.gitignore
vendored
@ -1,23 +1,20 @@
|
|||||||
npm-debug.log
|
.jekyll-cache/
|
||||||
node_modules
|
.jekyll-metadata
|
||||||
|
|
||||||
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
|
|
||||||
.lanyon
|
.lanyon
|
||||||
.lanyon/bin
|
.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
59
.lanyonrc.js
Normal 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
|
||||||
|
}
|
@ -33,10 +33,10 @@ before_install:
|
|||||||
- awk --version
|
- awk --version
|
||||||
before_cache:
|
before_cache:
|
||||||
- rm -f ./node_modules/.bin/which
|
- rm -f ./node_modules/.bin/which
|
||||||
cache:
|
# cache:
|
||||||
apt: true
|
# apt: true
|
||||||
directories:
|
# directories:
|
||||||
- .lanyon
|
# - .lanyon
|
||||||
script: test/acceptance.sh
|
script: test/acceptance.sh
|
||||||
deploy:
|
deploy:
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
|
15
package.json
15
package.json
@ -7,6 +7,7 @@
|
|||||||
"build": "lanyon build",
|
"build": "lanyon build",
|
||||||
"deploy": "lanyon deploy",
|
"deploy": "lanyon deploy",
|
||||||
"encrypt": "lanyon encrypt",
|
"encrypt": "lanyon encrypt",
|
||||||
|
"inject": "./_scripts/inject.sh",
|
||||||
"install:lanyon": "lanyon install",
|
"install:lanyon": "lanyon install",
|
||||||
"lint": "shellcheck --shell=bash $(find . -name '*.sh' -maxdepth 2)",
|
"lint": "shellcheck --shell=bash $(find . -name '*.sh' -maxdepth 2)",
|
||||||
"release:major": "env SEMANTIC=major npm run release",
|
"release:major": "env SEMANTIC=major npm run release",
|
||||||
@ -22,26 +23,16 @@
|
|||||||
"version:current": "node -e 'console.log(require(\"./package.json\").version)'",
|
"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"
|
"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": {
|
"optionalDependencies": {
|
||||||
"fsevents": "*"
|
"fsevents": "*"
|
||||||
},
|
},
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browser-sync": "2.18.5",
|
|
||||||
"cross-env": "3.1.3",
|
"cross-env": "3.1.3",
|
||||||
"fakefile": "0.0.8",
|
"fakefile": "0.0.8",
|
||||||
"lanyon": "0.0.92",
|
"lanyon": "0.1.7",
|
||||||
"next-update": "1.5.1",
|
"next-update": "1.5.1",
|
||||||
"npm-run-all": "3.1.2",
|
"npm-run-all": "3.1.2",
|
||||||
"replace": "^0.3.0"
|
"replace": "0.3.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
title: BASH3 Boilerplate
|
title: BASH3 Boilerplate
|
||||||
|
|
||||||
gems:
|
plugins:
|
||||||
- jekyll-redirect-from
|
- jekyll-redirect-from
|
||||||
|
Loading…
x
Reference in New Issue
Block a user