jekyll-apple 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7c56c51de21b72ca25370e443fef8b8fe70c7018
4
+ data.tar.gz: 3bcc3204bfb1c2ffaef73f99783085e1225f34e4
5
+ SHA512:
6
+ metadata.gz: 27505cd4f66676a0d149d8f7776b2ffe83e4a9877289750845e1539b15733b8066a002f17f9e508e2746e4fef78e1bb697c86a2a9590b7ff8f8c334ab8b3e8b1
7
+ data.tar.gz: 71b8166e09d93cac53de7481c3155a85b08c28b8c8b88eeedeed991254836329cbf8f71ec05543aa174aacf4a1a53c3c157b4eb20596174034afc3328f7f0cb1
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # ChangeLog
2
+
3
+ ## HEAD
4
+
5
+ - n/a
6
+
7
+ ## 1.0.0
8
+
9
+ - Initial release
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Chayoung You
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,311 @@
1
+ # jekyll-apple
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/jekyll-apple.svg)](https://badge.fury.io/rb/jekyll-apple)
4
+ [![Build Status](https://travis-ci.org/nullpixel/jekyll-apple.svg?branch=master)](https://travis-ci.org/nullpixel/jekyll-apple)
5
+
6
+ Minimal, apple style jekyll theme.
7
+
8
+ ## Installation
9
+
10
+ Add this line to your Jekyll site's Gemfile:
11
+
12
+ ``` ruby
13
+ gem "jekyll-apple"
14
+ ```
15
+
16
+ And add this line to your Jekyll site's `_config.yml`:
17
+
18
+ ``` yaml
19
+ theme: jekyll-apple
20
+ ```
21
+
22
+ And then execute:
23
+
24
+ ``` sh
25
+ bundle
26
+ ```
27
+
28
+ Or install it yourself as:
29
+
30
+ ``` sh
31
+ gem install jekyll-apple
32
+ ```
33
+
34
+ ## Quick Start
35
+
36
+ 1. Generate a new Jekyll blog:
37
+
38
+ ``` sh
39
+ jekyll new blog --skip-bundle
40
+ cd blog
41
+ ```
42
+
43
+ 2. Edit `Gemfile` to use apple theme:
44
+
45
+ ``` ruby
46
+ gem "jekyll-apple"
47
+ ```
48
+
49
+ 3. Edit `_config.yml` to use apple theme and its plugins:
50
+
51
+ ``` yaml
52
+ theme: jekyll-apple
53
+ gems:
54
+ - jekyll-archives
55
+ - jekyll-paginate
56
+ - jekyll-sitemap
57
+
58
+ permalink: /:year/:month/:day/:title/
59
+ paginate_path: /posts/:num/
60
+ paginate: 5
61
+
62
+ jekyll-archives:
63
+ enabled:
64
+ - categories
65
+ layout: category_archives
66
+ permalinks:
67
+ category: /categories/:name/
68
+ ```
69
+
70
+ 4. Copy
71
+ [`index.html`](https://github.com/nullpixel/jekyll-appleblob/master/index.html),
72
+ [`about.md`](https://github.com/nullpixel/jekyll-appleblob/master/about.md),
73
+ [`archives.md`](https://github.com/nullpixel/jekyll-appleblob/master/archives.md),
74
+ [`feed.xml`](https://github.com/nullpixel/jekyll-appleblob/master/feed.xml), and
75
+ [`_data/navigation.yml`](https://github.com/nullpixel/jekyll-appleblob/master/_data/navigation.yml)
76
+ from the theme:
77
+
78
+ ``` sh
79
+ rm index.md
80
+ curl -L -O "https://github.com/nullpixel/jekyll-apple/raw/master/{index.html,about.md,archives.md,feed.xml}"
81
+ curl -L --create-dirs -o _data/navigation.yml https://github.com/nullpixel/jekyll-apple/raw/master/_data/navigation.yml
82
+ ```
83
+
84
+ 5. Install gems and you're good to go! The blog will be available on
85
+ `http://127.0.0.1:4000`.
86
+
87
+ ``` sh
88
+ bundle install
89
+ bundle exec jekyll serve
90
+ ```
91
+
92
+ ## Usage
93
+
94
+ ### Customization
95
+
96
+ To override the default structure and style of jekyll-apple, simply create the
97
+ concerned directory at the root of your site, copy the file you wish to
98
+ customize to that directory, and then edit the file. e.g., to override the
99
+ [`_includes/footer_content.html`](_includes/footer_content.html) file to add
100
+ contents to footer, create an `_includes` directory, copy
101
+ `_includes/footer_content.html` from jekyll-apple gem folder to
102
+ `<your-site>/_includes` and start editing that file.
103
+
104
+ For example, you can add favicons to `_includes/head_custom.html`:
105
+
106
+ ``` html
107
+ <link rel="icon" type="image/x-icon" href="{{ "/favicon.ico" | relative_url }}">
108
+ <link rel="apple-touch-icon" href="{{ "/apple-touch-icon.png" | relative_url }}">
109
+ <link rel="apple-touch-icon" sizes="76x76" href="{{ "/apple-touch-icon-76x76.png" | relative_url }}">
110
+ <link rel="apple-touch-icon" sizes="120x120" href="{{ "/apple-touch-icon-120x120.png" | relative_url }}">
111
+ <link rel="apple-touch-icon" sizes="152x152" href="{{ "/apple-touch-icon-152x152.png" | relative_url }}">
112
+ <link rel="apple-touch-icon" sizes="180x180" href="{{ "/apple-touch-icon-180x180.png" | relative_url }}">
113
+ ```
114
+
115
+ The site's default CSS is in the gem itself,
116
+ [`assets/main.scss`](assets/main.scss). To override the default CSS, the file
117
+ has to exist at your site source. Do either of the following:
118
+
119
+ - Create a new instance of `main.scss` at site source
120
+ - Create a new file `main.scss` at `<your-site>/assets/`
121
+ - Add the frontmatter dashes, and
122
+ - Add `@import "apple";`, to `<your-site>/assets/main.scss`
123
+ - Add your custom CSS
124
+ - Download the file from this repo
125
+ - Create a new file `main.scss` at `<your-site>/assets/`
126
+ - Copy the contents at [`assets/main.scss`](assets/main.scss) onto the `main.scss` you just created, and edit away
127
+ - Copy directly from jekyll-apple gem
128
+ - Go to your local jekyll-apple gem installation directory (run `bundle show jekyll-apple` to get the path to it)
129
+ - Copy the `assets/` folder from there into the root of `<your-site>`
130
+ - Change whatever values you want, inside `<your-site>/assets/main.scss`
131
+
132
+ ### Locale
133
+
134
+ `site.lang` is used to declare the primary language for each web page within the
135
+ site.
136
+
137
+ `lang: en-US` sets the `lang` attribute for the site to the United States flavor
138
+ of English, while `en-GB` would be for the United Kingdom style of English.
139
+ Country codes are optional and the shorter variation `lang: en` is also
140
+ acceptable. You may want to write a post in different language, then add `lang`
141
+ attribute to the frontmatter of that post:
142
+
143
+ ``` yaml
144
+ layout: post
145
+ title: "안녕하세요"
146
+ lang: ko
147
+ ```
148
+
149
+ ### Description
150
+
151
+ `site.description` describes the site. This is mainly used in meta descriptions
152
+ for improving SEO. Also, you can set `description` attribute for each post:
153
+
154
+ ``` yaml
155
+ layout: post
156
+ title: Awesome Post
157
+ description: This is an awesome post.
158
+ ```
159
+
160
+ If you don't specify `post.description`, then `post.excerpt` will be used if it
161
+ exist.
162
+
163
+ ### External URL
164
+
165
+ `external-url` turns the title of your post to a link. Specify a URL which you
166
+ want to link to.
167
+
168
+ ``` yaml
169
+ layout: post
170
+ title: Jekyll apple theme
171
+ external-url: https://github.com/nullpixel/jekyll-apple
172
+ ```
173
+
174
+ Then the title of your post would look like a link with text
175
+ `Jekyll apple theme →`. This also applies to your blog feed.
176
+
177
+ ### Category
178
+
179
+ Each post can have `categories` attribute. It can be a string or an array. This
180
+ will be displayed on index, archive and each post, and provide a link to the
181
+ archive of category.
182
+
183
+ ``` yaml
184
+ layout: post
185
+ title: Awesome Post
186
+ categories: Misc
187
+ ```
188
+
189
+ ``` yaml
190
+ layout: post
191
+ title: Another Awesome Post
192
+ categories:
193
+ - Misc
194
+ - Idea
195
+ ```
196
+
197
+ ### Feed
198
+
199
+ Create `<your-site>/feed.xml` with:
200
+
201
+ ``` yaml
202
+ ---
203
+ layout: feed
204
+ ---
205
+ ```
206
+
207
+ If you want to use another path for feed, you can specify a non-default path via
208
+ your site's config.
209
+
210
+ ``` yaml
211
+ feed:
212
+ path: atom.xml
213
+ ```
214
+
215
+ Then create `<your-site>/atom.xml` with the same content of `feed.xml` above.
216
+
217
+ ### Comments
218
+
219
+ jekyll-apple provides the ability to include your favourite commenting service, like [Disqus](https://disqus.com) or [Isso](https://posativ.org/isso).
220
+
221
+ To enable comments on pages and posts:
222
+ 1. Overwrite the `_includes/custom_comments_provider.html` with your custom provider of comments.
223
+ 2. Add `comments: true` to your `_config.yml`.
224
+
225
+ To disable comments on certain pages or posts specify `comments: false` in the front matter of the page or post.
226
+
227
+ ### Metadata for SEO
228
+
229
+ #### Keywords
230
+
231
+ Each post can have `keywords` attribute. This is a comma-separated list which is
232
+ used in meta descriptions for improving SEO.
233
+
234
+ ``` yaml
235
+ layout: post
236
+ title: How to configure jekyll-apple
237
+ keywords: jekyll, apple, github pages
238
+ ```
239
+
240
+ YAML list is also available:
241
+
242
+ ``` yaml
243
+ keywords:
244
+ - jekyll
245
+ - apple
246
+ - github pages
247
+ ```
248
+
249
+ #### Twitter
250
+
251
+ - `site.twitter_username` sets `twitter:site` and `twitter:creator` meta tag
252
+ - `site.twitter_image` sets `twitter:image:src` meta tag
253
+ - `page.twitter_card.type` sets `twitter:card` meta tag (default: `summary`)
254
+ - If `page.twitter_card.type` is `gallery`, it sets `twitter:image0`, `twitter:image1`, `twitter:image2` and `twitter:image3` meta tags with `page.twitter_card.image`, `page.twitter_card.image1`, `page.twitter_card.image2` and `page.twitter_card.image3`, respectively
255
+ - If `page.twitter_card.type` is `photo`, `page.twitter_card.width` sets `twitter:image:width` meta tag and `page.twitter_card.height` sets `twitter:image:height` meta tag
256
+ - `page.twitter_card.creator` sets `twitter:creator` meta tag. It overrides `site.twitter_username`
257
+ - `page.twitter_card.image` sets `twitter:image:src` meta tag if `page.twitter_card.type` is not `gallery`. It overrides `site.twitter_image`
258
+
259
+ #### Facebook
260
+
261
+ - `site.facebook_app_id` sets `fb:admins` meta tag
262
+ - `site.facebook_page` sets `article:author` meta tag
263
+ - `site.facebook_image` sets `og:image` meta tag
264
+ - `page.facebook.image` sets `og:image` meta tag. It overrides `site.facebook_image`
265
+
266
+ ### Navigation
267
+
268
+ To define header links, add titles and URLs under the `main` key in
269
+ `_data/navigation.yml`:
270
+
271
+ ``` yaml
272
+ main:
273
+ - title: "About"
274
+ url: /about/
275
+ - title: "Archives"
276
+ url: /archives/
277
+ - title: "GitHub"
278
+ url: https://github.com/yous/whiteglass
279
+ ```
280
+
281
+ ### Enabling Google Analytics
282
+
283
+ To enable Google Analytics, add the following lines to your Jekyll site:
284
+
285
+ ``` yaml
286
+ google_analytics: UA-NNNNNNNN-N
287
+ ```
288
+
289
+ ## Contributing
290
+
291
+ Bug reports and pull requests are welcome on GitHub at
292
+ <https://github.com/nullpixel/jekyll-apple>. This project is intended to be a safe,
293
+ welcoming space for collaboration, and contributors are expected to adhere to
294
+ the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
295
+
296
+ ## Development
297
+
298
+ To set up your environment to develop this theme, run `bundle install`.
299
+
300
+ Your theme is setup just like a normal Jekyll site! To test your theme, run
301
+ `bundle exec jekyll serve` and open your browser at
302
+ `http://localhost:4000/apple/`. This starts a Jekyll server using your
303
+ theme. Add pages, documents, data, etc. like normal to test your theme's
304
+ contents. As you make modifications to your theme and to your content, your site
305
+ will regenerate and you should see the changes in the browser after a refresh,
306
+ just like normal.
307
+
308
+ ## License
309
+
310
+ The theme is available as open source under the terms of the
311
+ [MIT License](http://opensource.org/licenses/MIT).
@@ -0,0 +1,3 @@
1
+ <hr />
2
+ <h1>Comments</h1>
3
+ <p>Insert your custom comment provider like <a href="https://disqus.com">Disqus</a> or <a href="https://posativ.org/isso">Isso</a> here.</p>
@@ -0,0 +1,14 @@
1
+ <script type="text/javascript">
2
+ WebFontConfig = {
3
+ google: { families: [ 'Bitter:400,700,400italic:latin' ] }
4
+ };
5
+ (function() {
6
+ var wf = document.createElement('script');
7
+ wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
8
+ '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
9
+ wf.type = 'text/javascript';
10
+ wf.async = 'true';
11
+ var s = document.getElementsByTagName('script')[0];
12
+ s.parentNode.insertBefore(wf, s);
13
+ })();
14
+ </script>
@@ -0,0 +1,11 @@
1
+ <footer class="site-footer">
2
+
3
+ <div class="wrapper">
4
+
5
+ <p>
6
+ {% include footer_content.html %}
7
+ </p>
8
+
9
+ </div>
10
+
11
+ </footer>
@@ -0,0 +1,5 @@
1
+ {% assign feed_path = "/feed.xml" %}
2
+ {% if site.feed and site.feed.path %}
3
+ {% assign feed_path = site.feed.path %}
4
+ {% endif %}
5
+ &copy; {{ site.author }} - Powered by <a href="https://jekyllrb.com">Jekyll</a> &amp; <a href="https://github.com/nullpixel/jekyll-apple">jekyll-apple</a> - Subscribe via <a href="{{ feed_path | absolute_url }}">RSS</a>
@@ -0,0 +1,13 @@
1
+ {% if site.google_analytics %}
2
+ <!-- Google Analytics -->
3
+ <script>
4
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
5
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
6
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
7
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
8
+
9
+ ga('create', '{{ site.google_analytics }}', 'auto');
10
+ ga('send', 'pageview');
11
+
12
+ </script>
13
+ {% endif %}
@@ -0,0 +1,71 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+
6
+ {% assign title = page.title | default: site.title | escape %}
7
+ {% assign canonical = page.url | replace:'index.html','' | absolute_url %}
8
+ {% assign description = page.description | default: page.excerpt | default: site.description | strip_html | normalize_whitespace | escape %}
9
+ <title>{{ title }}</title>
10
+ <meta name="description" content="{{ description }}">
11
+ {% if page.keywords %}
12
+ {% if page.keywords.first %}
13
+ {% assign keywords = page.keywords | join: ',' %}
14
+ {% else %}
15
+ {% assign keywords = page.keywords %}
16
+ {% endif %}
17
+ <meta name="keywords" content="{{ keywords }}">
18
+ {% endif %}
19
+
20
+ <link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
21
+ <link rel="canonical" href="{{ canonical }}">
22
+ {% assign feed_path = "/feed.xml" %}
23
+ {% if site.feed and site.feed.path %}
24
+ {% assign feed_path = site.feed.path %}
25
+ {% endif %}
26
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ feed_path | absolute_url }}">
27
+
28
+ {% include head_custom.html %}
29
+
30
+ {% if site.facebook_app_id %}
31
+ <meta property="fb:admins" content="{{ site.facebook_app_id }}">
32
+ <meta property="og:title" content="{{ title }}">
33
+ <meta property="og:site_name" content="{{ site.title | escape }}">
34
+ <meta property="og:url" content="{{ canonical }}">
35
+ <meta property="og:description" content="{{ description }}">
36
+ {% if site.facebook_page %}<meta property="article:author" content="{{ site.facebook_page }}">{% endif %}
37
+ {% if page.facebook.image %}
38
+ <meta property="og:image" content="{{ page.facebook.image }}">
39
+ {% elsif site.facebook_image %}
40
+ <meta property="og:image" content="{{ site.facebook_image }}">
41
+ {% endif %}
42
+ {% endif %}
43
+ <meta name="twitter:card" content="{{ page.twitter_card.type | default: "summary" }}">
44
+ {% if site.twitter_username %}<meta name="twitter:site" content="{{ site.twitter_username }}">{% endif %}
45
+ <meta name="twitter:title" content="{{ title | truncate: 70 }}">
46
+ <meta name="twitter:description" content="{{ description | truncate: 200 }}">
47
+ {% if page.twitter_card.creator %}
48
+ <meta name="twitter:creator" content="{{ page.twitter_card.creator }}">
49
+ {% elsif site.twitter_username %}
50
+ <meta name="twitter:creator" content="{{ site.twitter_username }}">
51
+ {% endif %}
52
+ {% if page.twitter_card.image %}
53
+ {% if page.twitter_card.type == 'gallery' %}
54
+ <meta name="twitter:image0" content="{{ page.twitter_card.image }}">
55
+ <meta name="twitter:image1" content="{{ page.twitter_card.image1 }}">
56
+ <meta name="twitter:image2" content="{{ page.twitter_card.image2 }}">
57
+ <meta name="twitter:image3" content="{{ page.twitter_card.image3 }}">
58
+ {% else %}
59
+ <meta name="twitter:image:src" content="{{ page.twitter_card.image }}">
60
+ {% if page.twitter_card.type == 'photo' %}
61
+ {% if page.twitter_card.width %}<meta name="twitter:image:width" content="{{ page.twitter_card.width }}">{% endif %}
62
+ {% if page.twitter_card.height %}<meta name="twitter:image:height" content="{{ page.twitter_card.height }}">{% endif %}
63
+ {% endif %}
64
+ {% endif %}
65
+ {% elsif site.twitter_image %}
66
+ <meta name="twitter:image:src" content="{{ site.twitter_image }}">
67
+ {% endif %}
68
+
69
+ {% include fonts.html %}
70
+ {% include google_analytics.html %}
71
+ </head>