Skip to content

Commit

Permalink
Upgrade to latest Lanyon
Browse files Browse the repository at this point in the history
  • Loading branch information
kvz committed Oct 29, 2019
1 parent b4048f3 commit 1152cc3
Show file tree
Hide file tree
Showing 6 changed files with 5,015 additions and 3,171 deletions.
31 changes: 14 additions & 17 deletions .gitignore
@@ -1,23 +1,20 @@
npm-debug.log
.jekyll-cache/
.jekyll-metadata
.lanyon
.lanyon/bin
assets/build
env.sh
node_modules

website/index.md
npm-debug.log
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/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 changes: 59 additions & 0 deletions .lanyonrc.js
@@ -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
}
8 changes: 4 additions & 4 deletions .travis.yml
Expand Up @@ -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
Expand Down
15 changes: 3 additions & 12 deletions package.json
Expand Up @@ -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",
Expand All @@ -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"
}
}
2 changes: 1 addition & 1 deletion website/_config.yml
@@ -1,4 +1,4 @@
title: BASH3 Boilerplate

gems:
plugins:
- jekyll-redirect-from

0 comments on commit 1152cc3

Please sign in to comment.