Update
This commit is contained in:
parent
fffe9c38f9
commit
593ab680de
|
@ -1,3 +1,8 @@
|
||||||
|
# gems
|
||||||
|
gems:
|
||||||
|
- jekyll-redirect-from
|
||||||
|
- jekyll-github-metadata
|
||||||
|
|
||||||
# files
|
# files
|
||||||
exclude:
|
exclude:
|
||||||
- Makefile
|
- Makefile
|
||||||
|
@ -24,6 +29,7 @@ defaults:
|
||||||
type: pages
|
type: pages
|
||||||
values:
|
values:
|
||||||
layout: "default"
|
layout: "default"
|
||||||
|
type: article
|
||||||
category: "Others"
|
category: "Others"
|
||||||
|
|
||||||
# Site info
|
# Site info
|
||||||
|
@ -55,3 +61,6 @@ category_names:
|
||||||
- Ruby libraries
|
- Ruby libraries
|
||||||
- Vim
|
- Vim
|
||||||
- Others
|
- Others
|
||||||
|
|
||||||
|
# https://help.github.com/articles/repository-metadata-on-github-pages/
|
||||||
|
repository: rstacruz/cheatsheets
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
<div class='actions'>
|
<div class='actions'>
|
||||||
{% include social-list.html class="social page-actions" page=include.page %}
|
{% include social-list.html class="social page-actions" page=include.page %}
|
||||||
|
|
||||||
{% if include.page.type == 'article' %}
|
{% if include.page.type != 'website' %}
|
||||||
<ul class='page-actions'>
|
<ul class='page-actions'>
|
||||||
<li class='link github -button hint--bottom' data-hint='Edit this page on GitHub'>
|
<li class='link github -button hint--bottom' data-hint='Edit this page on GitHub'>
|
||||||
<a href='https://github.com/rstacruz/cheatsheets/blob/gh-pages/{{ page.path | remove: '.html' }}'>
|
<a href='{{ site.github.repository_url }}/blob/gh-pages/{{ page.path | remove: '.html' }}'>
|
||||||
<span class='text -visible'>Edit</span>
|
<span class='text -visible'>Edit</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -15,10 +15,10 @@ type: website
|
||||||
<span>Top cheatsheets</span>
|
<span>Top cheatsheets</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
{{ site.tags }}
|
{% for page in site.pages %}
|
||||||
|
{% if page.tags contains 'Featured' %}
|
||||||
{% for page in site.tags.Featured %}
|
|
||||||
{% include 2017/pages-list-item.html page=page %}
|
{% include 2017/pages-list-item.html page=page %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% for category in site.category_names %}
|
{% for category in site.category_names %}
|
||||||
|
@ -28,10 +28,8 @@ type: website
|
||||||
|
|
||||||
{% for page in site.pages %}
|
{% for page in site.pages %}
|
||||||
{% if page.category == category %}
|
{% if page.category == category %}
|
||||||
{% if page.type == article %}
|
|
||||||
{% include 2017/pages-list-item.html page=page %}
|
{% include 2017/pages-list-item.html page=page %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
title: CSS antialiasing
|
title: CSS antialiasing
|
||||||
category: CSS
|
category: CSS
|
||||||
layout: 2017/sheet
|
layout: 2017/sheet
|
||||||
|
tags: [Featured]
|
||||||
---
|
---
|
||||||
|
|
||||||
### Antialias
|
### Antialias
|
||||||
|
|
|
@ -0,0 +1,145 @@
|
||||||
|
---
|
||||||
|
title: Jekyll for GitHub pages
|
||||||
|
jekyll_escape: true
|
||||||
|
layout: 2017/sheet
|
||||||
|
tags: [WIP]
|
||||||
|
---
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
|
||||||
|
Jekyll
|
||||||
|
------
|
||||||
|
{: .-three-column}
|
||||||
|
|
||||||
|
### Jekyll gems
|
||||||
|
|
||||||
|
* jekyll-avatar
|
||||||
|
* jekyll-coffeescript
|
||||||
|
* jekyll-default-layout
|
||||||
|
* jekyll-feed
|
||||||
|
* jekyll-gist
|
||||||
|
* jekyll-github-metadata
|
||||||
|
* jekyll-mentions
|
||||||
|
* jekyll-optional-front-matter
|
||||||
|
* jekyll-paginate
|
||||||
|
* jekyll-readme-index
|
||||||
|
* jekyll-redirect-from
|
||||||
|
* jekyll-relative-links
|
||||||
|
* jekyll-sass-converter
|
||||||
|
* jekyll-seo-tag
|
||||||
|
* jekyll-sitemap
|
||||||
|
|
||||||
|
As of github-pages v156.
|
||||||
|
|
||||||
|
jekyll-github-metadata
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
gems:
|
||||||
|
- jekyll-github-metadata
|
||||||
|
|
||||||
|
repository: username/project
|
||||||
|
```
|
||||||
|
|
||||||
|
Put this in your `_config.yml`.
|
||||||
|
See: [Repository metadata on GitHub pages](https://help.github.com/articles/repository-metadata-on-github-pages/)
|
||||||
|
|
||||||
|
### Listing erpos
|
||||||
|
|
||||||
|
```html
|
||||||
|
{% for repository in site.github.public_repositories %}
|
||||||
|
<a href='{{ repository.html_url }}'>
|
||||||
|
{{ repository.name }}
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Link to repo
|
||||||
|
|
||||||
|
```html
|
||||||
|
<a href='{{ site.github.repository_url }}'>
|
||||||
|
{{ site.github.project_title }}
|
||||||
|
</a>
|
||||||
|
```
|
||||||
|
|
||||||
|
jekyll-gist
|
||||||
|
-----------
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
gems:
|
||||||
|
- jekyll-gist
|
||||||
|
```
|
||||||
|
|
||||||
|
See: [jekyll-gist](https://github.com/jekyll/jekyll-gist)
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```js
|
||||||
|
{% gist parkr/c08ee0f2726fd0e3909d %}
|
||||||
|
```
|
||||||
|
|
||||||
|
This places a Gist in your page.
|
||||||
|
|
||||||
|
jekyll-mentions
|
||||||
|
---------------
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
gems:
|
||||||
|
- jekyll-mentions
|
||||||
|
```
|
||||||
|
|
||||||
|
See: [jekyll-mentions](https://github.com/jekyll/jekyll-mentions)
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```js
|
||||||
|
Hey @rstacruz, what do you think of this?
|
||||||
|
```
|
||||||
|
|
||||||
|
Just mention anyone in any page. Their names will be turned into links.
|
||||||
|
|
||||||
|
|
||||||
|
jekyll-redirect-from
|
||||||
|
--------------------
|
||||||
|
{: .-three-column}
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
gems:
|
||||||
|
- jekyll-redirect-from
|
||||||
|
```
|
||||||
|
|
||||||
|
See: [jekyll-redirect-from](https://rubygems.org/gems/jekyll-redirect-from)
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
redirect_from:
|
||||||
|
- /foo
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
Place on any page.
|
||||||
|
|
||||||
|
### Redirecting
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
redirect_to:
|
||||||
|
- /foo
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
Place on any page.
|
||||||
|
See: [redirect to](https://github.com/jekyll/jekyll-redirect-from#redirect-to)
|
||||||
|
|
||||||
|
{% endraw %}
|
||||||
|
|
29
jekyll.md
29
jekyll.md
|
@ -133,12 +133,33 @@ Markup
|
||||||
|
|
||||||
{{ page.date | date: "%b %d, %Y" }}
|
{{ page.date | date: "%b %d, %Y" }}
|
||||||
|
|
||||||
### If
|
### Conditionals
|
||||||
|
|
||||||
{% if page.image.feature %}
|
```html
|
||||||
{% else if xyz %}
|
{% if page.image.feature %}
|
||||||
|
{% else if xyz %}
|
||||||
|
{% else %}
|
||||||
|
{% endif %}
|
||||||
|
```
|
||||||
|
|
||||||
|
```html
|
||||||
|
{% if page.category == 'React' %}
|
||||||
|
{% if page.category == 'React' or page.featured %}
|
||||||
|
{% if page.tags contains 'Featured' %}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Case
|
||||||
|
|
||||||
|
```html
|
||||||
|
{% case shipping.title %}
|
||||||
|
{% when 'international' %}
|
||||||
|
Arriving in 2-3 weeks
|
||||||
|
{% when 'Domestic' %}
|
||||||
|
Arriving in 2-3 days
|
||||||
{% else %}
|
{% else %}
|
||||||
{% endif %}
|
Thank you for your order!
|
||||||
|
{% endcase %}
|
||||||
|
```
|
||||||
|
|
||||||
### Includes (partials)
|
### Includes (partials)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
---
|
---
|
||||||
title: package.json
|
title: package.json
|
||||||
category: Node.js
|
category: Node.js
|
||||||
|
layout: 2017/sheet
|
||||||
|
redirect_from:
|
||||||
|
- /package.html
|
||||||
|
- /package
|
||||||
---
|
---
|
||||||
|
|
||||||
### Basic
|
### Basic
|
||||||
|
@ -11,7 +15,9 @@ category: Node.js
|
||||||
"keywords": [""],
|
"keywords": [""],
|
||||||
"author": "Rico Sta. Cruz <hi@ricostacruz.com>",
|
"author": "Rico Sta. Cruz <hi@ricostacruz.com>",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"engines": {"node": ">=0.8.0"},
|
"engines": {
|
||||||
|
"node": ">=0.8.0"
|
||||||
|
},
|
||||||
"main": "index",
|
"main": "index",
|
||||||
"bin": {
|
"bin": {
|
||||||
"command": "./bin/command"
|
"command": "./bin/command"
|
||||||
|
@ -64,7 +70,9 @@ category: Node.js
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### References
|
## References
|
||||||
|
{: .-one-column}
|
||||||
|
|
||||||
* http://package.json.nodejitsu.com/
|
* <http://package.json.nodejitsu.com/>
|
||||||
* `npm help package.json`
|
* `npm help package.json`
|
||||||
|
{: .-also-see}
|
Loading…
Reference in New Issue