type-on-strap 2.4.12 → 2.5.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 +4 -4
- data/README.md +57 -30
- data/_data/language.yml +1 -0
- data/_includes/blog/blog.liquid +3 -3
- data/_includes/blog/blog_nav.liquid +1 -1
- data/_includes/blog/post_footer.liquid +15 -3
- data/_includes/blog/post_info.liquid +20 -9
- data/_includes/default/category_list.liquid +22 -0
- data/_includes/default/head.liquid +8 -3
- data/_includes/default/tags_list.liquid +2 -2
- data/_includes/portfolio.html +5 -5
- data/_includes/social/cusdis.liquid +6 -6
- data/_includes/social/disqus.liquid +6 -11
- data/_includes/social/giscus.liquid +17 -0
- data/_includes/social/utterances.liquid +8 -8
- data/_layouts/categories.liquid +79 -17
- data/_layouts/default.html +3 -3
- data/_layouts/page.liquid +10 -4
- data/_layouts/post.liquid +11 -4
- data/_layouts/search.liquid +10 -3
- data/_sass/external/_katex.scss +1 -1
- data/_sass/external/katex/katex.scss +1153 -1336
- data/_sass/layouts/_categories.scss +79 -38
- data/_sass/layouts/_posts.scss +35 -5
- data/_sass/layouts/_search.scss +10 -0
- data/_sass/layouts/_tags.scss +12 -1
- data/assets/js/comments-lazy-load.js +123 -0
- data/assets/js/comments-lazy-load.min.js +1 -0
- data/assets/js/vendor/imagesloaded.pkgd.min.js +6 -6
- data/assets/js/vendor/katex.auto-render.min.js +1 -1
- data/assets/js/vendor/katex.min.js +1 -1
- data/assets/js/vendor/mermaid.min.js +895 -398
- data/assets/js/vendor/simple-jekyll-search.min.js +3 -3
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c7b245eafb6465e6bd1a012032498fb81901591c09680290587ec232ea579643
|
|
4
|
+
data.tar.gz: f81e6aaf2e9ef2dc13f6275da54a05143cb305a88dbd4e6b3af6cad085555e2c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca5de0fb72854009a6ede7a395e65c572c2100a80d6f338f90dd6cc0b8f08199aca694f54a1be26f01231681673173662caa4b1bc7c277f736b9d14d4569aeef
|
|
7
|
+
data.tar.gz: 44fe3825598c76e401b010c7b9630b4b7c1a83309c609ef7cff81efaeded6e78242447664e0c567ca88b0cac361fc9ca02da921d944f64a24f6d301d71680c1c
|
data/README.md
CHANGED
|
@@ -40,8 +40,6 @@ Based on Rohan Chandra [type-theme](https://github.com/rohanchandra/type-theme)
|
|
|
40
40
|
|
|
41
41
|
Check out this tutorial: [Use as Ruby Gem](#use-as-ruby-gem-)
|
|
42
42
|
|
|
43
|
-
[](https://gitpod.io/#/https://github.com/sylhare/Type-On-Strap)
|
|
44
|
-
|
|
45
43
|
## Structure
|
|
46
44
|
|
|
47
45
|
Here are the main files of the template
|
|
@@ -68,6 +66,7 @@ Here are the main files of the template
|
|
|
68
66
|
├── _config.yml # sample configuration
|
|
69
67
|
├── _data
|
|
70
68
|
| ├── authors.yml # Update the post authors configurations
|
|
69
|
+
| ├── comments.yml # Comments configuration (Disqus, Cusdis, Utterances, Giscus)
|
|
71
70
|
| ├── language.yml # Localization configuration
|
|
72
71
|
| ├── biblio.yml # To create a reference bibliography
|
|
73
72
|
| ├── social.yml # Social configurations to share posts (RSS, shares, ...)
|
|
@@ -77,7 +76,7 @@ Here are the main files of the template
|
|
|
77
76
|
|
|
78
77
|
## Configure Type on Strap 🛠
|
|
79
78
|
|
|
80
|
-
Open `_config.yml` in a text editor to change most of the blog's settings.
|
|
79
|
+
Open [`_config.yml`](_config.yml) in a text editor to change most of the blog's settings.
|
|
81
80
|
|
|
82
81
|
If a variable in this document is marked as "optional", disable the feature by removing all text from the variable.
|
|
83
82
|
|
|
@@ -85,7 +84,7 @@ If a variable in this document is marked as "optional", disable the feature by r
|
|
|
85
84
|
|
|
86
85
|
#### Base url
|
|
87
86
|
|
|
88
|
-
Configure Jekyll as your own blog or with a "baseurl" in `_config.yml
|
|
87
|
+
Configure Jekyll as your own blog or with a "baseurl" in [`_config.yml`](_config.yml):
|
|
89
88
|
|
|
90
89
|
Jekyll website *without* a "baseurl" (such as a **GitHub Pages website** with your username as the repository name):
|
|
91
90
|
|
|
@@ -103,7 +102,7 @@ url: "https://username.github.io"
|
|
|
103
102
|
|
|
104
103
|
#### Jekyll blog configuration
|
|
105
104
|
|
|
106
|
-
And here is the basic information you will need in your `_config.yml` for it to work properly:
|
|
105
|
+
And here is the basic information you will need in your [`_config.yml`](_config.yml) for it to work properly:
|
|
107
106
|
|
|
108
107
|
```yaml
|
|
109
108
|
# BLOG CONFIGURATION
|
|
@@ -120,7 +119,7 @@ To configure the blog part and default plugins. Those plugins are validated by G
|
|
|
120
119
|
_Meta variables_ hold basic information about your Jekyll site, which will be used throughout the site
|
|
121
120
|
and as _meta properties_ that are used for search engines, browsers, and the site's RSS feed.
|
|
122
121
|
|
|
123
|
-
Change these variables in `_config.yml
|
|
122
|
+
Change these variables in [`_config.yml`](_config.yml):
|
|
124
123
|
|
|
125
124
|
```yml
|
|
126
125
|
title: My Jekyll Blog # Name of website
|
|
@@ -131,14 +130,14 @@ color_theme: auto # color theme auto, dark or light
|
|
|
131
130
|
```
|
|
132
131
|
|
|
133
132
|
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/).
|
|
134
|
-
The color theme can be set to dark or light (customize it in _variables.
|
|
133
|
+
The color theme can be set to dark or light (customize it in [`_variables.scss`](_sass/base/_variables.scss)).
|
|
135
134
|
Using _auto_ you'll have a tiny icon in the navbar allowing the use to manually switch from dark to light theme.
|
|
136
135
|
|
|
137
136
|
### Theme customization 🎨
|
|
138
137
|
|
|
139
138
|
#### Footer and Header text
|
|
140
139
|
|
|
141
|
-
Customize your site header/footer with these variables in `_config.yml
|
|
140
|
+
Customize your site header/footer with these variables in [`_config.yml`](_config.yml):
|
|
142
141
|
|
|
143
142
|
```yml
|
|
144
143
|
header_text: Welcome to my Jekyll blog
|
|
@@ -163,7 +162,7 @@ with suffix `-small` (620x320) and `-medium` (1240x640) to display on smaller sc
|
|
|
163
162
|
#### Localisation string
|
|
164
163
|
|
|
165
164
|
Localization string is a way to quickly change the template language for text like *Next Post* or *Follow on*, ...
|
|
166
|
-
You can find all the properties in `_data/language.yml
|
|
165
|
+
You can find all the properties in [`_data/language.yml`](_data/language.yml).
|
|
167
166
|
|
|
168
167
|
By default, it is in English, but you can add your own language.
|
|
169
168
|
|
|
@@ -173,7 +172,7 @@ Here you also can set the date format, e.g., set `str_date_format: '%B %-d, %Y'`
|
|
|
173
172
|
### Google Analytics
|
|
174
173
|
|
|
175
174
|
To enable Google Analytics (GA4), add your [Measurement ID](https://support.google.com/analytics/answer/12270356?hl=en&sjid=1593376271608310401-NA)
|
|
176
|
-
to `_config.yml` like so:
|
|
175
|
+
to [`_config.yml`](_config.yml) like so:
|
|
177
176
|
|
|
178
177
|
```yml
|
|
179
178
|
google_analytics: G-XXXXXXXXXX
|
|
@@ -183,12 +182,15 @@ It will use the [Google Tag Manager](https://support.google.com/analytics/answer
|
|
|
183
182
|
|
|
184
183
|
### Comments 💬
|
|
185
184
|
|
|
185
|
+
Type-on-Strap supports multiple comment systems.
|
|
186
|
+
Use [`_data/comments.yml`](_data/comments.yml) for all comment configurations
|
|
187
|
+
|
|
186
188
|
#### Disqus
|
|
187
189
|
|
|
188
190
|
If you have a [Disqus](https://disqus.com/) account, you can show a comments section below each post.
|
|
189
191
|
|
|
190
192
|
To enable Disqus comments, add your [Disqus shortname](https://help.disqus.com/customer/portal/articles/466208)
|
|
191
|
-
to your project's `
|
|
193
|
+
to your project's [`_data/comments.yml`](_data/comments.yml) file:
|
|
192
194
|
|
|
193
195
|
```yml
|
|
194
196
|
comments:
|
|
@@ -200,7 +202,7 @@ comments:
|
|
|
200
202
|
[Cusdis](https://cusdis.com/) is an open-source alternative to Disqus.
|
|
201
203
|
You can read more about it in the [documentation](https://cusdis.com/doc#/)
|
|
202
204
|
|
|
203
|
-
To enable it, set your Cusdis name in `
|
|
205
|
+
To enable it, set your Cusdis name in [`_data/comments.yml`](_data/comments.yml):
|
|
204
206
|
|
|
205
207
|
```yaml
|
|
206
208
|
comments:
|
|
@@ -213,7 +215,7 @@ comments:
|
|
|
213
215
|
It stores the comments as GitHub issues on a repository for each page.
|
|
214
216
|
|
|
215
217
|
Install the utterance [app](https://github.com/apps/utterances) to your repo.
|
|
216
|
-
After installing, add your info in the `
|
|
218
|
+
After installing, add your info in the [`_data/comments.yml`](_data/comments.yml):
|
|
217
219
|
|
|
218
220
|
```yaml
|
|
219
221
|
comments:
|
|
@@ -224,16 +226,41 @@ comments:
|
|
|
224
226
|
label: # OPTIONAL: Adds an issue label in the issue
|
|
225
227
|
```
|
|
226
228
|
|
|
229
|
+
#### Giscus
|
|
230
|
+
|
|
231
|
+
[Giscus](https://giscus.app/) is another open source alternative linked to one's GitHub account.
|
|
232
|
+
It stores the comments as GitHub discussions on a repository for each page.
|
|
233
|
+
|
|
234
|
+
Install the giscus [app](https://github.com/apps/giscus) to your repo.
|
|
235
|
+
After installing, add your info in the [`_data/comments.yml`](_data/comments.yml):
|
|
236
|
+
|
|
237
|
+
```yaml
|
|
238
|
+
comments:
|
|
239
|
+
giscus: # Enable by filling below information. For more info, go to https://giscus.app
|
|
240
|
+
repo: # Your public comments repository (e.g. owner/repo)
|
|
241
|
+
repo-id: # Your repo id, go to https://giscus.app to check it
|
|
242
|
+
category: # Category to search discussions. When removed, discussions will be searched in all categories
|
|
243
|
+
category-id: # Your category id, go to https://giscus.app to check it
|
|
244
|
+
mapping: # Discussion mapping
|
|
245
|
+
term: # OPTIONAL: some mappings require specific term, go to https://giscus.app to check it
|
|
246
|
+
strict: 1 # OPTIONAL: Avoid mismatches on similar titles
|
|
247
|
+
reactions-enabled: 0 # OPTIONAL: Disable reactions
|
|
248
|
+
emit-metadata: 1 # OPTIONAL: Emit discussion metadata
|
|
249
|
+
input-position: top # OPTIONAL: Place the comment box above the comments
|
|
250
|
+
theme: # OPTIONAL: Take the `color_theme` by default, or set a custom one like dark_dimmed
|
|
251
|
+
lang: # OPTIONAL: Choose the language. "en" is used by default
|
|
252
|
+
```
|
|
253
|
+
|
|
227
254
|
### Math typesetting with KateX
|
|
228
255
|
|
|
229
|
-
When KateX is set in `_config.yml
|
|
256
|
+
When KateX is set in [`_config.yml`](_config.yml):
|
|
230
257
|
|
|
231
258
|
```yml
|
|
232
259
|
katex: true # to enable it
|
|
233
260
|
```
|
|
234
261
|
|
|
235
262
|
You can then wrap math expressions with `$$` signs in your posts and make sure you have set the `katex` variable
|
|
236
|
-
in `_config.yml` to `true` for math typesetting.
|
|
263
|
+
in [`_config.yml`](_config.yml) to `true` for math typesetting.
|
|
237
264
|
|
|
238
265
|
For inline math typesetting, type your math expression on the *same line* as your content. For example:
|
|
239
266
|
|
|
@@ -253,7 +280,7 @@ You can find a cheat sheet of the compatible LaTex symbols [online](https://arto
|
|
|
253
280
|
|
|
254
281
|
### Diagrams with Mermaid
|
|
255
282
|
|
|
256
|
-
Enable the [mermaid-js](https://github.com/mermaid-js/mermaid) diagram rendering by setting mermaid to true in the `_config.yml
|
|
283
|
+
Enable the [mermaid-js](https://github.com/mermaid-js/mermaid) diagram rendering by setting mermaid to true in the [`_config.yml`](_config.yml).
|
|
257
284
|
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).
|
|
258
285
|
|
|
259
286
|
```yml
|
|
@@ -272,11 +299,11 @@ sequenceDiagram
|
|
|
272
299
|
|
|
273
300
|
### Social icons
|
|
274
301
|
|
|
275
|
-
In `_data/social.yml` you can customize the social icons that will be displayed in the post to share your post.
|
|
302
|
+
In [`_data/social.yml`](_data/social.yml) you can customize the social icons that will be displayed in the post to share your post.
|
|
276
303
|
You can also enable RSS.
|
|
277
304
|
The site icons come from [Font Awesome](https://fontawesome.com/).
|
|
278
305
|
|
|
279
|
-
In `_data/icons.yml` you can set the footer icon that will appear at the bottom of the page.
|
|
306
|
+
In [`_data/icons.yml`](_data/icons.yml) you can set the footer icon that will appear at the bottom of the page.
|
|
280
307
|
They will redirect the user on your profile on to other platforms like Twitter, GitHub and so many more!
|
|
281
308
|
|
|
282
309
|
### Cookie consent
|
|
@@ -293,11 +320,11 @@ They will on click redirect you to the logo's platform to share the article.
|
|
|
293
320
|
#### Footer
|
|
294
321
|
|
|
295
322
|
Display icons in the footer.
|
|
296
|
-
All icon variables should be your username enclosed in quotes (e.g. "username") in `_data/icons.yml
|
|
323
|
+
All icon variables should be your username enclosed in quotes (e.g. "username") in [`_data/icons.yml`](_data/icons.yml).
|
|
297
324
|
|
|
298
325
|
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)).
|
|
299
326
|
To enable the share icons at the bottom of each article,
|
|
300
|
-
set to true the one you'd like under `share` in the `_data/social.yml` file.
|
|
327
|
+
set to true the one you'd like under `share` in the [`_data/social.yml`](_data/social.yml) file.
|
|
301
328
|
|
|
302
329
|
### Personalize your Blog Posts 📝
|
|
303
330
|
|
|
@@ -329,7 +356,7 @@ tags: [sample, markdown, html] # [Opt] Add tags to the page
|
|
|
329
356
|
With `thumbnail`, you can add a smaller image than the `feature-img`.
|
|
330
357
|
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.
|
|
331
358
|
|
|
332
|
-
If you don't use a feature image, but `color`, the transparent background is set comes from `lineart.png
|
|
359
|
+
If you don't use a feature image, but `color`, the transparent background is set comes from [`lineart.png`](assets/img/lineart.png).
|
|
333
360
|
You can edit it in the config file (`_config.yml > color_image`). If you want another one, put it in `/assets/img` as well.
|
|
334
361
|
|
|
335
362
|
For position, if not set on all pages, it will be by alphabetical order without `position` then by `position` order.
|
|
@@ -399,7 +426,7 @@ of your favourite highlight color scheme on this format.
|
|
|
399
426
|
All feature pages besides the "home" one are stored in the `page` folder,
|
|
400
427
|
they will appear in the navigation bar unless you set `Hide: true` in the front matter.
|
|
401
428
|
|
|
402
|
-
Here are the documentation for the other feature pages that can be added through `_config.yml
|
|
429
|
+
Here are the documentation for the other feature pages that can be added through [`_config.yml`](_config.yml).
|
|
403
430
|
|
|
404
431
|
Non-standard features are documented below.
|
|
405
432
|
|
|
@@ -410,13 +437,13 @@ Unless you are making a custom layout you won't need it.
|
|
|
410
437
|
|
|
411
438
|
### Layout: Home 🏡
|
|
412
439
|
|
|
413
|
-
This page is used as the home page of the template (in the `index.html`). It displays the list of articles in `_posts`.
|
|
440
|
+
This page is used as the home page of the template (in the [`index.html`](index.html)). It displays the list of articles in `_posts`.
|
|
414
441
|
You can use this layout in another page (adding a title to it will make it appear in the navigation bar).
|
|
415
442
|
|
|
416
443
|
The recommended width and height for the home picture is width:`2484px;` and height:`1280px`
|
|
417
444
|
which are the dimensions of the actual picture for it to be rolling down as you scroll the page.
|
|
418
445
|
|
|
419
|
-
If your posts are not displaying ensure that you have added the line `paginate: 5` to `_config.yml
|
|
446
|
+
If your posts are not displaying ensure that you have added the line `paginate: 5` to [`_config.yml`](_config.yml).
|
|
420
447
|
|
|
421
448
|
### Layout: Page 📄
|
|
422
449
|
|
|
@@ -442,7 +469,7 @@ The hide only hides your page from the navigation bar, it is, however, still gen
|
|
|
442
469
|
|
|
443
470
|
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.
|
|
444
471
|
|
|
445
|
-
To use the portfolio, simply create a `portfolio.md` with this information inside:
|
|
472
|
+
To use the portfolio, simply create a [`portfolio.md`](pages/portfolio.md) with this information inside:
|
|
446
473
|
|
|
447
474
|
```yml
|
|
448
475
|
|
|
@@ -475,7 +502,7 @@ date: 2019-07-25 # Not mandatory, however needs to be in date format t
|
|
|
475
502
|
|
|
476
503
|
#### Portfolio in gem
|
|
477
504
|
|
|
478
|
-
Make sure your `_config.yml` contains the following if you are using the theme as a gem:
|
|
505
|
+
Make sure your [`_config.yml`](_config.yml) contains the following if you are using the theme as a gem:
|
|
479
506
|
|
|
480
507
|
```yml
|
|
481
508
|
# PORTFOLIO
|
|
@@ -508,7 +535,7 @@ gallery: "assets/img/pexels"
|
|
|
508
535
|
### Feature: Search 🔍
|
|
509
536
|
|
|
510
537
|
The search feature is based on [Simple-Jekyll-search](https://github.com/sylhare/Simple-Jekyll-Search)
|
|
511
|
-
there is a `search.liquid` file that will create a list of all the site posts, pages and portfolios.
|
|
538
|
+
there is a [`search.liquid`](_layouts/search.liquid) file that will create a list of all the site posts, pages and portfolios.
|
|
512
539
|
Then there's a script displaying the formatted results in the _search page_.
|
|
513
540
|
|
|
514
541
|
To exclude contents from the search add the `exclude: true` option in the markdown header.
|
|
@@ -616,7 +643,7 @@ Add this line to your Jekyll site's Gemfile (or create one):
|
|
|
616
643
|
gem "type-on-strap"
|
|
617
644
|
```
|
|
618
645
|
|
|
619
|
-
Add this line to your Jekyll site's `_config.yml` file:
|
|
646
|
+
Add this line to your Jekyll site's [`_config.yml`](_config.yml) file:
|
|
620
647
|
|
|
621
648
|
```yml
|
|
622
649
|
theme: type-on-strap
|
|
@@ -629,14 +656,14 @@ bundle install
|
|
|
629
656
|
```
|
|
630
657
|
|
|
631
658
|
Then you can start adding content like:
|
|
632
|
-
- Add a `index.html` file
|
|
659
|
+
- Add a [`index.html`](index.html) file
|
|
633
660
|
- Add the feature page you want. (ex: as it is already in `pages`)
|
|
634
661
|
- Add posts in `_posts` and `_portfolio` to be displayed
|
|
635
662
|
|
|
636
663
|
### Remote Theme
|
|
637
664
|
|
|
638
665
|
Now you can use any theme gem with GitHub pages with [29/11/2017 GitHub Pages Broadcast](https://github.com/blog/2464-use-any-theme-with-github-pages).
|
|
639
|
-
For that remove all `theme:` attributes from `_config.yml` and add instead:
|
|
666
|
+
For that remove all `theme:` attributes from [`_config.yml`](_config.yml) and add instead:
|
|
640
667
|
|
|
641
668
|
```yml
|
|
642
669
|
remote_theme: sylhare/Type-on-Strap
|
data/_data/language.yml
CHANGED
|
@@ -18,6 +18,7 @@ str_months: [January, February, March, April, May, June, July, August, September
|
|
|
18
18
|
str_dark: 'Dark'
|
|
19
19
|
str_light: 'Light'
|
|
20
20
|
str_date_format: '%B %-d, %Y'
|
|
21
|
+
str_last_modified: 'Last modified on'
|
|
21
22
|
|
|
22
23
|
# Localization settings
|
|
23
24
|
cusdis_lang: # zh-cn, es, tr, pt-BR
|
data/_includes/blog/blog.liquid
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<div class="posts">
|
|
1
|
+
<div class="posts" data-testid="blog-posts">
|
|
2
2
|
{% unless paginator.posts %}
|
|
3
3
|
<article><section class="post-content"><p>There are no blog posts</p></section></article>
|
|
4
4
|
{% endunless %}
|
|
5
5
|
{% for post in paginator.posts %}
|
|
6
|
-
<div class="post-teaser">
|
|
6
|
+
<div class="post-teaser" data-testid="blog-post-teaser">
|
|
7
7
|
{% if post.thumbnail %}
|
|
8
8
|
<div class="post-img">
|
|
9
9
|
<a aria-label="{{ post.title }}" href="{{ post.url | relative_url }}">
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<span>
|
|
15
15
|
<header>
|
|
16
16
|
<h1>
|
|
17
|
-
<a aria-label="{{ post.title }}" class="post-link" href="{{ post.url | relative_url }}">
|
|
17
|
+
<a aria-label="{{ post.title }}" class="post-link" data-testid="blog-post-link" href="{{ post.url | relative_url }}">
|
|
18
18
|
{{ post.title }}
|
|
19
19
|
</a>
|
|
20
20
|
</h1>
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
.post-content a { color: {{ color }} !important; }
|
|
14
14
|
.share-buttons a { color: {{ color }} !important; }
|
|
15
15
|
.tag-list a:not(:hover) { color: {{ color }} !important; }
|
|
16
|
+
.category-list a:not(:hover) { color: {{ color }} !important; }
|
|
16
17
|
div#post-nav a { color: {{ color }} !important; }
|
|
17
18
|
footer a { color: {{ color }} !important; }
|
|
18
19
|
.site-header nav a:hover { color: {{ color }} !important; }
|
|
@@ -39,18 +40,29 @@
|
|
|
39
40
|
{% include blog/post_nav.liquid %}
|
|
40
41
|
{% endif %}
|
|
41
42
|
|
|
43
|
+
<!-- Giscus -->
|
|
44
|
+
{% if site.data.comments.giscus.repo and site.data.comments.giscus.repo-id and site.data.comments.giscus.category-id and site.data.comments.giscus.mapping %}
|
|
45
|
+
{% include social/giscus.liquid %}
|
|
46
|
+
{% endif %}
|
|
47
|
+
|
|
42
48
|
<!--Utterances-->
|
|
43
|
-
{% if site.comments.utterances.repo and site.comments.utterances.issue-term %}
|
|
49
|
+
{% if site.data.comments.utterances.repo and site.data.comments.utterances.issue-term %}
|
|
50
|
+
{% include social/utterances.liquid %}
|
|
51
|
+
{% elsif site.comments.utterances.repo and site.comments.utterances.issue-term %}
|
|
44
52
|
{% include social/utterances.liquid %}
|
|
45
53
|
{% endif %}
|
|
46
54
|
|
|
47
55
|
<!-- Cusdis -->
|
|
48
|
-
{% if site.comments.
|
|
56
|
+
{% if site.data.comments.cusdis.app_id %}
|
|
57
|
+
{% include social/cusdis.liquid %}
|
|
58
|
+
{% elsif site.comments.cusdis_app_id or site.cusdis_app_id %}
|
|
49
59
|
{% include social/cusdis.liquid %}
|
|
50
60
|
{% endif %}
|
|
51
61
|
|
|
52
62
|
<!-- Disqus -->
|
|
53
|
-
{% if site.comments.
|
|
63
|
+
{% if site.data.comments.disqus.shortname %}
|
|
64
|
+
{% include social/disqus.liquid %}
|
|
65
|
+
{% elsif site.comments.disqus_shortname or site.theme_settings.disqus_shortname or site.disqus_shortname %}
|
|
54
66
|
{% include social/disqus.liquid %}
|
|
55
67
|
{% endif %}
|
|
56
68
|
{% endcapture %}
|
|
@@ -2,14 +2,25 @@
|
|
|
2
2
|
{% assign date = include.date | default: "today" | date: site.data.language.str_date_format | default: '%B %-d, %Y' %}
|
|
3
3
|
|
|
4
4
|
<div class="post-info">
|
|
5
|
-
|
|
6
|
-
{% if author
|
|
7
|
-
<
|
|
5
|
+
<div class="post-meta">
|
|
6
|
+
{% if author %}
|
|
7
|
+
<div class="author-info">
|
|
8
|
+
{%- if author.url -%}<a href="{{ author.url | relative_url }}" target="_blank" rel="noopener">{%- endif -%}
|
|
9
|
+
{% if author.avatar %}
|
|
10
|
+
<img alt="Author's avatar" src="{{ author.avatar | relative_url }}" loading="lazy">
|
|
11
|
+
{% endif %}
|
|
12
|
+
<p class="meta">
|
|
13
|
+
{% if author.name %}{{ author.name }}{% endif %}
|
|
14
|
+
</p>
|
|
15
|
+
{%- if author.url -%}</a>{%- endif -%}
|
|
16
|
+
</div>
|
|
17
|
+
<span class="meta-separator">-</span>
|
|
8
18
|
{% endif %}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
{% assign date_month = date | date: "%m" | minus: 1 %}
|
|
20
|
+
<p class="meta">{{ site.data.language.str_months[date_month] | default: date | date: "%B" }} {{ date | date: "%d, %Y" }}</p>
|
|
21
|
+
</div>
|
|
22
|
+
{% if include.last_modified %}
|
|
23
|
+
{% assign last_modified_month = include.last_modified | date: "%m" | minus: 1 %}
|
|
24
|
+
<p class="last-modified">{{ site.data.language.str_last_modified | default: "Last modified on" }} {{ site.data.language.str_months[last_modified_month] | default: include.last_modified | date: "%B" }} {{ include.last_modified | date: "%d, %Y" }}</p>
|
|
25
|
+
{% endif %}
|
|
15
26
|
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{% assign categories = include.categories | split:'|' | sort | uniq %}
|
|
2
|
+
|
|
3
|
+
{% if categories.size > 0 %}
|
|
4
|
+
<div class="category-list" data-testid="category-list">
|
|
5
|
+
<ul>
|
|
6
|
+
{% if categories.size == 1 %}
|
|
7
|
+
<li class="meta">Category</li>
|
|
8
|
+
{% else %}
|
|
9
|
+
<li class="meta">Categories</li>
|
|
10
|
+
{% endif %}
|
|
11
|
+
|
|
12
|
+
{% for category in categories %}
|
|
13
|
+
<li><a class="button" data-testid="category-link" href="{{ site.baseurl }}/categories#{{ category | cgi_escape }}">
|
|
14
|
+
<p><i class="fas fa-folder fa-fw fa-sm"></i> {{ category }}</p>
|
|
15
|
+
</a></li>
|
|
16
|
+
{% endfor %}
|
|
17
|
+
</ul>
|
|
18
|
+
</div>
|
|
19
|
+
{% else %}
|
|
20
|
+
<div class="category-list"></div>
|
|
21
|
+
{% endif %}
|
|
22
|
+
|
|
@@ -24,6 +24,11 @@
|
|
|
24
24
|
<!--Favicon-->
|
|
25
25
|
<link rel="shortcut icon" href="{{ site.favicon | relative_url }}" type="image/x-icon">
|
|
26
26
|
|
|
27
|
+
<!-- Preconnect to Cusdis for faster loading when comments become visible -->
|
|
28
|
+
{% if site.data.comments.cusdis.app_id or site.comments.cusdis_app_id or site.cusdis_app_id %}
|
|
29
|
+
<link rel="preconnect" href="https://cusdis.com">
|
|
30
|
+
{% endif %}
|
|
31
|
+
|
|
27
32
|
{% if page.bootstrap %}
|
|
28
33
|
<!-- Bootstrap-4.1.3 isolation CSS -->
|
|
29
34
|
<link rel="stylesheet" type="text/css" href="{{ '/assets/css/vendor/bootstrap-iso.min.css' | relative_url }}">
|
|
@@ -35,18 +40,18 @@
|
|
|
35
40
|
<script defer 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>
|
|
36
41
|
{% endif %}
|
|
37
42
|
|
|
38
|
-
<!-- KaTeX 0.16.
|
|
43
|
+
<!-- KaTeX 0.16.28 -->
|
|
39
44
|
{% if site.katex or site.theme_settings.katex %}
|
|
40
45
|
<script defer src="{{ '/assets/js/vendor/katex.min.js' | relative_url }}"></script>
|
|
41
46
|
<script defer src="{{ '/assets/js/vendor/katex.auto-render.min.js' | relative_url }}" onload="renderMathInElement(document.body);"></script>
|
|
42
47
|
{% endif %}
|
|
43
48
|
|
|
44
|
-
<!-- Mermaid 11.
|
|
49
|
+
<!-- Mermaid 11.12.2 -->
|
|
45
50
|
{% if site.mermaid %}
|
|
46
51
|
<script defer src="{{ '/assets/js/vendor/mermaid.min.js' | relative_url }}"></script>
|
|
47
52
|
{% endif %}
|
|
48
53
|
|
|
49
|
-
<!-- Simple Jekyll Search 1.
|
|
54
|
+
<!-- Simple Jekyll Search 2.1.1 -->
|
|
50
55
|
<script src="{{ '/assets/js/vendor/simple-jekyll-search.min.js' | relative_url }}" type="text/javascript"></script>
|
|
51
56
|
|
|
52
57
|
<!-- Google Analytics / Cookie Consent -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{% assign tags = include.tags | split:'|' | sort | uniq %}
|
|
2
2
|
|
|
3
3
|
{% if tags.size > 0 %}
|
|
4
|
-
<div class="tag-list">
|
|
4
|
+
<div class="tag-list" data-testid="tag-list">
|
|
5
5
|
<ul>
|
|
6
6
|
{% if tags.size == 1 %}
|
|
7
7
|
<li class="meta">Tag</li>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
{% endif %}
|
|
11
11
|
|
|
12
12
|
{% for tag in tags %}
|
|
13
|
-
<li><a class="button" href="{% unless 'Tags' == page.title %}{{ site.baseurl }}/tags{% endunless %}#{{ tag | cgi_escape }}">
|
|
13
|
+
<li><a class="button" data-testid="tag-link" href="{% unless 'Tags' == page.title %}{{ site.baseurl }}/tags{% endunless %}#{{ tag | cgi_escape }}">
|
|
14
14
|
<p><i class="fas fa-tag fa-fw fa-sm"></i> {{ tag }}</p>
|
|
15
15
|
</a></li>
|
|
16
16
|
{% endfor %}
|
data/_includes/portfolio.html
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<!-- Portfolio Grid Section -->
|
|
2
|
-
<div class="portfolio-grid">
|
|
2
|
+
<div class="portfolio-grid" data-testid="portfolio-grid">
|
|
3
3
|
{% for item in site.portfolio %}
|
|
4
|
-
<div class="portfolio-cell">
|
|
5
|
-
<a class="portfolio-link" data-keyboard="true" href="{{ item.url | relative_url }}">
|
|
6
|
-
<div class="caption" title="{{ item.title }}">
|
|
4
|
+
<div class="portfolio-cell" data-testid="portfolio-item">
|
|
5
|
+
<a class="portfolio-link" data-testid="portfolio-item-link" data-keyboard="true" href="{{ item.url | relative_url }}">
|
|
6
|
+
<div class="caption" data-testid="portfolio-item-caption" title="{{ item.title }}">
|
|
7
7
|
<div class="caption-content">
|
|
8
8
|
<i class="fas fa-search-plus fa-3x"></i>
|
|
9
9
|
</div>
|
|
10
10
|
</div>
|
|
11
|
-
<img alt="" class="" src="{{ item.img | relative_url }}">
|
|
11
|
+
<img alt="" class="" data-testid="portfolio-item-image" src="{{ item.img | relative_url }}">
|
|
12
12
|
</a>
|
|
13
13
|
</div>
|
|
14
14
|
{% endfor %}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<div class="comments" id="cusdis_thread"
|
|
2
2
|
data-host="https://cusdis.com"
|
|
3
|
-
data-app-id="{% if site.comments.cusdis_app_id %}{{ site.comments.cusdis_app_id }}{% else %}{{ site.cusdis_app_id }}{% endif %}"
|
|
3
|
+
data-app-id="{% if site.data.comments.cusdis.app_id %}{{ site.data.comments.cusdis.app_id }}{% elsif site.comments.cusdis_app_id %}{{ site.comments.cusdis_app_id }}{% else %}{{ site.cusdis_app_id }}{% endif %}"
|
|
4
4
|
data-page-id="{{ page.relative_path }}"
|
|
5
5
|
data-page-url="{{ page.url | absolute_url }}"
|
|
6
6
|
data-page-title="{{ page.title }}"
|
|
7
7
|
data-theme="{{ site.color_theme }}"
|
|
8
|
+
data-lazy-load="true"
|
|
9
|
+
{% if site.data.comments.cusdis.lang or site.data.language.cusdis_lang %}
|
|
10
|
+
data-lang="{% if site.data.comments.cusdis.lang %}{{ site.data.comments.cusdis.lang }}{% else %}{{ site.data.language.cusdis_lang }}{% endif %}"
|
|
11
|
+
{% endif %}
|
|
8
12
|
></div>
|
|
9
|
-
|
|
10
|
-
{% if site.data.language.cusdis_lang %}
|
|
11
|
-
<script defer src="https://cusdis.com/js/widget/lang/{{ site.data.language.cusdis_lang }}.js"></script>
|
|
12
|
-
{% endif %}
|
|
13
|
-
<script defer src="https://cusdis.com/js/cusdis.es.js"></script>
|
|
13
|
+
<script defer src="{{ '/assets/js/comments-lazy-load.min.js' | relative_url }}"></script>
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
<div class="comments"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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>
|
|
1
|
+
<div class="comments" id="disqus_thread"
|
|
2
|
+
data-lazy-load="true"
|
|
3
|
+
data-shortname="{% if site.data.comments.disqus.shortname %}{{ site.data.comments.disqus.shortname }}{% elsif site.comments.disqus_shortname %}{{ site.comments.disqus_shortname }}{% else %}{{ site.disqus_shortname }}{% endif %}"
|
|
4
|
+
>
|
|
5
|
+
<noscript>{{ site.data.language.str_javascript_required_disqus | default: "Please enable JavaScript to view comments." }}</noscript>
|
|
12
6
|
</div>
|
|
7
|
+
<script defer src="{{ '/assets/js/comments-lazy-load.min.js' | relative_url }}"></script>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<div id="giscus_thread"
|
|
2
|
+
data-lazy-load="true"
|
|
3
|
+
data-repo="{{ site.data.comments.giscus.repo }}"
|
|
4
|
+
data-repo-id="{{ site.data.comments.giscus.repo-id }}"
|
|
5
|
+
{% if site.data.comments.giscus.category %}data-category="{{ site.data.comments.giscus.category }}"{% endif %}
|
|
6
|
+
data-category-id="{{ site.data.comments.giscus.category-id }}"
|
|
7
|
+
data-mapping="{{ site.data.comments.giscus.mapping }}"
|
|
8
|
+
{% if site.data.comments.giscus.term %}data-term="{{ site.data.comments.giscus.term }}"{% endif %}
|
|
9
|
+
data-strict="{% if site.data.comments.giscus.strict %}{{ site.data.comments.giscus.strict }}{% else %}0{% endif %}"
|
|
10
|
+
data-reactions-enabled="{% if site.data.comments.giscus.reactions-enabled %}{{ site.data.comments.giscus.reactions-enabled }}{% else %}1{% endif %}"
|
|
11
|
+
data-emit-metadata="{% if site.data.comments.giscus.emit-metadata %}{{ site.data.comments.giscus.emit-metadata }}{% else %}0{% endif %}"
|
|
12
|
+
data-input-position="{% if site.data.comments.giscus.input-position %}{{ site.data.comments.giscus.input-position }}{% else %}bottom{% endif %}"
|
|
13
|
+
data-theme="{% if site.data.comments.giscus.theme %}{{ site.data.comments.giscus.theme }}{% elsif site.color_theme == 'dark' %}dark{% else %}light{% endif %}"
|
|
14
|
+
data-lang="{% if site.data.comments.giscus.lang %}{{ site.data.comments.giscus.lang }}{% else %}en{% endif %}"
|
|
15
|
+
{% if site.data.comments.giscus.loading %}data-loading="{{ site.data.comments.giscus.loading }}"{% endif %}
|
|
16
|
+
></div>
|
|
17
|
+
<script defer src="{{ '/assets/js/comments-lazy-load.min.js' | relative_url }}"></script>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<div id="utterances_thread"
|
|
2
|
+
data-lazy-load="true"
|
|
3
|
+
data-repo="{% if site.data.comments.utterances.repo %}{{ site.data.comments.utterances.repo }}{% else %}{{ site.comments.utterances.repo }}{% endif %}"
|
|
4
|
+
data-issue-term="{% if site.data.comments.utterances.issue-term %}{{ site.data.comments.utterances.issue-term }}{% else %}{{ site.comments.utterances.issue-term }}{% endif %}"
|
|
5
|
+
data-theme="{% if site.data.comments.utterances.theme %}{{ site.data.comments.utterances.theme }}{% elsif site.comments.utterances.theme %}{{ site.comments.utterances.theme }}{% elsif site.color_theme == 'dark' %}github-dark{% else %}github-light{% endif %}"
|
|
6
|
+
{% if site.data.comments.utterances.label or site.comments.utterances.label %}data-label="{% if site.data.comments.utterances.label %}{{ site.data.comments.utterances.label }}{% else %}{{ site.comments.utterances.label }}{% endif %}"{% endif %}
|
|
7
|
+
></div>
|
|
8
|
+
<script defer src="{{ '/assets/js/comments-lazy-load.min.js' | relative_url }}"></script>
|