type-on-strap 2.2.1 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +120 -62
- data/_data/language.yml +3 -0
- data/_includes/citation.html +2 -0
- data/_includes/head.html +46 -26
- data/_includes/icons.html +1 -1
- data/_includes/navbar.html +2 -5
- data/_layouts/default.html +2 -2
- data/_layouts/page.html +10 -6
- data/_layouts/post.html +9 -5
- data/_layouts/search.html +2 -5
- data/_sass/base/_global.scss +2 -11
- data/_sass/base/_highlight.scss +290 -0
- data/_sass/base/_variables.scss +35 -20
- data/_sass/external/_katex.scss +1030 -895
- data/_sass/includes/_cookie_consent.scss +17 -0
- data/_sass/includes/_footer.scss +1 -0
- data/_sass/includes/_navbar.scss +27 -28
- data/_sass/layouts/_blog.scss +2 -2
- data/_sass/layouts/_page.scss +1 -0
- data/_sass/type-on-strap.scss +10 -9
- data/assets/data/search.json +2 -2
- data/assets/fonts/katex/KaTeX_AMS-Regular.ttf +0 -0
- data/assets/fonts/katex/KaTeX_AMS-Regular.woff +0 -0
- data/assets/fonts/katex/KaTeX_AMS-Regular.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Caligraphic-Bold.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Caligraphic-Bold.woff +0 -0
- data/assets/fonts/katex/KaTeX_Caligraphic-Bold.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Caligraphic-Regular.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Caligraphic-Regular.woff +0 -0
- data/assets/fonts/katex/KaTeX_Caligraphic-Regular.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Fraktur-Bold.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Fraktur-Bold.woff +0 -0
- data/assets/fonts/katex/KaTeX_Fraktur-Bold.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Fraktur-Regular.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Fraktur-Regular.woff +0 -0
- data/assets/fonts/katex/KaTeX_Fraktur-Regular.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Main-Bold.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Main-Bold.woff +0 -0
- data/assets/fonts/katex/KaTeX_Main-Bold.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Main-BoldItalic.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Main-BoldItalic.woff +0 -0
- data/assets/fonts/katex/KaTeX_Main-BoldItalic.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Main-Italic.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Main-Italic.woff +0 -0
- data/assets/fonts/katex/KaTeX_Main-Italic.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Main-Regular.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Main-Regular.woff +0 -0
- data/assets/fonts/katex/KaTeX_Main-Regular.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Math-BoldItalic.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Math-BoldItalic.woff +0 -0
- data/assets/fonts/katex/KaTeX_Math-BoldItalic.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Math-Italic.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Math-Italic.woff +0 -0
- data/assets/fonts/katex/KaTeX_Math-Italic.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_SansSerif-Bold.ttf +0 -0
- data/assets/fonts/katex/KaTeX_SansSerif-Bold.woff +0 -0
- data/assets/fonts/katex/KaTeX_SansSerif-Bold.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_SansSerif-Italic.ttf +0 -0
- data/assets/fonts/katex/KaTeX_SansSerif-Italic.woff +0 -0
- data/assets/fonts/katex/KaTeX_SansSerif-Italic.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_SansSerif-Regular.ttf +0 -0
- data/assets/fonts/katex/KaTeX_SansSerif-Regular.woff +0 -0
- data/assets/fonts/katex/KaTeX_SansSerif-Regular.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Script-Regular.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Script-Regular.woff +0 -0
- data/assets/fonts/katex/KaTeX_Script-Regular.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Size1-Regular.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Size1-Regular.woff +0 -0
- data/assets/fonts/katex/KaTeX_Size1-Regular.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Size2-Regular.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Size2-Regular.woff +0 -0
- data/assets/fonts/katex/KaTeX_Size2-Regular.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Size3-Regular.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Size3-Regular.woff +0 -0
- data/assets/fonts/katex/KaTeX_Size3-Regular.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Size4-Regular.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Size4-Regular.woff +0 -0
- data/assets/fonts/katex/KaTeX_Size4-Regular.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_Typewriter-Regular.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Typewriter-Regular.woff +0 -0
- data/assets/fonts/katex/KaTeX_Typewriter-Regular.woff2 +0 -0
- data/assets/js/main.min.js +1 -1
- data/assets/js/partials/cookie_consent_init.js +57 -0
- data/assets/js/partials/navbar.js +1 -1
- data/assets/js/vendor/auto-render.min.js +1 -0
- data/assets/js/vendor/katex.min.js +1 -1
- data/assets/js/vendor/mermaid.min.js +32 -0
- data/assets/js/vendor/mermaid.min.js.map +1 -0
- data/assets/js/vendor/simple-jekyll-search.min.js +2 -2
- metadata +15 -39
- data/_sass/external/_syntax.scss +0 -188
- data/assets/fonts/katex/KaTeX_AMS-Regular.eot +0 -0
- data/assets/fonts/katex/KaTeX_Caligraphic-Bold.eot +0 -0
- data/assets/fonts/katex/KaTeX_Caligraphic-Regular.eot +0 -0
- data/assets/fonts/katex/KaTeX_Fraktur-Bold.eot +0 -0
- data/assets/fonts/katex/KaTeX_Fraktur-Regular.eot +0 -0
- data/assets/fonts/katex/KaTeX_Main-Bold.eot +0 -0
- data/assets/fonts/katex/KaTeX_Main-Italic.eot +0 -0
- data/assets/fonts/katex/KaTeX_Main-Regular.eot +0 -0
- data/assets/fonts/katex/KaTeX_Math-BoldItalic.eot +0 -0
- data/assets/fonts/katex/KaTeX_Math-Italic.eot +0 -0
- data/assets/fonts/katex/KaTeX_Math-Regular.eot +0 -0
- data/assets/fonts/katex/KaTeX_Math-Regular.ttf +0 -0
- data/assets/fonts/katex/KaTeX_Math-Regular.woff +0 -0
- data/assets/fonts/katex/KaTeX_Math-Regular.woff2 +0 -0
- data/assets/fonts/katex/KaTeX_SansSerif-Bold.eot +0 -0
- data/assets/fonts/katex/KaTeX_SansSerif-Italic.eot +0 -0
- data/assets/fonts/katex/KaTeX_SansSerif-Regular.eot +0 -0
- data/assets/fonts/katex/KaTeX_Script-Regular.eot +0 -0
- data/assets/fonts/katex/KaTeX_Size1-Regular.eot +0 -0
- data/assets/fonts/katex/KaTeX_Size2-Regular.eot +0 -0
- data/assets/fonts/katex/KaTeX_Size3-Regular.eot +0 -0
- data/assets/fonts/katex/KaTeX_Size4-Regular.eot +0 -0
- data/assets/fonts/katex/KaTeX_Typewriter-Regular.eot +0 -0
- data/assets/js/partials/katex_init.js +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af20f1836a082bd0742d769f57138a3a2267237bf1cf1e621170eeb9ff03170a
|
4
|
+
data.tar.gz: 30eb142a5b957b91a0c4ed33cc5b01220be570f41008bd98e6a9e21307bf8ba8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7eb62bcd9b159fbe6d2c86bf7d0b3e7954f8e7ebe7c5a45b63ec2a6cadf887556dedd506de070654a30ca234d1f1ff810bce8478caf385d248ddb1e4b9d6dec
|
7
|
+
data.tar.gz: de72eb027555e5ad7175937b1a9515d398084a5658de907c869520e910448e7a3497f680db582b1f45d26a4d4723353bcb73f31a09981fe8bbcd3191a91f4af8
|
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
|
-
|
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
|
11
|
-
* Tags compatibility
|
12
|
-
* Bootstrap : [Get Bootstrap](http://getbootstrap.com/)
|
13
|
-
* Search feature
|
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
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
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)
|
21
|
+
* Find free of rights images on [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
|
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*
|
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
|
-
|
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,45 @@ $$
|
|
184
188
|
$$
|
185
189
|
```
|
186
190
|
|
191
|
+
You can find a cheat sheet of the compatible LaTex symbols [online](https://artofproblemsolving.com/wiki/index.php/LaTeX:Symbols).
|
192
|
+
|
193
|
+
### Diagrams with Mermaid
|
194
|
+
|
195
|
+
Enable the [mermaid-js](https://github.com/mermaid-js/mermaid) diagram rendering by setting mermaid to true in the `_config.yml`.
|
196
|
+
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).
|
197
|
+
|
198
|
+
```yml
|
199
|
+
mermaid: true # to Enable it
|
200
|
+
```
|
201
|
+
|
202
|
+
Find all the help you need on the official [mermaid documentation](https://mermaid-js.github.io/mermaid/).
|
203
|
+
You can create with ease diagrams. Add your mermaid script inside two mermaid divs (default Kramdown does not yet support mermaid).
|
204
|
+
With the `class="mermaid"` inside the `<div>`:
|
205
|
+
|
206
|
+
```html
|
207
|
+
<div class="mermaid">
|
208
|
+
sequenceDiagram
|
209
|
+
Alice->>John: Hello John, how are you?
|
210
|
+
John-->>Alice: Great!
|
211
|
+
</div>
|
212
|
+
```
|
213
|
+
|
187
214
|
### Social icons
|
188
215
|
|
189
216
|
In `_data/social.yml` you can customize the social icons from other wbesite you wish to display in the blog.
|
190
217
|
The site icons come from [Font Awesome](https://fontawesome.com/).
|
191
218
|
|
219
|
+
### Cookie consent
|
220
|
+
|
221
|
+
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).
|
222
|
+
Set to true, there will be a banner at the bottom of the page with the disclaimer and a approve button.
|
223
|
+
Once the user clicks on "Approve" the cookies will be created for Google Analytics.
|
224
|
+
|
192
225
|
#### Share in article
|
193
226
|
|
194
227
|
The share icons are the one at the bottom of the blog page if enabled,
|
195
228
|
to share the article on those platform.
|
196
229
|
|
197
|
-
|
198
230
|
#### Footer
|
199
231
|
|
200
232
|
Display in the footer.
|
@@ -212,23 +244,26 @@ youtube: UCqECaJ8Gagnn7YCbPEzWH6g # Youtube token of your channel in the url
|
|
212
244
|
|
213
245
|
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
246
|
|
215
|
-
###
|
247
|
+
### Personalize your Blog Posts 📝
|
216
248
|
|
217
249
|
When writing a post, be sure in jekyll to:
|
218
250
|
- Put it in the `_posts` folder
|
219
251
|
- Name it with the date first like `2019-08-21-This-is-my-blog-post.md`
|
220
252
|
|
253
|
+
Please refer to the [Jekyll docs for writing posts](https://jekyllrb.com/docs/posts/).
|
254
|
+
|
221
255
|
#### Layout: Post
|
222
256
|
|
223
257
|
This are the basic features you can use with the `post` layout.
|
224
258
|
|
225
259
|
```yml
|
260
|
+
|
226
261
|
---
|
227
262
|
layout: post
|
228
263
|
title: Hello World # Title of the page
|
229
264
|
hide_title: true # Hide the title when displaying the post, but shown in lists of posts
|
230
265
|
feature-img: "assets/img/sample.png" # Add a feature-image to the post
|
231
|
-
thumbnail: "assets/img/
|
266
|
+
thumbnail: "assets/img/thumbnails/sample-th.png" # Add a thumbnail image on blog view
|
232
267
|
color: rgb(80,140,22) # Add the specified color as feature image, and change link colors in post
|
233
268
|
bootstrap: true # Add bootstrap to the page
|
234
269
|
tags: [sample, markdown, html]
|
@@ -236,7 +271,7 @@ tags: [sample, markdown, html]
|
|
236
271
|
```
|
237
272
|
|
238
273
|
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.
|
274
|
+
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
275
|
|
241
276
|
The background used when `color` is set comes from `lineart.png` from [xukimseven](https://github.com/xukimseven)
|
242
277
|
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 +293,7 @@ excerpt: true
|
|
258
293
|
Then in your post, add the `excerpt separator`:
|
259
294
|
|
260
295
|
```yml
|
296
|
+
|
261
297
|
---
|
262
298
|
layout: post
|
263
299
|
title: Sample Page
|
@@ -287,15 +323,42 @@ Use it in any markdown file. There are two fields in the include you need to loo
|
|
287
323
|
- `column=3` set 3 columns
|
288
324
|
- `column="auto"` makes as many columns as images
|
289
325
|
|
290
|
-
|
291
|
-
|
326
|
+
#### Code highlight
|
327
|
+
|
328
|
+
Like all CSS variables in the theme, you can edit the color of the code highlight in _sass > base > _variables.scss.
|
329
|
+
The code highlighting works with [base16](https://github.com/chriskempson/base16-html-previews/tree/master/css) you can find existing example
|
330
|
+
of your favourite highlight color scheme on this format.
|
331
|
+
|
332
|
+
## Feature pages and layouts
|
333
|
+
|
334
|
+
All feature pages besides the "home" one are stored in the `page` folder,
|
335
|
+
they will appear in the navigation bar unless you set `Hide: true` in the front matter.
|
336
|
+
|
337
|
+
Here are the documentation for the other feature pages that can be added through `_config.yml`.
|
338
|
+
|
292
339
|
Non-standard features are documented below.
|
293
340
|
|
294
|
-
### Layout:
|
341
|
+
### Layout: Default
|
342
|
+
|
343
|
+
This layout includes the head, navigation bar and footer around your content.
|
344
|
+
Unless you're making a custom layout you won't need it.
|
345
|
+
|
346
|
+
### Layout: Home 🏡
|
347
|
+
|
348
|
+
This page is used as the home page of the template (in the `index.html`). It displays the list of articles in `_posts`.
|
349
|
+
You can use this layout in another page (adding a title to it will make it appear in the navigation bar).
|
350
|
+
|
351
|
+
The recommended width and height for the home picture is width:`2484px;` and height:`1280px`
|
352
|
+
which are the dimensions of the actual picture for it to be rolling down as you scroll the page.
|
353
|
+
|
354
|
+
If your posts are not displaying ensure that you have added the line `paginate: 5` to `_config.yml`.
|
355
|
+
|
356
|
+
### Layout: Page 📄
|
295
357
|
|
296
358
|
The page layout have a bit more features explained here.
|
297
359
|
|
298
360
|
```yml
|
361
|
+
|
299
362
|
---
|
300
363
|
layout: page
|
301
364
|
title: "About"
|
@@ -310,33 +373,14 @@ tags: [sample, markdown, html]
|
|
310
373
|
|
311
374
|
The hide only hides your page from the navigation bar, it is however still generated and can be access through its link.
|
312
375
|
|
313
|
-
###
|
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
|
376
|
+
### Feature: Portfolio 🗂
|
335
377
|
|
336
378
|
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
379
|
|
338
380
|
To use the portfolio, simply create a `portfolio.md` with this information inside:
|
381
|
+
|
339
382
|
```yml
|
383
|
+
|
340
384
|
---
|
341
385
|
layout: page
|
342
386
|
title : Portfolio
|
@@ -345,13 +389,14 @@ title : Portfolio
|
|
345
389
|
{% include portfolio.html %}
|
346
390
|
```
|
347
391
|
|
348
|
-
####
|
392
|
+
#### Portfolio posts
|
349
393
|
|
350
394
|
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
395
|
|
352
396
|
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
397
|
|
354
398
|
```yml
|
399
|
+
|
355
400
|
---
|
356
401
|
layout: post
|
357
402
|
title: Circus # Title of the portfolio post
|
@@ -366,7 +411,6 @@ date: 2019-07-25 # Not mandatory, however needs to be in date format t
|
|
366
411
|
Make sure your `_config.yml` contains the following if you are using the theme as a gem:
|
367
412
|
|
368
413
|
```yml
|
369
|
-
|
370
414
|
# PORTFOLIO
|
371
415
|
collections:
|
372
416
|
portfolio:
|
@@ -376,7 +420,7 @@ collections:
|
|
376
420
|
|
377
421
|
This creates the collection for Jekyll so it can find and display your portfolio posts.
|
378
422
|
|
379
|
-
### Gallery
|
423
|
+
### Feature: Gallery 🖼
|
380
424
|
|
381
425
|
You can create a gallery using [Masonry JS](https://masonry.desandro.com/) which will placing the pictures in optimal position
|
382
426
|
based on available vertical space.
|
@@ -384,6 +428,7 @@ You need to specify the `gallery_path` which will be used to find the pictures t
|
|
384
428
|
It will take all of the picture under that directory. Then use the `include` to add it in your page.
|
385
429
|
|
386
430
|
```yml
|
431
|
+
|
387
432
|
---
|
388
433
|
layout: page
|
389
434
|
title: Gallery
|
@@ -394,7 +439,7 @@ gallery: "assets/img/pexels"
|
|
394
439
|
```
|
395
440
|
|
396
441
|
|
397
|
-
### Search
|
442
|
+
### Feature: Search 🔍
|
398
443
|
|
399
444
|
The search feature is based on [Simple-Jekyll-search](https://github.com/christian-fei/Simple-Jekyll-Search)
|
400
445
|
there is a `search.json` file that will create a list of all of the site posts, pages and portfolios.
|
@@ -404,6 +449,7 @@ Then there's a `search.js` displaying the formatted results entered in the `sear
|
|
404
449
|
The search page can be hidden with the `hide` option. You can remove the icon by removing `icon`:
|
405
450
|
|
406
451
|
```yml
|
452
|
+
|
407
453
|
---
|
408
454
|
layout: search
|
409
455
|
title: Search
|
@@ -411,7 +457,7 @@ icon: "search"
|
|
411
457
|
---
|
412
458
|
```
|
413
459
|
|
414
|
-
### Tags
|
460
|
+
### Feature: Tags 🏷
|
415
461
|
|
416
462
|
Tags should be placed between `[]` in your post metadata. Separate each tag with a comma.
|
417
463
|
Tags are recommended for posts and portfolio items.
|
@@ -419,6 +465,7 @@ Tags are recommended for posts and portfolio items.
|
|
419
465
|
For example:
|
420
466
|
|
421
467
|
```yml
|
468
|
+
|
422
469
|
---
|
423
470
|
layout: post
|
424
471
|
title: Markdown and HTML
|
@@ -446,27 +493,35 @@ You can learn more about them on [shopify's doc](https://help.shopify.com/themes
|
|
446
493
|
|
447
494
|
### Minimizing and optimizing: css, js and images
|
448
495
|
|
449
|
-
Before you need to have
|
496
|
+
Before you need to have *node* and `npm` installed:
|
497
|
+
|
450
498
|
- Windows: https://nodejs.org/
|
451
499
|
- Ubuntu/Debian: `apt-get install nodejs npm libgl1 libxi6`
|
452
500
|
- Fedora (dnf) / RHEL/CentOS (yum): `dnf install node npm libglvnd-glx libXi`
|
453
501
|
|
454
502
|
Then you need to install [`gulp-cli`](https://gulpjs.com/) and its dependencies:
|
455
|
-
|
503
|
+
|
504
|
+
```bash
|
456
505
|
cd assets/
|
457
506
|
sudo npm install gulp-cli -g
|
458
507
|
npm install
|
459
508
|
```
|
460
509
|
|
461
|
-
|
462
|
-
|
510
|
+
You can run the default task that will compress the js, css and images and create the thumbnails for the supported image
|
511
|
+
formats:
|
512
|
+
|
513
|
+
```bash
|
463
514
|
cd assets/
|
464
515
|
gulp default
|
516
|
+
gulp thumbnails-all # to create all of the images thumbnails
|
517
|
+
gulp thumbnails # to create thumbnails for the feature-img/ only
|
465
518
|
# tip: run a git status to see the changes
|
466
519
|
git status
|
467
520
|
```
|
468
521
|
|
469
|
-
|
522
|
+
You can find more about the gulp tasks in the [gulpfile.js](assets/gulpfile.js)
|
523
|
+
|
524
|
+
### Use as Ruby Gem 💎
|
470
525
|
|
471
526
|
You can use Type-on-strap as a [gem](https://rubygems.org/gems/type-on-strap).
|
472
527
|
|
@@ -476,6 +531,7 @@ Add this line to your Jekyll site's Gemfile (or create one):
|
|
476
531
|
```ruby
|
477
532
|
gem "type-on-strap"
|
478
533
|
```
|
534
|
+
|
479
535
|
Add this line to your Jekyll site's `_config.yml` file:
|
480
536
|
|
481
537
|
```yml
|
@@ -504,5 +560,7 @@ remote_theme: sylhare/Type-on-Strap
|
|
504
560
|
|
505
561
|
## License
|
506
562
|
|
507
|
-
|
508
|
-
|
563
|
+
This theme is licensed under the [The MIT License (MIT)](https://raw.githubusercontent.com/Sylhare/Type-on-Strap/master/LICENSE)
|
564
|
+
|
565
|
+
- Pictures from [Pexels](https://www.pexels.com/) are under Creative Commons Zero (CC0) license
|
566
|
+
- Fonts are licensed under the [SIL Open Font License (OFL)](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)
|
data/_data/language.yml
CHANGED
@@ -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."
|
data/_includes/head.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
4
4
|
|
5
5
|
<!-- Main JS (navbar.js, katex_init.js and masonry_init.js)-->
|
6
|
-
<script defer
|
6
|
+
<script defer src="{{ '/assets/js/main.min.js' | relative_url }}"></script>
|
7
7
|
|
8
8
|
<!-- CSS -->
|
9
9
|
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
|
@@ -11,16 +11,12 @@
|
|
11
11
|
<!--Favicon-->
|
12
12
|
<link rel="shortcut icon" href="{{ site.favicon | relative_url }}" type="image/x-icon">
|
13
13
|
|
14
|
-
<!-- Canonical -->
|
15
|
-
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
|
16
|
-
|
17
14
|
<!-- RSS -->
|
18
15
|
<link rel="alternate" type="application/atom+xml" title="{{ site.title }}" href="{{ 'feed.xml' | absolute_url }}"/>
|
19
16
|
|
20
17
|
{% if page.bootstrap %}
|
21
18
|
<!-- Bootstrap-4.1.3 isolation CSS -->
|
22
19
|
<link rel="stylesheet" type="text/css" href="{{ '/assets/css/vendor/bootstrap-iso.min.css' | relative_url }}">
|
23
|
-
|
24
20
|
<!-- JQuery 3.3.1 -->
|
25
21
|
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
26
22
|
<!-- Bootstrap 4.1.3 compiled and minified JavaScript -->
|
@@ -29,34 +25,58 @@
|
|
29
25
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
30
26
|
{% endif %}
|
31
27
|
|
32
|
-
<!-- KaTeX 0.
|
33
|
-
<!-- if you have any issue check https://github.com/KaTeX/KaTeX -->
|
28
|
+
<!-- KaTeX 0.12.0 -->
|
34
29
|
{% if site.katex or site.theme_settings.katex %}
|
35
|
-
<script src="{{ '/assets/js/vendor/katex.min.js' | relative_url }}"></script>
|
30
|
+
<script defer src="{{ '/assets/js/vendor/katex.min.js' | relative_url }}"></script>
|
31
|
+
<script defer src="{{ '/assets/js/vendor/auto-render.min.js' | relative_url }}" onload="renderMathInElement(document.body);"></script>
|
36
32
|
{% endif %}
|
37
33
|
|
38
|
-
<!--
|
39
|
-
{% if site.
|
40
|
-
<!--
|
41
|
-
<script
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<!-- Page analysis (analytics.js) -->
|
50
|
-
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
34
|
+
<!-- Mermaid 8.8.2 -->
|
35
|
+
{% if site.mermaid %}
|
36
|
+
<!-- <script src=”https://cdnjs.cloudflare.com/ajax/libs/mermaid/8.8.2/mermaid.min.js" onload="mermaid.initialize({startOnLoad:true});"></script> -->
|
37
|
+
<script defer src="{{ '/assets/js/vendor/mermaid.min.js' | relative_url }}" onload="mermaid.initialize({startOnLoad:true});"></script>
|
38
|
+
{% endif %}
|
39
|
+
|
40
|
+
<!-- Simple-Jekyll-Search 1.17.12 -->
|
41
|
+
<script src="{{ '/assets/js/vendor/simple-jekyll-search.min.js' | relative_url }}" type="text/javascript"></script>
|
42
|
+
|
43
|
+
<!-- Google Analytics / Cookie Consent -->
|
51
44
|
<script>
|
52
|
-
|
53
|
-
|
54
|
-
|
45
|
+
const cookieName = 'cookie-notice-dismissed-{{ site.url }}';
|
46
|
+
const isCookieConsent = '{{ site.cookie_consent }}';
|
47
|
+
const analyticsName = '{{ site.google_analytics }}';
|
55
48
|
</script>
|
49
|
+
|
50
|
+
{% if site.cookie_consent %}
|
51
|
+
<div id="cookie-notice"><span>{{ site.data.language.str_cookie_disclaimer | default: "We would like to use third party cookies and scripts to improve the functionality of this website." }}
|
52
|
+
</span><a id="cookie-notice-accept" class="button">{{ site.data.language.str_cookie_approve | default: "Approve" }}</a>
|
53
|
+
</div>
|
54
|
+
{% endif %}
|
55
|
+
{% if site.google_analytics %}
|
56
|
+
<!-- Global site tag (gtag.js) -->
|
57
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
58
|
+
<!-- Page analysis (analytics.js) -->
|
59
|
+
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
56
60
|
{% endif %}
|
57
|
-
<!-- End Google Analytics -->
|
58
61
|
|
59
62
|
<!-- seo tags -->
|
63
|
+
<meta property="og:image" content="{{ '/' | absolute_url }}{% if page.thumbnail %}{{ page.thumbnail }}{% else %}{{ page.feature-img | default: site.header_feature_image }}{% endif %}">
|
64
|
+
{% unless page.layout == post %}
|
65
|
+
<meta property="og:type" content="website" />
|
66
|
+
{% endunless %}
|
60
67
|
{% seo %}
|
61
|
-
|
68
|
+
|
69
|
+
<!-- RSS -->
|
70
|
+
{% feed_meta %}
|
71
|
+
|
72
|
+
<!-- Twitter Cards -->
|
73
|
+
<meta name="twitter:title" content="{{ page.title | default: site.title }}">
|
74
|
+
<meta name="twitter:description" content="{{ page.content | strip_html | strip_newlines | truncate: 160 | default: site.header_text}}">
|
75
|
+
{% if site.data.social.twitter %}
|
76
|
+
<meta name="twitter:creator" content="@{{ site.data.social.twitter }}">
|
77
|
+
<meta name="twitter:site" content="@{{ site.data.social.twitter }}">
|
78
|
+
{% endif %}
|
79
|
+
<meta name="twitter:card" content="{% unless page.thumbnail %}summary{% else %}summary_large_image{% endunless %}">
|
80
|
+
<meta name="twitter:image" content="{{ '/' | absolute_url }}{% if page.thumbnail %}{{ page.thumbnail }}{% else %}{{ page.feature-img | default: site.header_feature_image }}{% endif %}">
|
81
|
+
<meta name="twitter:image:alt" content="{{ page.title | default: site.title }}">
|
62
82
|
</head>
|