jekyll: streamline installation instructions

This commit is contained in:
Rico Sta. Cruz 2017-09-01 04:37:58 +08:00
parent b9b3dbbd9b
commit 744ee80feb
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
4 changed files with 40 additions and 48 deletions

View File

@ -24,6 +24,7 @@
`pre` supports these: `pre` supports these:
{: .-setup} {: .-setup}
{: .-box-chars}
`ul` supports these: `ul` supports these:

View File

@ -8,6 +8,11 @@
font-family: $monospace-font; font-family: $monospace-font;
} }
// Reduce line height for box drawing characters
.MarkdownBody pre.-box-chars {
line-height: 1.32;
}
/* /*
* Undo prism theme crap * Undo prism theme crap
*/ */

View File

@ -28,7 +28,7 @@ Min Hour Day Mon Weekday
│ └──────────────── Hour (0..23) │ └──────────────── Hour (0..23)
└───────────────────── Minute (0..59) └───────────────────── Minute (0..59)
``` ```
{: .-setup} {: .-setup.-box-chars}
### Examples ### Examples

View File

@ -3,8 +3,9 @@ title: Jekyll
jekyll_escape: true jekyll_escape: true
layout: 2017/sheet layout: 2017/sheet
tags: [Featured] tags: [Featured]
prism_languages: [bash, yaml, html, ruby]
category: Jekyll category: Jekyll
updated: 2017-08-26 updated: 2017-09-01
--- ---
{% raw %} {% raw %}
@ -19,67 +20,52 @@ gem install jekyll bundler
```bash ```bash
# Create a new site at `./myblog` # Create a new site at `./myblog`
jekyll new myblog jekyll new myblog
```
```bash
cd myblog cd myblog
bundle exec jekyll serve
```
See: [Jekyll quickstart](http://jekyllrb.com/docs/quickstart/)
### Installation (GitHub pages version)
```bash
# Requires bundler
gem install bundler
``` ```
```bash ```bash
# Build the Gemfile # Optional: if you're targeting github-pages,
# use this Gemfile instead.
cat > Gemfile <<-END cat > Gemfile <<-END
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins gem 'github-pages', group: :jekyll_plugins
END END
``` ```
```bash ```bash
# Install gems
bundle
```
```bash
# Start server
bundle exec jekyll serve bundle exec jekyll serve
``` ```
This is the recommended setup, especially if you're using GitHub pages. See: [Jekyll quickstart](http://jekyllrb.com/docs/quickstart/)<br>
See: [github/pages-gem](https://github.com/github/pages-gem) See: [github/pages-gem](https://github.com/github/pages-gem)
### Directories ### Directories
./ ```
├── _config.yml ./
├── _config.yml
├── _data/
│ └── ... ├── _data/
│ └── ...
├── _drafts/
│ └── ... ├── _drafts/
│ └── ...
├── _posts/
│ └── 2014-01-01-hello.md ├── _posts/
│ └── 2014-01-01-hello.md
├── _layouts/
│ ├── default.html ├── _layouts/
│ └── post.html │ ├── default.html
│ └── post.html
├── _includes/ - partials
│ ├── header.html ├── _includes/ - partials
│ └── footer.html │ ├── header.html
│ └── footer.html
└── _site/
└── ... └── _site/
└── ...
```
{: .-box-chars}
## Front-matter ## Front-matter
{: .-three-column} {: .-three-column}
@ -114,7 +100,6 @@ In `_config.yml`:
{: .-setup} {: .-setup}
```yaml ```yaml
# Optional
source: . source: .
destination: _site destination: _site
exclude: exclude:
@ -123,6 +108,7 @@ exclude:
include: ['.htaccess'] include: ['.htaccess']
``` ```
All config keys are optional.
See: [Configuration](http://jekyllrb.com/docs/configuration/) See: [Configuration](http://jekyllrb.com/docs/configuration/)
Markup Markup