type-on-strap 2.4.8 → 2.4.10
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/LICENSE +1 -1
- data/README.md +6 -6
- data/_data/language.yml +1 -0
- data/_includes/blog/post_info.liquid +1 -1
- data/_includes/default/footer.liquid +12 -6
- data/_includes/default/head.liquid +2 -5
- data/_includes/default/{search_input.liquid → search_json.liquid} +6 -9
- data/_layouts/archive.liquid +33 -0
- data/_layouts/categories.liquid +8 -3
- data/_layouts/default.html +1 -1
- data/_sass/base/_global.scss +1 -1
- data/_sass/layouts/_categories.scss +5 -0
- data/assets/data/search.liquid +2 -2
- data/assets/js/vendor/mermaid.min.js +376 -263
- metadata +8 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5f7c34c5bda2cf111c6a516ce892acf9b38b8ea736ead2c399afd491ada2c5b0
|
|
4
|
+
data.tar.gz: 730e35d536afe00d315c0d836dc76c1b8602a2f60f389fcbb7c786ca1ea8124a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 06db757e5c2fd9b0363fa1f1c9ab0d071dae6237f17143f107dff4c22ab61a06e3f8d93d1a8c654186fda792da4cbee696392666286b2f81bd72e86de7643979
|
|
7
|
+
data.tar.gz: 6d1c66f0423baf8093f898dfc301ccf4d72432bf196bb4222ed6e179b6d925de735276400d704343aa0c4099ac2ce87b024979db3869ee0427d37896be0cbc63
|
data/LICENSE
CHANGED
data/README.md
CHANGED
|
@@ -66,7 +66,7 @@ Here are the main files of the template
|
|
|
66
66
|
| ├── search.md # Search page
|
|
67
67
|
| └── tags.md # The tag page
|
|
68
68
|
├── _config.yml # sample configuration
|
|
69
|
-
├── _data
|
|
69
|
+
├── _data
|
|
70
70
|
| ├── authors.yml # Update the post authors configurations
|
|
71
71
|
| ├── language.yml # Localization configuration
|
|
72
72
|
| ├── biblio.yml # To create a reference bibliography
|
|
@@ -167,6 +167,8 @@ You can find all the properties in `_data/language.yml`.
|
|
|
167
167
|
|
|
168
168
|
By default, it is in English, but you can easily add your own language.
|
|
169
169
|
|
|
170
|
+
Here you also can set the date format, e.g., set `str_date_format: '%B %-d, %Y'` for "January, 13, 2024", `str_date_format: '%Y-%m-%d'` for 2024-01-13, or `str_date_format: '%d.%m.%Y'` for 13.01.2024.
|
|
171
|
+
|
|
170
172
|
### Google Analytics
|
|
171
173
|
|
|
172
174
|
To enable Google Analytics (GA4), add your [Measurement ID](https://support.google.com/analytics/answer/12270356?hl=en&sjid=1593376271608310401-NA)
|
|
@@ -258,15 +260,13 @@ mermaid: default # Enable mermaid-js for diagrams, use theme: base, forest, dark
|
|
|
258
260
|
```
|
|
259
261
|
|
|
260
262
|
Find all the help you need on the official [mermaid documentation](https://mermaid-js.github.io/mermaid/).
|
|
261
|
-
|
|
262
|
-
With the `class="mermaid"` inside the `<div>`:
|
|
263
|
+
Use `mermaid` as color highlighter language to render the diagram or with the `class="mermaid"` inside the `<div>`:
|
|
263
264
|
|
|
264
|
-
```
|
|
265
|
-
|
|
265
|
+
```markdown
|
|
266
|
+
```mermaid
|
|
266
267
|
sequenceDiagram
|
|
267
268
|
Alice->>John: Hello John, how are you?
|
|
268
269
|
John-->>Alice: Great!
|
|
269
|
-
</div>
|
|
270
270
|
```
|
|
271
271
|
|
|
272
272
|
### Social icons
|
data/_data/language.yml
CHANGED
|
@@ -17,6 +17,7 @@ str_cookie_disclaimer: "We would like to use third party cookies and scripts to
|
|
|
17
17
|
str_months: [January, February, March, April, May, June, July, August, September, October, November, December]
|
|
18
18
|
str_dark: 'Dark'
|
|
19
19
|
str_light: 'Light'
|
|
20
|
+
str_date_format: '%B %-d, %Y'
|
|
20
21
|
|
|
21
22
|
# Localization settings
|
|
22
23
|
cusdis_lang: # zh-cn, es, tr, pt-BR
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{% assign author = site.data.authors[include.author] %}
|
|
2
|
-
{% assign date = include.date | default: "today" | date:
|
|
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
5
|
{%- if author.url -%}<a href="{{ author.url | relative_url }}" target="_blank" rel="noopener">{%- endif -%}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
<footer class="site-footer">
|
|
2
2
|
<p class="text">
|
|
3
3
|
{{ site.footer_text | default: "Powered by <a href='https://jekyllrb.com/'>Jekyll</a> with <a href='https://github.com/sylhare/Type-on-Strap'>Type on Strap</a>" }}</p>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
<div class="footer-icons">
|
|
5
|
+
<ul>
|
|
6
|
+
<!-- Social icons from Font Awesome, if enabled -->
|
|
7
|
+
{% include social/icons.liquid %}
|
|
8
|
+
</ul>
|
|
9
|
+
</div>
|
|
10
|
+
{% if site.mermaid %}
|
|
11
|
+
<script type="module">
|
|
12
|
+
mermaid.initialize({ startOnLoad: false, theme: "default" });
|
|
13
|
+
mermaid.run({ nodes: [...document.querySelectorAll('.language-mermaid'), ...document.querySelectorAll('.mermaid')] });
|
|
14
|
+
</script>
|
|
15
|
+
{% endif %}
|
|
10
16
|
</footer>
|
|
11
17
|
|
|
12
18
|
|
|
@@ -41,12 +41,9 @@
|
|
|
41
41
|
<script defer src="{{ '/assets/js/vendor/katex.auto-render.min.js' | relative_url }}" onload="renderMathInElement(document.body);"></script>
|
|
42
42
|
{% endif %}
|
|
43
43
|
|
|
44
|
-
<!-- Mermaid 10.
|
|
44
|
+
<!-- Mermaid 10.8.0 -->
|
|
45
45
|
{% if site.mermaid %}
|
|
46
|
-
<script defer src="{{ '/assets/js/vendor/mermaid.min.js' | relative_url }}"
|
|
47
|
-
startOnLoad:true,
|
|
48
|
-
theme: '{{ site.mermaid }}',
|
|
49
|
-
});"></script>
|
|
46
|
+
<script defer src="{{ '/assets/js/vendor/mermaid.min.js' | relative_url }}"></script>
|
|
50
47
|
{% endif %}
|
|
51
48
|
|
|
52
49
|
<!-- Simple Jekyll Search 1.10.0 -->
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
{% assign dateFormat = site.data.language.str_date_format | default: '%B %-d, %Y' %}
|
|
1
2
|
[
|
|
2
3
|
{% for post in site.posts %}
|
|
3
4
|
{
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
"category" : "{{ post.category }}",
|
|
7
8
|
"tags" : "{{ post.tags | join: ', ' | prepend: " " }}",
|
|
8
9
|
"url" : "{{ post.url | relative_url }}",
|
|
9
|
-
"date" : "{{ post.date | date:
|
|
10
|
+
"date" : "{{ post.date | date: dateFormat }}",
|
|
10
11
|
"excerpt" : {{ post.content | strip_html | strip_newlines | strip | escape | truncate: '250' | escape | jsonify }},
|
|
11
12
|
"content" : {{ post.content | strip_html | strip_newlines | strip | escape | jsonify }}
|
|
12
13
|
{% endunless %}
|
|
@@ -20,31 +21,27 @@
|
|
|
20
21
|
"category" : "{{ page.category }}",
|
|
21
22
|
"tags" : "{{ page.tags | join: ', ' | prepend: " " }}",
|
|
22
23
|
"url" : "{{ page.url | relative_url }}",
|
|
23
|
-
"date" : "{{ page.date | date:
|
|
24
|
+
"date" : "{{ page.date | date: dateFormat | default: "N/A" }}",
|
|
24
25
|
"excerpt" : {{ page.content | strip_html | strip_newlines | strip | escape | truncate: '250' | escape | jsonify }},
|
|
25
26
|
"content" : {{ page.content | strip_html | strip_newlines | strip | escape | jsonify }}
|
|
26
27
|
{% endunless %}
|
|
27
28
|
}{% unless forloop.last %},{% endunless %}
|
|
28
29
|
{% endfor %}
|
|
29
|
-
{% if site.collections.size > 1 %},{% endif %}
|
|
30
30
|
{% for collection in site.collections %}
|
|
31
31
|
{% unless collection.label == 'posts' or site[collection.label].size == 0 %}
|
|
32
32
|
{% for page in site[collection.label] %}
|
|
33
|
-
{
|
|
33
|
+
,{
|
|
34
34
|
{% if page.excluded or page.title != nil %}
|
|
35
35
|
"title" : "{{ page.title | strip_newlines | escape }}",
|
|
36
36
|
"category" : "{{ page.category }}",
|
|
37
37
|
"tags" : "{{ page.tags | join: ', ' | prepend: " " }}",
|
|
38
38
|
"url" : "{{ page.url | relative_url }}",
|
|
39
|
-
"date" : "{{ page.date | date:
|
|
39
|
+
"date" : "{{ page.date | date: dateFormat | default: "N/A" }}",
|
|
40
40
|
"excerpt" : {{ page.content | strip_html | strip_newlines | strip | escape | truncate: '250' | jsonify }},
|
|
41
41
|
"content" : {{ page.content | strip_html | strip_newlines | strip | escape | jsonify }}
|
|
42
42
|
{% endif %}
|
|
43
|
-
}
|
|
43
|
+
}
|
|
44
44
|
{% endfor %}
|
|
45
|
-
{% else %}
|
|
46
|
-
{}
|
|
47
45
|
{% endunless %}
|
|
48
|
-
{% unless forloop.last %},{% endunless %}
|
|
49
46
|
{% endfor %}
|
|
50
47
|
]
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: page
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<div class="home">
|
|
6
|
+
<div id="archive">
|
|
7
|
+
{% assign postsByYear = site.posts | group_by_exp:"post", "post.date | date: '%Y'" %}
|
|
8
|
+
<ul class="archive-clouds">
|
|
9
|
+
{% for year in postsByYear %}
|
|
10
|
+
<a href="#archive-{{ year.name | cgi_escape }}" class="archive-anchor">
|
|
11
|
+
<li>
|
|
12
|
+
{{ year.name | cgi_escape }} ({{year.items.size}})
|
|
13
|
+
</li>
|
|
14
|
+
</a>
|
|
15
|
+
{% endfor %}
|
|
16
|
+
</ul>
|
|
17
|
+
{% for year in postsByYear %}
|
|
18
|
+
<div class="archive-group">
|
|
19
|
+
<h4 id="archive-{{year.name}}" class="title">{{ year.name }} ({{year.items.size}})</h4>
|
|
20
|
+
<div class="items">
|
|
21
|
+
{% for post in year.items %}
|
|
22
|
+
<a href="{{ post.url | relative_url }}" class="archive-post-link">
|
|
23
|
+
<div class="item">
|
|
24
|
+
<p class="meta">{{ post.date | date: site.data.language.str_date_format | default: '%B %-d, %Y' }}</p>
|
|
25
|
+
<p class="title">{{ post.title }}</p>
|
|
26
|
+
</div>
|
|
27
|
+
</a>
|
|
28
|
+
{% endfor %}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
{% endfor %}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
data/_layouts/categories.liquid
CHANGED
|
@@ -9,7 +9,7 @@ layout: page
|
|
|
9
9
|
{% for category in site.categories %}
|
|
10
10
|
<a href="#{{ category | first | cgi_escape }}" class="category-anchor">
|
|
11
11
|
<li>
|
|
12
|
-
{{ category | first }}
|
|
12
|
+
{{ category | first }}
|
|
13
13
|
<!-- {{ category | last | size | times: 100 | divided_by: site.tags.size | plus: 50 | divided_by: 100.0 }} -->
|
|
14
14
|
<!-- <span class="category-number">{{ category | last | size }}</span> -->
|
|
15
15
|
</li>
|
|
@@ -20,12 +20,17 @@ layout: page
|
|
|
20
20
|
{% for category in site.categories %}
|
|
21
21
|
<div class="category-group">
|
|
22
22
|
{% capture group %}{{ category | first }}{% endcapture %}
|
|
23
|
-
<h4 id="{{ group }}" class="title">
|
|
23
|
+
<h4 id="{{ group }}" class="title">
|
|
24
|
+
{{ group }}
|
|
25
|
+
{% if page.showCounts %}
|
|
26
|
+
({{site.categories[group].size}})
|
|
27
|
+
{% endif %}
|
|
28
|
+
</h4>
|
|
24
29
|
<div class="items">
|
|
25
30
|
{% for post in site.categories[group] %}
|
|
26
31
|
<a href="{{ post.url | relative_url }}" class="category-post-link">
|
|
27
32
|
<div class="item">
|
|
28
|
-
<p class="meta">{{ post.date | date:
|
|
33
|
+
<p class="meta">{{ post.date | date: site.data.language.str_date_format | default: '%B %-d, %Y' }}</p>
|
|
29
34
|
<p class="title">{{ post.title }}</p>
|
|
30
35
|
</div>
|
|
31
36
|
</a>
|
data/_layouts/default.html
CHANGED
data/_sass/base/_global.scss
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
#archive,
|
|
1
2
|
#categories {
|
|
3
|
+
.archive-clouds,
|
|
2
4
|
.category-clouds {
|
|
3
5
|
margin: 30px 0 30px;
|
|
4
6
|
|
|
@@ -30,12 +32,14 @@
|
|
|
30
32
|
color: var(--header-text);
|
|
31
33
|
}
|
|
32
34
|
|
|
35
|
+
.archive-anchor:hover,
|
|
33
36
|
.category-anchor:hover {
|
|
34
37
|
text-decoration: none !important;
|
|
35
38
|
filter: none;
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
|
|
42
|
+
.archive-group,
|
|
39
43
|
.category-group {
|
|
40
44
|
padding: 15px 0 10px;
|
|
41
45
|
|
|
@@ -71,6 +75,7 @@
|
|
|
71
75
|
height: 100%;
|
|
72
76
|
}
|
|
73
77
|
|
|
78
|
+
.archive-post-link:hover,
|
|
74
79
|
.category-post-link:hover {
|
|
75
80
|
text-decoration: none;
|
|
76
81
|
|
data/assets/data/search.liquid
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
---
|
|
3
3
|
{% comment %}
|
|
4
|
-
The json is created in
|
|
4
|
+
The json is created in search_json.liquid and included here to be compressed
|
|
5
5
|
{% endcomment %}
|
|
6
|
-
{% capture _search %}{% include default/
|
|
6
|
+
{% capture _search %}{% include default/search_json.liquid %}{% endcapture %}
|
|
7
7
|
{% assign emptyField = '{ },' %}
|
|
8
8
|
{{ _search | split: " " | join: " " | remove: emptyField }}
|