type-on-strap 2.1.2 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f273f904ccd3cf3713d2195cf35a0fdefd88dee40e28d383d02a00f010c6b6f
4
- data.tar.gz: 9bd298424e79c4b5d75183c35896b0cc5f5c0da28109aacb6977343ce5d6ced9
3
+ metadata.gz: 5f34dd2b2511f5ee05355a8962e017f98295b2efa98a650d063986bf73e16cfc
4
+ data.tar.gz: 40aa6d606ab5e81ab0550654bebf1a6eb44534e98b8f8bac1c460d38d8a4b064
5
5
  SHA512:
6
- metadata.gz: 5cbf3b6b70f12f73cc456fbf3fa0ab478024f48a6e5917bce3b437a459055be074ad810d07703a52765b5739fea107b3c52388028525f5e4985fe63b6d4daa9e
7
- data.tar.gz: 3a4e1cec666fc08f461864c2e8d604b260f54a34397d083df831d28ea88c3bc2fefc2c34012c9131d177a23dcbd34060af7b7905b418b01b332ea871f11c1ae8
6
+ metadata.gz: 1eb74952eab6d681a53fd72dba8c79b69118e93a2a39db8edf84ce4510ce7e0ad4d8d8102c5ed48efb68d247b14e83aa33c13efead44231875d2897cebf3cb51
7
+ data.tar.gz: f8aaa2f2d65380f2501de5c55cd1f7b7865cae0a3c97ce84a17ec3a03006df535e494f0dd4d1ceb57958a3d0549c45f2a2b49823b78ab62febfa584d44ea5a42
data/README.md CHANGED
@@ -1,25 +1,26 @@
1
- # Type on Strap
1
+ # Type on Strap 🎨
2
2
 
