OSDN Git Service

Regular updates
[twpd/master.git] / jekyll-github.md
1 ---
2 title: Jekyll for GitHub pages
3 layout: 2017/sheet
4 category: Jekyll
5 tags: [WIP]
6 updated: 2017-11-17
7 ---
8
9 {% raw %}
10
11 Jekyll
12 ------
13 {: .-one-column}
14
15 * jekyll-avatar
16 * jekyll-coffeescript
17 * jekyll-default-layout
18 * jekyll-feed
19 * jekyll-gist
20 * jekyll-github-metadata
21 * jekyll-mentions
22 * jekyll-optional-front-matter
23 * jekyll-paginate
24 * jekyll-readme-index
25 * jekyll-redirect-from
26 * jekyll-relative-links
27 * jekyll-sass-converter
28 * jekyll-seo-tag
29 * jekyll-sitemap
30 {: .-four-column}
31
32 As of github-pages v156. For an updated list, see: [Dependency versions](https://pages.github.com/versions/) _(pages.github.com)_
33
34 GitHub Metadata
35 ---------------
36
37 ### Configuration
38
39 ```yaml
40 plugins:
41   - jekyll-github-metadata
42
43 repository: username/project
44 ```
45
46 Put this in your `_config.yml`.
47 See: [Repository metadata on GitHub pages](https://help.github.com/articles/repository-metadata-on-github-pages/)
48
49 ### Listing repos
50
51 ```html
52 {% for repository in site.github.public_repositories %}
53   <a href='{{ repository.html_url }}'>
54     {{ repository.name }}
55   </a>
56 {% endfor %}
57 ```
58
59 ### Link to repo
60
61 ```html
62 <a href='{{ site.github.repository_url }}'>
63   {{ site.github.project_title }}
64 </a>
65 ```
66
67 Gists
68 -----
69
70 ### Configuration
71
72 ```yaml
73 plugins:
74   - jekyll-gist
75 ```
76
77 See: [jekyll-gist](https://github.com/jekyll/jekyll-gist)
78
79 ### Usage
80
81 ```js
82 {% gist parkr/c08ee0f2726fd0e3909d %}
83 ```
84
85 This places a Gist in your page.
86
87 Mentions
88 --------
89
90 ### Configuration
91
92 ```yaml
93 plugins:
94   - jekyll-mentions
95 ```
96
97 See: [jekyll-mentions](https://github.com/jekyll/jekyll-mentions)
98
99 ### Usage
100
101 ```js
102 Hey @rstacruz, what do you think of this?
103 ```
104
105 Just mention anyone in any page. Their names will be turned into links.
106
107
108 Redirects
109 ---------
110 {: .-three-column}
111
112 ### Configuration
113
114 ```yaml
115 plugins:
116     - jekyll-redirect-from
117 ```
118
119 See: [jekyll-redirect-from](https://rubygems.org/gems/jekyll-redirect-from)
120
121 ### Usage
122
123 ```yaml
124 ---
125 redirect_from:
126   - /foo
127 ---
128 ```
129
130 Place on any page.
131
132 ### Redirecting
133
134 ```yaml
135 ---
136 redirect_to:
137   - /foo
138 ---
139 ```
140
141 Place on any page.
142 See: [redirect to](https://github.com/jekyll/jekyll-redirect-from#redirect-to)
143
144 {% endraw %}
145