Deprecate Lanyon-based website in favor of a simple redirect to github
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,7 +1,7 @@
|
|||||||
Thanks for contributing to b3bp! As part of your PR, have you:
|
Thanks for contributing to b3bp! As part of your PR, have you:
|
||||||
|
|
||||||
- [ ] Added an item in [CHANGELOG.md](https://github.com/kvz/bash3boilerplate/blob/master/CHANGELOG.md) with attribution?
|
- [ ] Added an item in [CHANGELOG.md](https://github.com/kvz/bash3boilerplate/blob/HEAD/CHANGELOG.md) with attribution?
|
||||||
- [ ] Added your name to the [README.md](https://github.com/kvz/bash3boilerplate/blob/master/README.md#authors)
|
- [ ] Added your name to the [README.md](https://github.com/kvz/bash3boilerplate/blob/HEAD/README.md#authors)
|
||||||
- [ ] Linted your code? (`make test` should do the trick)
|
- [ ] Linted your code? (`make test` should do the trick)
|
||||||
|
|
||||||
If so, great! Feel free to replace this message with a description of your work and hit submit!
|
If so, great! Feel free to replace this message with a description of your work and hit submit!
|
||||||
|
37
.github/workflows/ci.yml
vendored
@ -2,7 +2,7 @@ name: b3bp CI
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
@ -10,38 +10,17 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps :
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- uses: actions/setup-node@master
|
- uses: actions/setup-node@master
|
||||||
with:
|
with:
|
||||||
node-version: 10.x
|
node-version: 18.x
|
||||||
- name: Get yarn cache directory path
|
|
||||||
id : yarn-cache-dir-path
|
|
||||||
run : echo "##[set-output name=dir;]$(yarn cache dir)"
|
|
||||||
- uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
||||||
key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-yarn-
|
|
||||||
- uses: sergioramos/yarn-actions/install@master
|
|
||||||
with:
|
|
||||||
frozen-lockfile: true
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run : |
|
run: |
|
||||||
yarn test
|
corepack yarn test
|
||||||
- name: Website Build
|
- name: Website Build
|
||||||
if : github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/main'
|
||||||
run : |
|
run: |
|
||||||
yarn inject
|
cp README.md website/
|
||||||
yarn build:production
|
|
||||||
- name: Website Deploy 🚀
|
|
||||||
if : github.ref == 'refs/heads/master'
|
|
||||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
|
||||||
with:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
BRANCH : gh-pages # The branch the action should deploy to.
|
|
||||||
FOLDER : website/_site # The folder the action should deploy.
|
|
||||||
CLEAN : true # Automatically remove deleted files from the deploy branch
|
|
||||||
|
18
.gitignore
vendored
@ -1,21 +1,5 @@
|
|||||||
.jekyll-cache/
|
.yarn
|
||||||
.jekyll-metadata
|
|
||||||
.lanyon
|
|
||||||
.lanyon/bin
|
|
||||||
assets/build
|
assets/build
|
||||||
env.sh
|
env.sh
|
||||||
node_modules
|
node_modules
|
||||||
npm-debug.log
|
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.sh
|
|
||||||
website/_includes/_generated_assets/app-production-body.html
|
|
||||||
website/_includes/_generated_assets/app-production-head.html
|
|
||||||
|
61
.lanyonrc.js
@ -1,61 +0,0 @@
|
|||||||
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'
|
|
||||||
} else {
|
|
||||||
config.jekyll.url = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
1
.yarnrc.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
nodeLinker: node-modules
|
28
CHANGELOG.md
@ -8,16 +8,16 @@ Unplanned.
|
|||||||
|
|
||||||
- [ ] Better style guide checking (#84)
|
- [ ] Better style guide checking (#84)
|
||||||
|
|
||||||
## master
|
## main
|
||||||
|
|
||||||
Released: TBA.
|
Released: TBA.
|
||||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.4.2...master).
|
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.4.2...main).
|
||||||
|
|
||||||
- [x] Add feature to edit/update comments in ini file (#132, @rfuehrer)
|
- [x] Add feature to edit/update comments in ini file (#132, @rfuehrer)
|
||||||
|
|
||||||
## v2.4.2
|
## v2.4.2
|
||||||
|
|
||||||
Released: 2019-11-07.
|
Released: 2019-11-07.
|
||||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.4.1...v2.4.2).
|
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.4.1...v2.4.2).
|
||||||
|
|
||||||
- [x] Upgrade to `lanyon@0.1.16`
|
- [x] Upgrade to `lanyon@0.1.16`
|
||||||
@ -26,7 +26,7 @@ Released: 2019-11-07.
|
|||||||
|
|
||||||
## v2.4.1
|
## v2.4.1
|
||||||
|
|
||||||
Released: 2019-11-07.
|
Released: 2019-11-07.
|
||||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.3.0...v2.4.1).
|
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.3.0...v2.4.1).
|
||||||
|
|
||||||
- [x] Upgrade to `lanyon@0.1.7`
|
- [x] Upgrade to `lanyon@0.1.7`
|
||||||
@ -43,14 +43,14 @@ Released: 2019-11-07.
|
|||||||
|
|
||||||
## v2.4.0
|
## v2.4.0
|
||||||
|
|
||||||
Released: 2016-12-21.
|
Released: 2016-12-21.
|
||||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.3.0...v2.4.0).
|
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.3.0...v2.4.0).
|
||||||
|
|
||||||
- [x] Upgrade to `lanyon@0.0.143`
|
- [x] Upgrade to `lanyon@0.0.143`
|
||||||
|
|
||||||
## v2.3.0
|
## v2.3.0
|
||||||
|
|
||||||
Released: 2016-12-21.
|
Released: 2016-12-21.
|
||||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.2.0...v2.3.0).
|
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.2.0...v2.3.0).
|
||||||
|
|
||||||
- [x] Add magic variable `__i_am_main_script` to distinguish if b3bp is being sourced or called directly (#45, @zbeekman)
|
- [x] Add magic variable `__i_am_main_script` to distinguish if b3bp is being sourced or called directly (#45, @zbeekman)
|
||||||
@ -62,7 +62,7 @@ Released: 2016-12-21.
|
|||||||
|
|
||||||
## v2.2.0
|
## v2.2.0
|
||||||
|
|
||||||
Released: 2016-12-21.
|
Released: 2016-12-21.
|
||||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.1.0...v2.2.0).
|
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.1.0...v2.2.0).
|
||||||
|
|
||||||
- [x] README and FAQ improvements (#66, @mstreuhofer)
|
- [x] README and FAQ improvements (#66, @mstreuhofer)
|
||||||
@ -84,7 +84,7 @@ Released: 2016-12-21.
|
|||||||
|
|
||||||
## v2.1.0
|
## v2.1.0
|
||||||
|
|
||||||
Released: 2016-11-08.
|
Released: 2016-11-08.
|
||||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.0.0...v2.1.0).
|
[Diff](https://github.com/kvz/bash3boilerplate/compare/v2.0.0...v2.1.0).
|
||||||
|
|
||||||
- [x] Cleanup b3bp variables (adds prefixes across the board) (thanks @mstreuhofer)
|
- [x] Cleanup b3bp variables (adds prefixes across the board) (thanks @mstreuhofer)
|
||||||
@ -111,7 +111,7 @@ Released: 2016-11-08.
|
|||||||
|
|
||||||
## v2.0.0
|
## v2.0.0
|
||||||
|
|
||||||
Released: 2016-02-17.
|
Released: 2016-02-17.
|
||||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v1.2.1...v2.0.0).
|
[Diff](https://github.com/kvz/bash3boilerplate/compare/v1.2.1...v2.0.0).
|
||||||
|
|
||||||
- [x] Add tests for `templater` and follow Library export best practices
|
- [x] Add tests for `templater` and follow Library export best practices
|
||||||
@ -123,14 +123,14 @@ Released: 2016-02-17.
|
|||||||
|
|
||||||
## v1.2.1
|
## v1.2.1
|
||||||
|
|
||||||
Released: 2016-02-17.
|
Released: 2016-02-17.
|
||||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v1.2.0...v1.2.1).
|
[Diff](https://github.com/kvz/bash3boilerplate/compare/v1.2.0...v1.2.1).
|
||||||
|
|
||||||
- [x] Add Travis CI automated testing for OSX (thanks @zbeekman)
|
- [x] Add Travis CI automated testing for OSX (thanks @zbeekman)
|
||||||
|
|
||||||
## v1.2.0
|
## v1.2.0
|
||||||
|
|
||||||
Released: 2016-02-16.
|
Released: 2016-02-16.
|
||||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v1.1.0...v1.2.0).
|
[Diff](https://github.com/kvz/bash3boilerplate/compare/v1.1.0...v1.2.0).
|
||||||
|
|
||||||
- [x] Allow disabling colors via `NO_COLOR` environment variable
|
- [x] Allow disabling colors via `NO_COLOR` environment variable
|
||||||
@ -144,7 +144,7 @@ Released: 2016-02-16.
|
|||||||
|
|
||||||
## v1.1.0
|
## v1.1.0
|
||||||
|
|
||||||
Released: 2015-06-29.
|
Released: 2015-06-29.
|
||||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/v1.0.3...v1.1.0).
|
[Diff](https://github.com/kvz/bash3boilerplate/compare/v1.0.3...v1.1.0).
|
||||||
|
|
||||||
- [x] Add `ALLOW_REMAINDERS` configuration to templater
|
- [x] Add `ALLOW_REMAINDERS` configuration to templater
|
||||||
@ -153,7 +153,7 @@ Released: 2015-06-29.
|
|||||||
|
|
||||||
## v1.0.3
|
## v1.0.3
|
||||||
|
|
||||||
Released: 2014-11-02.
|
Released: 2014-11-02.
|
||||||
[Diff](https://github.com/kvz/bash3boilerplate/compare/5db569125319a89b9561b434db84e4d91faefb63...v1.0.3).
|
[Diff](https://github.com/kvz/bash3boilerplate/compare/5db569125319a89b9561b434db84e4d91faefb63...v1.0.3).
|
||||||
|
|
||||||
- [x] Add `ini_val`, `megamount`, `parse_url`
|
- [x] Add `ini_val`, `megamount`, `parse_url`
|
||||||
|
63
FAQ.md
@ -1,23 +1,22 @@
|
|||||||
[This document is formatted with GitHub-Flavored Markdown. ]:#
|
[This document is formatted with GitHub-Flavored Markdown. ]: #
|
||||||
[For better viewing, including hyperlinks, read it online at ]:#
|
[For better viewing, including hyperlinks, read it online at ]: #
|
||||||
[https://github.com/kvz/bash3boilerplate/blob/master/FAQ.md ]:#
|
[https://github.com/kvz/bash3boilerplate/blob/HEAD/FAQ.md ]: #
|
||||||
|
|
||||||
## Contents
|
## Contents
|
||||||
|
|
||||||
* [What is a CLI](#what-is-a-cli)?
|
- [What is a CLI](#what-is-a-cli)?
|
||||||
* [How do I incorporate BASH3 Boilerplate into my own project](#how-do-i-incorporate-bash3-boilerplate-into-my-own-project)?
|
- [How do I incorporate BASH3 Boilerplate into my own project](#how-do-i-incorporate-bash3-boilerplate-into-my-own-project)?
|
||||||
* [How do I add a command-line flag](#how-do-i-add-a-command-line-flag)?
|
- [How do I add a command-line flag](#how-do-i-add-a-command-line-flag)?
|
||||||
* [How do I access the value of a command-line argument](#how-do-i-access-the-value-of-a-command-line-argument)?
|
- [How do I access the value of a command-line argument](#how-do-i-access-the-value-of-a-command-line-argument)?
|
||||||
* [What is a magic variable](#what-is-a-magic-variable)?
|
- [What is a magic variable](#what-is-a-magic-variable)?
|
||||||
* [How do I submit an issue report](#how-do-i-submit-an-issue-report)?
|
- [How do I submit an issue report](#how-do-i-submit-an-issue-report)?
|
||||||
* [How can I contribute to this project](#how-can-i-contribute-to-this-project)?
|
- [How can I contribute to this project](#how-can-i-contribute-to-this-project)?
|
||||||
* [Why are you typing BASH in all caps](#why-are-you-typing-bash-in-all-caps)?
|
- [Why are you typing BASH in all caps](#why-are-you-typing-bash-in-all-caps)?
|
||||||
* [How can I locally develop and preview the b3bp website](#how-can-i-locally-develop-and-preview-the-b3bp-website)?
|
- [You are saying you are portable, but why won't b3bp code run in dash / busybox / posh / ksh / mksh / zsh](#you-are-saying-you-are-portable-but-why-wont-b3bp-code-run-in-dash--busybox--posh--ksh--mksh--zsh)?
|
||||||
* [You are saying you are portable, but why won't b3bp code run in dash / busybox / posh / ksh / mksh / zsh](#you-are-saying-you-are-portable-but-why-wont-b3bp-code-run-in-dash--busybox--posh--ksh--mksh--zsh)?
|
- [How do I do Operating System detection](#how-do-i-do-operating-system-detection)?
|
||||||
* [How do I do Operating System detection](#how-do-i-do-operating-system-detection)?
|
- [How do I access a potentially unset (environment) variable](#how-do-i-access-a-potentially-unset-environment-variable)?
|
||||||
* [How do I access a potentially unset (environment) variable](#how-do-i-access-a-potentially-unset-environment-variable)?
|
- [How can I detect or trap CTRL-C and other signals](#how-can-i-detect-or-trap-ctrl-c-and-other-signals)?
|
||||||
* [How can I detect or trap CTRL-C and other signals](#how-can-i-detect-or-trap-ctrl-c-and-other-signals)?
|
- [How can I get the PID of my running script](how-can-i-get-the-pid-of-my-running-script)?
|
||||||
* [How can I get the PID of my running script](how-can-i-get-the-pid-of-my-running-script)?
|
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
|
|
||||||
@ -60,7 +59,7 @@ source main.sh
|
|||||||
|
|
||||||
## How do I access the value of a command-line argument?
|
## How do I access the value of a command-line argument?
|
||||||
|
|
||||||
To find out the value of an argument, append the corresponding single-character flag to the text `$arg_`. For example, if the [read block]
|
To find out the value of an argument, append the corresponding single-character flag to the text `$arg_`. For example, if the [read block]
|
||||||
contains the line
|
contains the line
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -83,7 +82,7 @@ Please visit our [Issues](https://github.com/kvz/bash3boilerplate/issues) page.
|
|||||||
|
|
||||||
## How can I contribute to this project?
|
## How can I contribute to this project?
|
||||||
|
|
||||||
Please fork this repository. After that, create a branch containing your suggested changes and submit a pull request based on the master branch
|
Please fork this repository. After that, create a branch containing your suggested changes and submit a pull request based on the main branch
|
||||||
of <https://github.com/kvz/bash3boilerplate/>. We are always more than happy to accept your contributions!
|
of <https://github.com/kvz/bash3boilerplate/>. We are always more than happy to accept your contributions!
|
||||||
|
|
||||||
## Why are you typing BASH in all caps?
|
## Why are you typing BASH in all caps?
|
||||||
@ -94,30 +93,6 @@ This project's name, however, is "BASH3 Boilerplate". It is a reference to
|
|||||||
only for crafting webpages.
|
only for crafting webpages.
|
||||||
Somewhat inconsistent – but true to Unix ancestry – the abbreviation for our project is "b3bp".
|
Somewhat inconsistent – but true to Unix ancestry – the abbreviation for our project is "b3bp".
|
||||||
|
|
||||||
## How can I locally develop and preview the b3bp website?
|
|
||||||
|
|
||||||
You should have a working Node.js >=10, Ruby >=2 and [YARN](https://yarnpkg.com) install on your workstation. When that is the case, you can run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn install
|
|
||||||
npm run start
|
|
||||||
```
|
|
||||||
|
|
||||||
This will install and start all required services and automatically open a webbrowser that reloads as soon as you make any changes to the source.
|
|
||||||
|
|
||||||
The source mainly consists of:
|
|
||||||
|
|
||||||
- `./README.md` (Front page)
|
|
||||||
- `./FAQ.md` (FAQ page)
|
|
||||||
- `./CHANGELOG.md` (changelog page)
|
|
||||||
- `./website/_layouts/default.html` (the design in which all pages are rendered)
|
|
||||||
- `./website/assets/app.js` (main JS file)
|
|
||||||
- `./website/assets/style.css` (main CSS file)
|
|
||||||
|
|
||||||
The rest is dark magic from which you should probably steer clear. : )
|
|
||||||
|
|
||||||
Any changes should be proposed as PRs. Anything added to `master` is automatically deployed using a combination of GitHub Actions and Pages.
|
|
||||||
|
|
||||||
## You are saying you are portable, but why won't b3bp code run in dash / busybox / posh / ksh / mksh / zsh?
|
## You are saying you are portable, but why won't b3bp code run in dash / busybox / posh / ksh / mksh / zsh?
|
||||||
|
|
||||||
When we say _portable_, we mean across Bash versions. Bash is widespread and most systems
|
When we say _portable_, we mean across Bash versions. Bash is widespread and most systems
|
||||||
@ -193,4 +168,4 @@ See http://mywiki.wooledge.org/SignalTrap for a list of signals, examples, and a
|
|||||||
|
|
||||||
## How can I get the PID of my running script?
|
## How can I get the PID of my running script?
|
||||||
|
|
||||||
The PID of a running script is contained in the `${$}` variable. This is *not* the pid of any subshells. With Bash 4 you can get the PID of your subshell with `${BASHPID}`. For a comprehensive list of Bash built in variables see, e.g., http://www.tldp.org/LDP/abs/html/internalvariables.html
|
The PID of a running script is contained in the `${$}` variable. This is _not_ the pid of any subshells. With Bash 4 you can get the PID of your subshell with `${BASHPID}`. For a comprehensive list of Bash built in variables see, e.g., http://www.tldp.org/LDP/abs/html/internalvariables.html
|
||||||
|
41
README.md
@ -1,17 +1,17 @@
|
|||||||
[This document is formatted with GitHub-Flavored Markdown. ]:#
|
[This document is formatted with GitHub-Flavored Markdown. ]: #
|
||||||
[For better viewing, including hyperlinks, read it online at ]:#
|
[For better viewing, including hyperlinks, read it online at ]: #
|
||||||
[https://github.com/kvz/bash3boilerplate/blob/master/README.md]:#
|
[https://github.com/kvz/bash3boilerplate/blob/HEAD/README.md]: #
|
||||||
|
|
||||||
* [Overview](#overview)
|
- [Overview](#overview)
|
||||||
* [Goals](#goals)
|
- [Goals](#goals)
|
||||||
* [Features](#features)
|
- [Features](#features)
|
||||||
* [Installation](#installation)
|
- [Installation](#installation)
|
||||||
* [Changelog](#changelog)
|
- [Changelog](#changelog)
|
||||||
* [Frequently Asked Questions](#frequently-asked-questions)
|
- [Frequently Asked Questions](#frequently-asked-questions)
|
||||||
* [Best Practices](#best-practices)
|
- [Best Practices](#best-practices)
|
||||||
* [Who uses b3bp](#who-uses-b3bp)
|
- [Who uses b3bp](#who-uses-b3bp)
|
||||||
* [Authors](#authors)
|
- [Authors](#authors)
|
||||||
* [License](#license)
|
- [License](#license)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@ -19,10 +19,10 @@
|
|||||||
|
|
||||||
When hacking up Bash scripts, there are often things such as logging or command-line argument parsing that:
|
When hacking up Bash scripts, there are often things such as logging or command-line argument parsing that:
|
||||||
|
|
||||||
- You need every time
|
- You need every time
|
||||||
- Come with a number of pitfalls you want to avoid
|
- Come with a number of pitfalls you want to avoid
|
||||||
- Keep you from your actual work
|
- Keep you from your actual work
|
||||||
|
|
||||||
Here's an attempt to bundle those things in a generalized way so that
|
Here's an attempt to bundle those things in a generalized way so that
|
||||||
they are reusable as-is in most scripts.
|
they are reusable as-is in most scripts.
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ As of `v1.0.3`, b3bp offers some nice re-usable libraries in `./src`. In order t
|
|||||||
|
|
||||||
### Function packaging
|
### Function packaging
|
||||||
|
|
||||||
It is nice to have a Bash package that can not only be used in the terminal, but also invoked as a command line function. In order to achieve this, the exporting of your functionality *should* follow this pattern:
|
It is nice to have a Bash package that can not only be used in the terminal, but also invoked as a command line function. In order to achieve this, the exporting of your functionality _should_ follow this pattern:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
if [[ "${BASH_SOURCE[0]}" = "${0}" ]]; then
|
if [[ "${BASH_SOURCE[0]}" = "${0}" ]]; then
|
||||||
@ -113,7 +113,7 @@ $ source my_script.sh
|
|||||||
$ my_script some more args --blah
|
$ my_script some more args --blah
|
||||||
```
|
```
|
||||||
|
|
||||||
(taken from the [bpkg](https://raw.githubusercontent.com/bpkg/bpkg/master/README.md) project)
|
(taken from the [bpkg](https://raw.githubusercontent.com/bpkg/bpkg/HEAD/README.md) project)
|
||||||
|
|
||||||
### Scoping
|
### Scoping
|
||||||
|
|
||||||
@ -167,10 +167,9 @@ We are looking for endorsements! Are you also using b3bp? [Let us know](https://
|
|||||||
- [Gert Goet](https://github.com/eval)
|
- [Gert Goet](https://github.com/eval)
|
||||||
- [@rfuehrer](https://github.com/rfuehrer)
|
- [@rfuehrer](https://github.com/rfuehrer)
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Copyright (c) 2013 Kevin van Zonneveld and [contributors](https://github.com/kvz/bash3boilerplate#authors).
|
Copyright (c) 2013 Kevin van Zonneveld and [contributors](https://github.com/kvz/bash3boilerplate#authors).
|
||||||
Licensed under [MIT](https://raw.githubusercontent.com/kvz/bash3boilerplate/master/LICENSE).
|
Licensed under [MIT](https://raw.githubusercontent.com/kvz/bash3boilerplate/HEAD/LICENSE).
|
||||||
You are not obligated to bundle the LICENSE file with your b3bp projects as long
|
You are not obligated to bundle the LICENSE file with your b3bp projects as long
|
||||||
as you leave these references intact in the header comments of your source files.
|
as you leave these references intact in the header comments of your source files.
|
||||||
|
16
package.json
@ -2,21 +2,17 @@
|
|||||||
"name": "bash3boilerplate",
|
"name": "bash3boilerplate",
|
||||||
"description": "Copypastable templates to write better bash scripts",
|
"description": "Copypastable templates to write better bash scripts",
|
||||||
"version": "2.4.1",
|
"version": "2.4.1",
|
||||||
|
"packageManager": "yarn@3.6.0+sha224.19e47520fa56c6146388fdeb438d9dcf6630c3f277a2e1180995c3bb",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18",
|
||||||
|
"yarn": "3.6.0"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:production": "LANYON_ENV=production lanyon build",
|
|
||||||
"build": "lanyon build",
|
|
||||||
"deploy": "lanyon deploy",
|
|
||||||
"encrypt": "lanyon encrypt",
|
|
||||||
"inject": "./website/_scripts/inject.sh",
|
|
||||||
"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",
|
||||||
"release:minor": "env SEMANTIC=minor npm run release",
|
"release:minor": "env SEMANTIC=minor npm run release",
|
||||||
"release:patch": "env SEMANTIC=patch npm run release",
|
"release:patch": "env SEMANTIC=patch npm run release",
|
||||||
"release": "npm version ${SEMANTIC:-patch} -m \"Release %s\" && npm run version:replace && git commit main.sh src/*.sh -m 'Update version' && git push && git push --tags && npm publish",
|
"release": "npm version ${SEMANTIC:-patch} -m \"Release %s\" && npm run version:replace && git commit main.sh src/*.sh -m 'Update version' && git push && git push --tags && npm publish",
|
||||||
"serve:production": "LANYON_ENV=production lanyon serve",
|
|
||||||
"start:production": "npm-run-all build:production serve:production",
|
|
||||||
"start": "lanyon start",
|
|
||||||
"test:debug:main:repeated": "cross-env LOG_LEVEL=7 test/acceptance.sh main-repeated",
|
"test:debug:main:repeated": "cross-env LOG_LEVEL=7 test/acceptance.sh main-repeated",
|
||||||
"test:update": "cross-env SAVE_FIXTURES=true npm run test",
|
"test:update": "cross-env SAVE_FIXTURES=true npm run test",
|
||||||
"test": "test/acceptance.sh",
|
"test": "test/acceptance.sh",
|
||||||
@ -27,11 +23,9 @@
|
|||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"fsevents": "*"
|
"fsevents": "*"
|
||||||
},
|
},
|
||||||
"dependencies": {},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "3.1.3",
|
"cross-env": "3.1.3",
|
||||||
"fakefile": "0.0.8",
|
"fakefile": "0.0.8",
|
||||||
"lanyon": "0.2.31",
|
|
||||||
"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"
|
||||||
|
@ -209,7 +209,6 @@ while IFS=$'\n' read -r bash; do
|
|||||||
|
|
||||||
while IFS=$'\n' read -r file; do
|
while IFS=$'\n' read -r file; do
|
||||||
[[ "${file}" =~ ^\./node_modules/ ]] && continue
|
[[ "${file}" =~ ^\./node_modules/ ]] && continue
|
||||||
[[ "${file}" =~ ^\./website/\.lanyon/ ]] && continue
|
|
||||||
|
|
||||||
echo -n " ${file}.. "
|
echo -n " ${file}.. "
|
||||||
|
|
||||||
@ -269,7 +268,6 @@ failed="false"
|
|||||||
|
|
||||||
while IFS=$'\n' read -r file; do
|
while IFS=$'\n' read -r file; do
|
||||||
[[ "${file}" =~ ^\./node_modules/ ]] && continue
|
[[ "${file}" =~ ^\./node_modules/ ]] && continue
|
||||||
[[ "${file}" =~ ^\./website/\.lanyon/ ]] && continue
|
|
||||||
|
|
||||||
echo -n " ${file}.. "
|
echo -n " ${file}.. "
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
{rules: {}}
|
|
@ -1 +0,0 @@
|
|||||||
bash3boilerplate.sh
|
|
@ -1,4 +0,0 @@
|
|||||||
title: BASH3 Boilerplate
|
|
||||||
|
|
||||||
plugins:
|
|
||||||
- jekyll-redirect-from
|
|
@ -1 +0,0 @@
|
|||||||
<script src="/assets/build/app.js"></script>
|
|
@ -1 +0,0 @@
|
|||||||
<link href="/assets/build/app.css" rel="stylesheet">
|
|
@ -1,83 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
{% if page.url == "/" %}
|
|
||||||
<title>{{page.title}}</title>
|
|
||||||
{% else %}
|
|
||||||
<title>{{page.title}} | {{site.title}}</title>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<meta name="keywords" content="bash, template, scripting, command-line">
|
|
||||||
<meta name="description" content="BASH3 Boilerplate">
|
|
||||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
|
|
||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
||||||
{%include _generated_assets/app-{{jekyll.environment}}-head.html%}
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<header>
|
|
||||||
<div id="header-overlay"></div>
|
|
||||||
<a href="/">
|
|
||||||
<span id="logo"></span>
|
|
||||||
</a>
|
|
||||||
<div id="menu">
|
|
||||||
<i class="material-icons">menu</i>
|
|
||||||
<ul id="menu-items">
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<span id="more">
|
|
||||||
<i class="material-icons">expand_more</i>
|
|
||||||
</span>
|
|
||||||
</header>
|
|
||||||
<section id="content">
|
|
||||||
{% if page.url == "/" %}
|
|
||||||
<div class="Social">
|
|
||||||
<iframe src="http://ghbtns.com/github-btn.html?user=kvz&repo=bash3boilerplate&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{content}}
|
|
||||||
|
|
||||||
{% if page.url == "/" %}
|
|
||||||
<h2 id="activity-feed">On GitHub</h2>
|
|
||||||
<p>
|
|
||||||
BASH3 Boilerplate is a friendly group of folks further developing our
|
|
||||||
re-usable templates as we go.
|
|
||||||
We'd love to hear what you think <a href="https://github.com/kvz/bash3boilerplate">on GitHub</a>.
|
|
||||||
Here's what's been going on recently.
|
|
||||||
</p>
|
|
||||||
<div class="on-the-githubs" data-event-source="repos/kvz/bash3boilerplate">Loading...</div>
|
|
||||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
|
||||||
<script src="//kvz.github.io/on-the-githubs/js/jquery.on-the-githubs.min.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$('.on-the-githubs').onthegithubs();
|
|
||||||
</script>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="Social">
|
|
||||||
<iframe src="http://ghbtns.com/github-btn.html?user=kvz&repo=bash3boilerplate&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="20"></iframe>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<small>
|
|
||||||
<hr />
|
|
||||||
Website design based on
|
|
||||||
the wonderful <a href="http://apex.run">apex.run</a>
|
|
||||||
with <a href="https://twitter.com/tjholowaychuk/status/744909762865696769">the author's consent</a>.
|
|
||||||
</small>
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
</body>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/highlight.min.js"></script>
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.1.0/languages/bash.min.js"></script>
|
|
||||||
{%include _generated_assets/app-{{jekyll.environment}}-body.html%}
|
|
||||||
<script>
|
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
||||||
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
|
||||||
|
|
||||||
ga('create', 'UA-63083-13', 'auto');
|
|
||||||
ga('send', 'pageview');
|
|
||||||
</script>
|
|
||||||
</html>
|
|
@ -1,76 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# This file:
|
|
||||||
#
|
|
||||||
# - Injects markdown files into the ./website directory
|
|
||||||
# - Changes them a little to make them more suitable for Jekyll building
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
#
|
|
||||||
# ./inject.sh
|
|
||||||
#
|
|
||||||
# Based on a template by BASH3 Boilerplate v2.0.0
|
|
||||||
# http://bash3boilerplate.sh/#authors
|
|
||||||
#
|
|
||||||
# The MIT License (MIT)
|
|
||||||
# Copyright (c) 2013 Kevin van Zonneveld and contributors
|
|
||||||
# You are not obligated to bundle the LICENSE file with your b3bp projects as long
|
|
||||||
# as you leave these references intact in the header comments of your source files.
|
|
||||||
|
|
||||||
# Exit on error. Append || true if you expect an error.
|
|
||||||
set -o errexit
|
|
||||||
# Exit on error inside any functions or subshells.
|
|
||||||
set -o errtrace
|
|
||||||
# Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR
|
|
||||||
set -o nounset
|
|
||||||
# Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip`
|
|
||||||
set -o pipefail
|
|
||||||
# Turn on traces, useful while debugging but commented out by default
|
|
||||||
# set -o xtrace
|
|
||||||
|
|
||||||
# Set magic variables for current file, directory, os, etc.
|
|
||||||
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
|
|
||||||
__base="$(basename "${__file}" .sh)"
|
|
||||||
__root="$(cd "$(dirname "$(dirname "${__dir}")")" && pwd)"
|
|
||||||
|
|
||||||
pushd "${__root}"
|
|
||||||
# Offer the main template for download as http://bash3boilerplate.sh/main.sh
|
|
||||||
cp -v main.sh website/
|
|
||||||
|
|
||||||
for doc in "README" "FAQ" "CHANGELOG"; do
|
|
||||||
targetName="$(echo "${doc}" | awk '{print tolower($0)}')"
|
|
||||||
permalink="/${targetName}/"
|
|
||||||
subtitle="$(tr '[:lower:]' '[:upper:]' <<< "${targetName:0:1}")${targetName:1} | "
|
|
||||||
redirectFrom="/${doc}.md/"
|
|
||||||
backLink='\n\n<a href="/">« Home</a>'
|
|
||||||
if [[ "${doc}" = "README" ]]; then
|
|
||||||
targetName="index"
|
|
||||||
permalink="/"
|
|
||||||
subtitle=""
|
|
||||||
redirectFrom="nothing"
|
|
||||||
backLink=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
cat <<EOF > "website/${targetName}.md"
|
|
||||||
---
|
|
||||||
layout: default
|
|
||||||
permalink: ${permalink}
|
|
||||||
redirect_from: ${redirectFrom}
|
|
||||||
title: ${subtitle}BASH3 Boilerplate – Template for writing better Bash scripts
|
|
||||||
warning: This page is generated by ${__base}.sh based on ${doc}.md, please don't edit ${targetName}.md directly.
|
|
||||||
---
|
|
||||||
EOF
|
|
||||||
# If '<!--more-->' exists, only inject what comes after it, so you can have e.g. a ToC or buildbuttons
|
|
||||||
# on GitHub, without that also rendering in the site (site may have its own ToC rendering for instance)
|
|
||||||
if grep '<!--more-->' "${doc}.md"; then
|
|
||||||
sed -n -e '/<!--more-->/,$p' "${doc}.md" | tail -n +2 >> "website/${targetName}.md"
|
|
||||||
else
|
|
||||||
cat "${doc}.md" >> "website/${targetName}.md"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add a "<- Back Home" link, if any
|
|
||||||
echo -e "${backLink}" >> "website/${targetName}.md"
|
|
||||||
|
|
||||||
echo "--> written website/${targetName}.md"
|
|
||||||
done
|
|
||||||
popd
|
|
@ -1,13 +0,0 @@
|
|||||||
require('./main.js')
|
|
||||||
require('./style.css')
|
|
||||||
require('./syntax.css')
|
|
||||||
|
|
||||||
// check if HMR is enabled
|
|
||||||
if (module.hot) {
|
|
||||||
module.hot.accept('./main.js', function () {
|
|
||||||
require('./main.js');
|
|
||||||
});
|
|
||||||
module.hot.accept('./style.css', function () {
|
|
||||||
require('./style.css');
|
|
||||||
});
|
|
||||||
}
|
|
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 563 KiB |
Before Width: | Height: | Size: 349 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 543 KiB |
Before Width: | Height: | Size: 345 KiB |
@ -1,55 +0,0 @@
|
|||||||
// Backgrounds.
|
|
||||||
// var backgrounds = [1,2,3,4,5,6]
|
|
||||||
var backgrounds = [1]
|
|
||||||
|
|
||||||
// Highlighting.
|
|
||||||
hljs.initHighlighting()
|
|
||||||
|
|
||||||
// Storage.
|
|
||||||
var store = window.sessionStorage
|
|
||||||
|
|
||||||
// Background.
|
|
||||||
var background = store.getItem('background')
|
|
||||||
|
|
||||||
if (!background) {
|
|
||||||
var i = Math.random() * backgrounds.length | 0
|
|
||||||
background = backgrounds[i]
|
|
||||||
console.log('setting background to %s', background)
|
|
||||||
store.setItem('background', background)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Body class for background.
|
|
||||||
var el = document.getElementById('header-overlay')
|
|
||||||
el.style.backgroundImage = 'url(/assets/images/' + background + '.jpg)'
|
|
||||||
|
|
||||||
// Attach class to #menu element depending on page offset.
|
|
||||||
document.addEventListener('DOMContentLoaded', chooseMenuColor)
|
|
||||||
window.onscroll = chooseMenuColor
|
|
||||||
|
|
||||||
function chooseMenuColor() {
|
|
||||||
var menuElement = document.getElementById('menu')
|
|
||||||
var menuTopOffset = 45
|
|
||||||
Math.floor(window.innerHeight * .20) < window.pageYOffset + menuTopOffset ?
|
|
||||||
menuElement.classList.remove('over-header') :
|
|
||||||
menuElement.classList.add('over-header')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function $get(selector) { return document.querySelector(selector) }
|
|
||||||
function $all(selector) {
|
|
||||||
return Array.prototype.slice.call(document.querySelectorAll(selector))
|
|
||||||
}
|
|
||||||
|
|
||||||
var container = $get('#menu-items')
|
|
||||||
|
|
||||||
// if (location.pathname !== '/') {
|
|
||||||
// var li = document.createElement('li');
|
|
||||||
// li.innerHTML = '<a href="/">« Home</a>';
|
|
||||||
// container.appendChild(li);
|
|
||||||
// }
|
|
||||||
|
|
||||||
$all('#content h2').forEach(function(el) {
|
|
||||||
var li = document.createElement('li');
|
|
||||||
li.innerHTML = '<a href="#' + el.id + '">' + el.innerHTML + '</a>';
|
|
||||||
container.appendChild(li);
|
|
||||||
})
|
|
@ -1,345 +0,0 @@
|
|||||||
|
|
||||||
body {
|
|
||||||
font: 16px/1.625 "Open Sans", "Helvetica Neue", "Helvetica", Arial, sans-serif;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
text-rendering: optimizeLegibility;
|
|
||||||
color: #656a71;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header-overlay {
|
|
||||||
background: #131313 50% 100% no-repeat;
|
|
||||||
background-size: cover;
|
|
||||||
height: 20vh;
|
|
||||||
width: 100%;
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-animation-name: overlay;
|
|
||||||
animation-name: overlay;
|
|
||||||
-webkit-animation-duration: 5s;
|
|
||||||
animation-duration: 5s;
|
|
||||||
-webkit-animation-delay: 1s;
|
|
||||||
animation-delay: 1s;
|
|
||||||
-webkit-animation-fill-mode: forwards;
|
|
||||||
animation-fill-mode: forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes overlay {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
opacity: .25;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes overlay {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
opacity: .25;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
body.background-1 #header-overlay {
|
|
||||||
background-image: url(images/1.jpg);
|
|
||||||
}
|
|
||||||
|
|
||||||
body.background-4 #header-overlay {
|
|
||||||
background-image: url(images/1.jpg);
|
|
||||||
}
|
|
||||||
|
|
||||||
#logo {
|
|
||||||
display: block;
|
|
||||||
background: url(images/b3bp-logo.png) center;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: contain;
|
|
||||||
width: 180px;
|
|
||||||
height: 120px;
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -100px;
|
|
||||||
margin-top: -60px;
|
|
||||||
-webkit-animation-name: logo;
|
|
||||||
animation-name: logo;
|
|
||||||
-webkit-animation-duration: 2s;
|
|
||||||
animation-duration: 2s;
|
|
||||||
-webkit-animation-fill-mode: forwards;
|
|
||||||
animation-fill-mode: forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes logo {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes logo {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#more {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 10px;
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -6px;
|
|
||||||
color: white;
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-animation-name: move;
|
|
||||||
animation-name: move;
|
|
||||||
-webkit-animation-duration: 3s;
|
|
||||||
animation-duration: 3s;
|
|
||||||
-webkit-animation-delay: 3s;
|
|
||||||
animation-delay: 3s;
|
|
||||||
-webkit-animation-fill-mode: forwards;
|
|
||||||
animation-fill-mode: forwards;
|
|
||||||
-webkit-animation-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
|
|
||||||
animation-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@-webkit-keyframes move {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
bottom: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
50% {
|
|
||||||
opacity: 1;
|
|
||||||
bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
90% {
|
|
||||||
opacity: 1;
|
|
||||||
bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
bottom: -10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes move {
|
|
||||||
0% {
|
|
||||||
opacity: 0;
|
|
||||||
bottom: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
50% {
|
|
||||||
opacity: 1;
|
|
||||||
bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
90% {
|
|
||||||
opacity: 1;
|
|
||||||
bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
opacity: 0;
|
|
||||||
bottom: -10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#content {
|
|
||||||
padding: 100px 0;
|
|
||||||
max-width: 650px;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu {
|
|
||||||
position: fixed;
|
|
||||||
top: 35px;
|
|
||||||
right: 35px;
|
|
||||||
cursor: pointer;
|
|
||||||
background: transparent;
|
|
||||||
color: black;
|
|
||||||
padding: 7px;
|
|
||||||
border-radius: 1px;
|
|
||||||
line-height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu.over-header {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu i {
|
|
||||||
font-size: 19px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu:hover #menu-items {
|
|
||||||
opacity: 1;
|
|
||||||
visibility: visible;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu-items {
|
|
||||||
line-height: 1.7;
|
|
||||||
opacity: 0;
|
|
||||||
position: fixed;
|
|
||||||
visibility: hidden;
|
|
||||||
margin: 0;
|
|
||||||
padding: 20px;
|
|
||||||
font-size: 12px;
|
|
||||||
background: white;
|
|
||||||
color: #121212;
|
|
||||||
top: 67px;
|
|
||||||
right: 35px;
|
|
||||||
border-radius: 1px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu-items li a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu-items li {
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu-items li a {
|
|
||||||
color: #4C4C4C;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3, h4 {
|
|
||||||
font-weight: 600;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
color: #3b444f;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 { font-size: 2em; /* 2*16 = 32 */ }
|
|
||||||
h2 { font-size: 1.5em; /* 1.5*16 = 24 */ }
|
|
||||||
h3 { font-size: 1.17em; /* 1.17*16 = 18.72 */ }
|
|
||||||
h4 { font-size: 1em; /* 1*16 = 16 */ }
|
|
||||||
h5 { font-size: 0.83em; /* 0.83*16 = 13.28 */ }
|
|
||||||
h6 { font-size: 0.75em; /* 0.75*16 = 12 */ }
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
/*margin-top: 75px;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
h1::before {
|
|
||||||
/*display: block;
|
|
||||||
content: ' ';
|
|
||||||
border-top: 1px dotted #eee;
|
|
||||||
width: 35%;
|
|
||||||
margin: 0 auto 75px auto;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
margin-top: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
margin-top: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p > code,
|
|
||||||
li > code {
|
|
||||||
border: 1px solid #eee;
|
|
||||||
padding: 2px 10px;
|
|
||||||
border-radius: 3px;
|
|
||||||
font-size: .75rem;
|
|
||||||
color: #555;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
header {
|
|
||||||
background: #131313;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
text-decoration: none;
|
|
||||||
color: #55A1E1;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
|
||||||
margin: 1px;
|
|
||||||
border: none;
|
|
||||||
height: 1px;
|
|
||||||
/* Set the hr color */
|
|
||||||
color: gainsboro; /* old IE */
|
|
||||||
background-color: gainsboro; /* Modern Browsers */
|
|
||||||
}
|
|
||||||
|
|
||||||
.Social {
|
|
||||||
margin: 0 auto;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.Social > * {
|
|
||||||
display: inline;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.on-the-githubs {
|
|
||||||
-webkit-margin-before: 1em;
|
|
||||||
-webkit-margin-after: 1em;
|
|
||||||
}
|
|
||||||
.on-the-githubs:after {
|
|
||||||
content: '';
|
|
||||||
display: table;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
.on-the-githubs > li {
|
|
||||||
list-style-type: none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
/*height: 26px;*/
|
|
||||||
position: relative;
|
|
||||||
border-bottom: 1px solid rgba(gainsboro, 0.3);
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.on-the-githubs > li:after {
|
|
||||||
content: '';
|
|
||||||
display: table;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
|
|
||||||
.on-the-githubs > li p {
|
|
||||||
font-size: 15px;
|
|
||||||
line-height: 16px;
|
|
||||||
margin: 0 2px;
|
|
||||||
padding: 0;
|
|
||||||
display: inline-block;
|
|
||||||
float: left;
|
|
||||||
overflow: hidden;
|
|
||||||
max-width: 80%;
|
|
||||||
}
|
|
||||||
.on-the-githubs > li abbr {
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 16px;
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
float: left;
|
|
||||||
text-align: right;
|
|
||||||
/*display: none*/
|
|
||||||
}
|
|
||||||
.on-the-githubs > li a {
|
|
||||||
font-weight: normal;
|
|
||||||
/*text-decoration: underline;*/
|
|
||||||
}
|
|
||||||
.on-the-githubs > li img {
|
|
||||||
float: left;
|
|
||||||
margin: 0 2px 0 0;
|
|
||||||
border-radius: 10px;
|
|
||||||
width: 18px;
|
|
||||||
height: 18px;
|
|
||||||
}
|
|
@ -1,104 +0,0 @@
|
|||||||
|
|
||||||
pre {
|
|
||||||
border-top-color: #ddd;
|
|
||||||
border-radius: 3px;
|
|
||||||
font-size: .75rem;
|
|
||||||
overflow-x: auto;
|
|
||||||
line-height: 1.3;
|
|
||||||
padding: 1.5rem;
|
|
||||||
background: #fff;
|
|
||||||
color: #333;
|
|
||||||
overflow-x: auto;
|
|
||||||
border: 1px solid #eee;
|
|
||||||
border-bottom-color: #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
XCode style (c) Angel Garcia <angelgarcia.mail@gmail.com>
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
.hljs {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-comment,
|
|
||||||
.hljs-quote {
|
|
||||||
color: #006a00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-keyword,
|
|
||||||
.hljs-selector-tag,
|
|
||||||
.hljs-literal {
|
|
||||||
color: #aa0d91;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-name {
|
|
||||||
color: #008;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-variable,
|
|
||||||
.hljs-template-variable {
|
|
||||||
color: #660;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-string {
|
|
||||||
color: #c41a16;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-regexp,
|
|
||||||
.hljs-link {
|
|
||||||
color: #080;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-title,
|
|
||||||
.hljs-tag,
|
|
||||||
.hljs-symbol,
|
|
||||||
.hljs-bullet,
|
|
||||||
.hljs-number,
|
|
||||||
.hljs-meta {
|
|
||||||
color: #1c00cf;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-section,
|
|
||||||
.hljs-class .hljs-title,
|
|
||||||
.hljs-type,
|
|
||||||
.hljs-attr,
|
|
||||||
.hljs-built_in,
|
|
||||||
.hljs-builtin-name,
|
|
||||||
.hljs-params {
|
|
||||||
color: #5c2699;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-attribute,
|
|
||||||
.hljs-subst {
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-formula {
|
|
||||||
background-color: #eee;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-addition {
|
|
||||||
background-color: #baeeba;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-deletion {
|
|
||||||
background-color: #ffc8bd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-selector-id,
|
|
||||||
.hljs-selector-class {
|
|
||||||
color: #9b703f;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-doctag,
|
|
||||||
.hljs-strong {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hljs-emphasis {
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
15
website/index.html
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta
|
||||||
|
http-equiv="refresh"
|
||||||
|
content="0;url=https://github.com/kvz/bash3boilerplate"
|
||||||
|
/>
|
||||||
|
<title>Redirecting...</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
If you are not redirected,
|
||||||
|
<a href="https://github.com/kvz/bash3boilerplate">click here</a>.
|
||||||
|
</body>
|
||||||
|
</html>
|