3
3
  [![Build Status](https://travis-ci.org/sylhare/Type-on-Strap.svg?branch=master)](https://travis-ci.org/sylhare/Type-on-Strap)
4
4
  [![Gem Version](https://badge.fury.io/rb/type-on-strap.svg)](https://badge.fury.io/rb/type-on-strap)
5
5
  [![Docker Pulls](https://img.shields.io/docker/pulls/sylhare/type-on-strap)](https://hub.docker.com/r/sylhare/type-on-strap)
6
6
 
7
- A free and open-source [Jekyll](https://jekyllrb.com) theme. Based on Rohan Chandra [type-theme](https://github.com/rohanchandra/type-theme) with a few new features:
7
+ [![Default Type on Strap blog](https://github.com/Sylhare/Type-on-Strap/blob/master/screenshot.png?raw=true)](https://sylhare.github.io/Type-on-Strap/)
8
+
9
+ A free and open-source [Jekyll](https://jekyllrb.com) theme. Based on Rohan Chandra [type-theme](https://github.com/rohanchandra/type-theme) packed with extra features and easily cusomizable:
8
10
 
9
- * Responsive design
10
- * Portfolio page for your projects
11
- * Tags compatibility
12
- * Bootstrap : [Get Bootstrap](http://getbootstrap.com/)
13
- * Search feature : [Simple-Jekyll-Search](https://github.com/christian-fei/Simple-Jekyll-Search)
11
+ * Responsive design on all devices (🖥, 💻, 📱, ...)
12
+ * Portfolio 🗂, Gallery 🖼 pages for your projects
13
+ * Tags compatibility 🏷
14
+ * Handle Bootstrap'ed pages: [Get Bootstrap](http://getbootstrap.com/)
15
+ * 🔎 Search feature: [Simple-Jekyll-Search](https://github.com/christian-fei/Simple-Jekyll-Search)
14
16
  * Math Rendering : [KateX](https://github.com/Khan/KaTeX)
15
- * Nice fonts : [Font Awesome](https://fontawesome.com/), [Source Sans Pro](https://fonts.google.com/specimen/Source+Sans+Pro), [Pacifico](https://fonts.google.com/specimen/Pacifico?selection.family=Pacifico)
16
- * Seo Tags : [Jekyll-seo-tag](https://github.com/jekyll/jekyll-seo-tag)
17
- * Syntax Highlighting: Easily customisable [Base16](https://github.com/chriskempson/base16)
17
+ * Diagram Rendering: [Mermaid-js](https://github.com/mermaid-js/mermaid)
18
+ * 🖋 Nice fonts: [Font Awesome](https://fontawesome.com/), [Source Sans Pro](https://fonts.google.com/specimen/Source+Sans+Pro), [Pacifico](https://fonts.google.com/specimen/Pacifico?selection.family=Pacifico)
19
+ * Seo Tags: [Jekyll-seo-tag](https://github.com/jekyll/jekyll-seo-tag)
20
+ * 🛠 Syntax Highlighting: Easily customisable [Base16](https://github.com/chriskempson/base16)
18
21
  * Free of rights images from [pexels](https://www.pexels.com/)
19
22
 
20
23
  > [Demo Site](https://sylhare.github.io/Type-on-Strap/)
21
-
22
- [![Default Type on Strap blog](https://github.com/Sylhare/Type-on-Strap/blob/master/screenshot.png?raw=true)](https://sylhare.github.io/Type-on-Strap/)
23
24
 
24
25
  ## Table of Contents
25
26
 
@@ -33,11 +34,11 @@ A free and open-source [Jekyll](https://jekyllrb.com) theme. Based on Rohan Chan
33
34
 
34
35
  ## Usage
35
36
 
36
- ### As a ruby gem
37
+ ### As a ruby gem 💎
37
38
 
38
39
  Check out this tutorial: [Use as Ruby Gem](https://github.com/Sylhare/Type-on-Strap#use-as-ruby-gem)
39
40
 
40
- ### As a github page
41
+ ### As a github page 📋
41
42
 
42
43
  1. Fork and clone the [Type on Strap repo](https://github.com/sylhare/Type-On-Strap): `git clone https://github.com/Sylhare/Type-on-Strap.git`
43
44
  2. Install [Jekyll](https://jekyllrb.com/docs/installation/): `gem install jekyll`, check [#1](https://github.com/Sylhare/Type-on-Strap/issues/1) if you have a problem.
@@ -77,7 +78,7 @@ Type-on-Strap
77
78
  └── index.html # sample home page (blog page paginated)
78
79
  ```
79
80
 
80
- ## Configure Type on Strap
81
+ ## Configure Type on Strap 🛠
81
82
 
82
83
  Open `_config.yml` in a text editor to change most of the blog's settings.
83
84
 
@@ -85,16 +86,17 @@ If a variable in this document is marked as "optional", disable the feature by r
85
86
 
86
87
 
87
88
  ### Site configuration
88
- Configure Jekyll as your own blog or with a subpath in in `_config.yml`:
89
89
 
90
- Jekyll website *without* a subpath (such as a GitHub Pages website for a given username):
90
+ Configure Jekyll as your own blog or with a "baseurl" in in `_config.yml`:
91
+
92
+ Jekyll website *without* a "baseurl" (such as a GitHub Pages website for a given username):
91
93
 
92
94
  ```yml
93
95
  baseurl: ""
94
96
  url: "https://username.github.io"
95
97
  ```
96
98
 
97
- Jekyll website *with* subpath (like the Type on Strap [demo](https://sylhare.github.io/Type-on-Strap/) page):
99
+ Jekyll website *with* "baseurl" (like the Type on Strap [demo](https://sylhare.github.io/Type-on-Strap/) page):
98
100
 
99
101
  ```yml
100
102
  baseurl: "/sub-directory"
@@ -117,7 +119,9 @@ description: My blog posts # Short description, primarily used by sea
117
119
  favicon: assets/favicon.ico # Icon displayed in the tab
118
120
  ```
119
121
 
120
- ### Main configuration
122
+ You can also customize the seo tags default option following the jekyll-seo-tag plugin [documentation](http://jekyll.github.io/jekyll-seo-tag/advanced-usage/).
123
+
124
+ ### Theme customization 🎨
121
125
 
122
126
  #### Footer and Header's text
123
127
 
@@ -159,7 +163,7 @@ to your project's `_config.yml` file:
159
163
  disqus_shortname: my_disqus_shortname
160
164
  ```
161
165
 
162
- ### Math typesetting
166
+ ### Math typesetting with KateX
163
167
 
164
168
  When KateX is set in `_config.yml`:
165
169
 
@@ -184,17 +188,43 @@ $$
184
188
  $$
185
189
  ```
186
190
 
191
+ ### Diagrams with Mermaid
192
+
193
+ Enable the [mermaid-js](https://github.com/mermaid-js/mermaid) diagram rendering by setting mermaid to true in the `_config.yml`.
194
+ This will load and init the [mermaid.min.js](https://mermaid-js.github.io/mermaid/getting-started/n00b-gettingStarted.html#4-calling-mermaid-from-a-relative-link).
195
+
196
+ ```yml
197
+ mermaid: true # to Enable it
198
+ ```
199
+
200
+ Find all the help you need on the official [mermaid documentation](https://mermaid-js.github.io/mermaid/).
201
+ You can create with ease diagrams. Add your mermaid script inside two mermaid divs (default Kramdown does not yet support mermaid).
202
+ With the `class="mermaid"` inside the `<div>`:
203
+
204
+ ```html
205
+ <div class="mermaid">
206
+ sequenceDiagram
207
+ Alice->>John: Hello John, how are you?
208
+ John-->>Alice: Great!
209
+ </div>
210
+ ```
211
+
187
212
  ### Social icons
188
213
 
189
214
  In `_data/social.yml` you can customize the social icons from other wbesite you wish to display in the blog.
190
215
  The site icons come from [Font Awesome](https://fontawesome.com/).
191
216
 
217
+ ### Cookie consent
218
+
219
+ You can add a cookie consent with a disclaimer if you use Google Analytics while respecting the [GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation).
220
+ Set to true, there will be a banner at the bottom of the page with the disclaimer and a approve button.
221
+ Once the user clicks on "Approve" the cookies will be created for Google Analytics.
222
+
192
223
  #### Share in article
193
224
 
194
225
  The share icons are the one at the bottom of the blog page if enabled,
195
226
  to share the article on those platform.
196
227
 
197
-
198
228
  #### Footer
199
229
 
200
230
  Display in the footer.
@@ -212,23 +242,26 @@ youtube: UCqECaJ8Gagnn7YCbPEzWH6g # Youtube token of your channel in the url
212
242
 
213
243
  You can update the RSS settings in `_data/social` to change the default feed path (generated by [jekyll-feel](https://github.com/jekyll/jekyll-feed)).
214
244
 
215
- ### Customizing Posts
245
+ ### Personalize your Blog Posts 📝
216
246
 
217
247
  When writing a post, be sure in jekyll to:
218
248
  - Put it in the `_posts` folder
219
249
  - Name it with the date first like `2019-08-21-This-is-my-blog-post.md`
220
250
 
251
+ Please refer to the [Jekyll docs for writing posts](https://jekyllrb.com/docs/posts/).
252
+
221
253
  #### Layout: Post
222
254
 
223
255
  This are the basic features you can use with the `post` layout.
224
256
 
225
257
  ```yml
258
+
226
259
  ---
227
260
  layout: post
228
261
  title: Hello World # Title of the page
229
262
  hide_title: true # Hide the title when displaying the post, but shown in lists of posts
230
263
  feature-img: "assets/img/sample.png" # Add a feature-image to the post
231
- thumbnail: "assets/img/thumbnail/sample-th.png" # Add a thumbnail image on blog view
264
+ thumbnail: "assets/thumbnails/sample-th.png" # Add a thumbnail image on blog view
232
265
  color: rgb(80,140,22) # Add the specified color as feature image, and change link colors in post
233
266
  bootstrap: true # Add bootstrap to the page
234
267
  tags: [sample, markdown, html]
@@ -236,7 +269,7 @@ tags: [sample, markdown, html]
236
269
  ```
237
270
 
238
271
  With `thumbnail`, you can add a smaller image than the `feature-img`.
239
- If you don't have a thumbnail you can still use the same image as the feature one.
272
+ If you don't have a thumbnail you can still use the same image as the feature one. Or use the gulp task to create it.
240
273
 
241
274
  The background used when `color` is set comes from `lineart.png` from [xukimseven](https://github.com/xukimseven)
242
275
  you can edit it in the config file (`_config.yml > color_image`). If you want another one, put it in `/assets/img` as well.
@@ -258,6 +291,7 @@ excerpt: true
258
291
  Then in your post, add the `excerpt separator`:
259
292
 
260
293
  ```yml
294
+
261
295
  ---
262
296
  layout: post
263
297
  title: Sample Page
@@ -287,15 +321,42 @@ Use it in any markdown file. There are two fields in the include you need to loo
287
321
  - `column=3` set 3 columns
288
322
  - `column="auto"` makes as many columns as images
289
323
 
290
- ## Other Layouts
291
- Please refer to the [Jekyll docs for writing posts](https://jekyllrb.com/docs/posts/).
324
+ #### Code highlight
325
+
326
+ Like all CSS variables in the theme, you can edit the color of the code highlight in _sass > base > _variables.scss.
327
+ The code highlighting works with [base16](https://github.com/chriskempson/base16-html-previews/tree/master/css) you can find existing example
328
+ of your favourite highlight color scheme on this format.
329
+
330
+ ## Feature pages and layouts
331
+
332
+ All feature pages besides the "home" one are stored in the `page` folder,
333
+ they will appear in the navigation bar unless you set `Hide: true` in the front matter.
334
+
335
+ Here are the documentation for the other feature pages that can be added through `_config.yml`.
336
+
292
337
  Non-standard features are documented below.
293
338
 
294
- ### Layout: Page
339
+ ### Layout: Default
340
+
341
+ This layout includes the head, navigation bar and footer around your content.
342
+ Unless you're making a custom layout you won't need it.
343
+
344
+ ### Layout: Home 🏡
345
+
346
+ This page is used as the home page of the template (in the `index.html`). It displays the list of articles in `_posts`.
347
+ You can use this layout in another page (adding a title to it will make it appear in the navigation bar).
348
+
349
+ The recommended width and height for the home picture is width:`2484px;` and height:`1280px`
350
+ which are the dimensions of the actual picture for it to be rolling down as you scroll the page.
351
+
352
+ If your posts are not displaying ensure that you have added the line `paginate: 5` to `_config.yml`.
353
+
354
+ ### Layout: Page 📄
295
355
 
296
356
  The page layout have a bit more features explained here.
297
357
 
298
358
  ```yml
359
+
299
360
  ---
300
361
  layout: page
301
362
  title: "About"
@@ -310,33 +371,14 @@ tags: [sample, markdown, html]
310
371
 
311
372
  The hide only hides your page from the navigation bar, it is however still generated and can be access through its link.
312
373
 
313
- ### Layout: Default
314
-
315
- This layout includes the head, navigation bar and footer around your content.
316
-
317
- ## Feature pages
318
-
319
- All feature pages besides the "home" one are stored in the `page` folder,
320
- they will appear in the navigation bar unless you set `Hide: true` in the front matter.
321
-
322
- Here are the documentation for the other feature pages that can be added through `_config.yml`.
323
-
324
- ### Home
325
-
326
- This page is used as the home page of the template (in the `index.html`). It displays the list of articles in `_posts`.
327
- You can use this layout in another page (adding a title to it will make it appear in the navigation bar).
328
-
329
- The recommended width and height for the home picture is width:`2484px;` and height:`1280px`
330
- which are the dimensions of the actual picture for it to be rolling down as you scroll the page.
331
-
332
- If your posts are not displaying ensure that you have added the line `paginate: 5` to `_config.yml`.
333
-
334
- ### Portfolio
374
+ ### Feature: Portfolio 🗂
335
375
 
336
376
  Portfolio is a feature page that will take all the markdown/html files in the `_portfolio` folder to create a 3-columns image portfolio matrix.
337
377
 
338
378
  To use the portfolio, simply create a `portfolio.md` with this information inside:
379
+
339
380
  ```yml
381
+
340
382
  ---
341
383
  layout: page
342
384
  title : Portfolio
@@ -345,13 +387,14 @@ title : Portfolio
345
387
  {% include portfolio.html %}
346
388
  ```
347
389
 
348
- #### Portofolio posts
390
+ #### Portfolio posts
349
391
 
350
392
  You can format the portfolio posts in the `_portfolio` folder using the `post layout`. Here are little explaination on some of the possible feature you can use and what they will do.
351
393
 
352
394
  If you decide to use a date, please be sure to use one that can be parsed such as `yyyy-mm-dd`. You can see more format example on the demo posts that are available for the theme:
353
395
 
354
396
  ```yml
397
+
355
398
  ---
356
399
  layout: post
357
400
  title: Circus # Title of the portfolio post
@@ -366,7 +409,6 @@ date: 2019-07-25 # Not mandatory, however needs to be in date format t
366
409
  Make sure your `_config.yml` contains the following if you are using the theme as a gem:
367
410
 
368
411
  ```yml
369
-
370
412
  # PORTFOLIO
371
413
  collections:
372
414
  portfolio:
@@ -376,7 +418,7 @@ collections:
376
418
 
377
419
  This creates the collection for Jekyll so it can find and display your portfolio posts.
378
420
 
379
- ### Gallery
421
+ ### Feature: Gallery 🖼
380
422
 
381
423
  You can create a gallery using [Masonry JS](https://masonry.desandro.com/) which will placing the pictures in optimal position
382
424
  based on available vertical space.
@@ -384,6 +426,7 @@ You need to specify the `gallery_path` which will be used to find the pictures t
384
426
  It will take all of the picture under that directory. Then use the `include` to add it in your page.
385
427
 
386
428
  ```yml
429
+
387
430
  ---
388
431
  layout: page
389
432
  title: Gallery
@@ -394,7 +437,7 @@ gallery: "assets/img/pexels"
394
437
  ```
395
438
 
396
439
 
397
- ### Search
440
+ ### Feature: Search 🔍
398
441
 
399
442
  The search feature is based on [Simple-Jekyll-search](https://github.com/christian-fei/Simple-Jekyll-Search)
400
443
  there is a `search.json` file that will create a list of all of the site posts, pages and portfolios.
@@ -404,6 +447,7 @@ Then there's a `search.js` displaying the formatted results entered in the `sear
404
447
  The search page can be hidden with the `hide` option. You can remove the icon by removing `icon`:
405
448
 
406
449
  ```yml
450
+
407
451
  ---
408
452
  layout: search
409
453
  title: Search
@@ -411,7 +455,7 @@ icon: "search"
411
455
  ---
412
456
  ```
413
457
 
414
- ### Tags
458
+ ### Feature: Tags 🏷
415
459
 
416
460
  Tags should be placed between `[]` in your post metadata. Separate each tag with a comma.
417
461
  Tags are recommended for posts and portfolio items.
@@ -419,6 +463,7 @@ Tags are recommended for posts and portfolio items.
419
463
  For example:
420
464
 
421
465
  ```yml
466
+
422
467
  ---
423
468
  layout: post
424
469
  title: Markdown and HTML
@@ -446,27 +491,34 @@ You can learn more about them on [shopify's doc](https://help.shopify.com/themes
446
491
 
447
492
  ### Minimizing and optimizing: css, js and images
448
493
 
449
- Before you need to have `node` and `npm` installed:
494
+ Before you need to have *node* and `npm` installed:
495
+
450
496
  - Windows: https://nodejs.org/
451
497
  - Ubuntu/Debian: `apt-get install nodejs npm libgl1 libxi6`
452
498
  - Fedora (dnf) / RHEL/CentOS (yum): `dnf install node npm libglvnd-glx libXi`
453
499
 
454
500
  Then you need to install [`gulp-cli`](https://gulpjs.com/) and its dependencies:
455
- ```shell
501
+
502
+ ```bash
456
503
  cd assets/
457
504
  sudo npm install gulp-cli -g
458
505
  npm install
459
506
  ```
460
507
 
461
- **Now, whenever you want to minify and optimize, run:**
462
- ```shell
508
+ You can run the default task that will compress the js, css and images and create the thumbnails for the supported image
509
+ formats:
510
+
511
+ ```bash
463
512
  cd assets/
464
513
  gulp default
514
+ gulp thumbnails # to create all of the images thumbnails
465
515
  # tip: run a git status to see the changes
466
516
  git status
467
517
  ```
468
518
 
469
- ### Use as Ruby Gem
519
+ You can find more about the gulp tasks in the [gulpfile.js](assets/gulpfile.js)
520
+
521
+ ### Use as Ruby Gem 💎
470
522
 
471
523
  You can use Type-on-strap as a [gem](https://rubygems.org/gems/type-on-strap).
472
524
 
@@ -476,6 +528,7 @@ Add this line to your Jekyll site's Gemfile (or create one):
476
528
  ```ruby
477
529
  gem "type-on-strap"
478
530
  ```
531
+
479
532
  Add this line to your Jekyll site's `_config.yml` file:
480
533
 
481
534
  ```yml
@@ -504,5 +557,7 @@ remote_theme: sylhare/Type-on-Strap
504
557
 
505
558
  ## License
506
559
 
507
- There are some fonts and component on this theme going under the MIT licence as well in this theme.
508
- [The MIT License (MIT)](https://raw.githubusercontent.com/Sylhare/Type-on-Strap/master/LICENSE)
560
+ This theme is licensed under the [The MIT License (MIT)](https://raw.githubusercontent.com/Sylhare/Type-on-Strap/master/LICENSE)
561
+
562
+ - Pictures from [Pexels](https://www.pexels.com/) are under Creative Commons Zero (CC0) license
563
+ - Fonts are licensed under the [SIL Open Font License (OFL)](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)
@@ -11,3 +11,6 @@ str_previous_post: "Previous post"
11
11
  str_next_page: "Next"
12
12
  str_previous_page: "Prev"
13
13
  str_javascript_required_disqus: "Please enable JavaScript to view comments."
14
+ str_no_result_found: "No result found"
15
+ str_cookie_approve: "Approve"
16
+ str_cookie_disclaimer: "We would like to use third party cookies and scripts to improve the functionality of this website."
@@ -8,8 +8,12 @@
8
8
 
9
9
  <div class="row">
10
10
  {% for image in images %}
11
- <div {% unless column %}class="column"{% endunless%} style="flex: {{ column }}%" >
12
- <img src="{{ image | prepend: 'assets/img/' | relative_url }}" alt="{{ image | prepend: '/' | split: '/' | last }}">
11
+ <div {% if column %} style="flex: {{ column }}%" {% else %} class="column" {% endif %} >
12
+ <img {% if images.size == 1 %}class="single"{% endif %}
13
+ src="{{ image | prepend: 'assets/img/' | relative_url }}"
14
+ alt="{{ image | prepend: '/' | split: '/' | last }}">
13
15
  </div>
14
16
  {% endfor %}
15
17
  </div>
18
+
19
+ {% assign column = false %}
@@ -0,0 +1,2 @@
1
+ {%- assign citation = site.data.biblio | where:"key", include.key | first -%}
2
+ <span class="cit-authors">{{citation.authors}}</span>, <span class="cit-title">{{citation.title}}</span>
@@ -1,10 +1,12 @@
1
- <div id="disqus_thread"></div>
2
- <script type="text/javascript">
3
- var disqus_shortname = '{{ site.disqus_shortname }}';
4
- (function() {
5
- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
6
- dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
7
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
8
- })();
9
- </script>
10
- <noscript>{{ site.data.language.str_javascript_required_disqus | default: Please enable JavaScript to view comments." }}</noscript>
1
+ <div class="comments">
2
+ <div id="disqus_thread"></div>
3
+ <script type="text/javascript">
4
+ var disqus_shortname = '{{ site.disqus_shortname }}';
5
+ (function() {
6
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
7
+ dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
8
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
9
+ })();
10
+ </script>
11
+ <noscript>{{ site.data.language.str_javascript_required_disqus | default: Please enable JavaScript to view comments." }}</noscript>
12
+ </div>