jekyll-theme-jsblog 1.0.0

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