Update
This commit is contained in:
parent
fffe9c38f9
commit
593ab680de
|
@ -1,3 +1,8 @@
|
|||
# gems
|
||||
gems:
|
||||
- jekyll-redirect-from
|
||||
- jekyll-github-metadata
|
||||
|
||||
# files
|
||||
exclude:
|
||||
- Makefile
|
||||
|
@ -24,6 +29,7 @@ defaults:
|
|||
type: pages
|
||||
values:
|
||||
layout: "default"
|
||||
type: article
|
||||
category: "Others"
|
||||
|
||||
# Site info
|
||||
|
@ -55,3 +61,6 @@ category_names:
|
|||
- Ruby libraries
|
||||
- Vim
|
||||
- Others
|
||||
|
||||
# https://help.github.com/articles/repository-metadata-on-github-pages/
|
||||
repository: rstacruz/cheatsheets
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
<div class='actions'>
|
||||
{% 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'>
|
||||
<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>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -15,10 +15,10 @@ type: website
|
|||
<span>Top cheatsheets</span>
|
||||
</h2>
|
||||
|
||||
{{ site.tags }}
|
||||
|
||||
{% for page in site.tags.Featured %}
|
||||
{% include 2017/pages-list-item.html page=page %}
|
||||
{% for page in site.pages %}
|
||||
{% if page.tags contains 'Featured' %}
|
||||
{% include 2017/pages-list-item.html page=page %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for category in site.category_names %}
|
||||
|
@ -28,9 +28,7 @@ type: website
|
|||
|
||||
{% for page in site.pages %}
|
||||
{% if page.category == category %}
|
||||
{% if page.type == article %}
|
||||
{% include 2017/pages-list-item.html page=page %}
|
||||
{% endif %}
|
||||
{% include 2017/pages-list-item.html page=page %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
title: CSS antialiasing
|
||||
category: CSS
|
||||
layout: 2017/sheet
|
||||
tags: [Featured]
|
||||
---
|
||||
|
||||
### 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 %}
|
||||
|
31
jekyll.md
31
jekyll.md
|
@ -133,12 +133,33 @@ Markup
|
|||
|
||||
{{ page.date | date: "%b %d, %Y" }}
|
||||
|
||||
### If
|
||||
### Conditionals
|
||||
|
||||
{% if page.image.feature %}
|
||||
{% else if xyz %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
```html
|
||||
{% 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 %}
|
||||
Thank you for your order!
|
||||
{% endcase %}
|
||||
```
|
||||
|
||||
### Includes (partials)
|
||||
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
---
|
||||
title: package.json
|
||||
category: Node.js
|
||||
layout: 2017/sheet
|
||||
redirect_from:
|
||||
- /package.html
|
||||
- /package
|
||||
---
|
||||
|
||||
### Basic
|
||||
|
@ -11,7 +15,9 @@ category: Node.js
|
|||
"keywords": [""],
|
||||
"author": "Rico Sta. Cruz <hi@ricostacruz.com>",
|
||||
"version": "0.1.0",
|
||||
"engines": {"node": ">=0.8.0"},
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
},
|
||||
"main": "index",
|
||||
"bin": {
|
||||
"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`
|
||||
{: .-also-see}
|
Loading…
Reference in New Issue