type-on-strap 2.4.8 → 2.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- 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 +4 -3
- data/_layouts/archive.liquid +33 -0
- data/_layouts/categories.liquid +1 -1
- data/_layouts/default.html +1 -1
- data/_sass/base/_global.scss +1 -1
- data/_sass/layouts/_categories.scss +5 -0
- data/assets/js/vendor/mermaid.min.js +376 -263
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15dad5d590b48fae536490341e7833281b3771118b682275f86fd96128e0db5e
|
4
|
+
data.tar.gz: 3f6937d0f9c733be27b4e966ac9d6aba2222c6e0abcac690d3c93a3d171437d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f55e245d44102ba315df41b0353451afabc9458e00fb62eed47fce19350699626a27ba1db562b6f1dcf28aded39c7d8aff9d5a9a765918bd58061552cd08315
|
7
|
+
data.tar.gz: b1298b3bd7bdb9e8f3b7ec97c4f4ae24cd5c5d34b035693d1d08567a2be85e3cecc36a4563eb1ae14a59769fb2842835fdec2cf521d5c24631a0ca9c5adc6b57
|
data/README.md
CHANGED
@@ -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,7 +21,7 @@
|
|
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 %}
|
@@ -36,7 +37,7 @@
|
|
36
37
|
"category" : "{{ page.category }}",
|
37
38
|
"tags" : "{{ page.tags | join: ', ' | prepend: " " }}",
|
38
39
|
"url" : "{{ page.url | relative_url }}",
|
39
|
-
"date" : "{{ page.date | date:
|
40
|
+
"date" : "{{ page.date | date: dateFormat | default: "N/A" }}",
|
40
41
|
"excerpt" : {{ page.content | strip_html | strip_newlines | strip | escape | truncate: '250' | jsonify }},
|
41
42
|
"content" : {{ page.content | strip_html | strip_newlines | strip | escape | jsonify }}
|
42
43
|
{% endif %}
|
@@ -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
@@ -25,7 +25,7 @@ layout: page
|
|
25
25
|
{% for post in site.categories[group] %}
|
26
26
|
<a href="{{ post.url | relative_url }}" class="category-post-link">
|
27
27
|
<div class="item">
|
28
|
-
<p class="meta">{{ post.date | date:
|
28
|
+
<p class="meta">{{ post.date | date: site.data.language.str_date_format | default: '%B %-d, %Y' }}</p>
|
29
29
|
<p class="title">{{ post.title }}</p>
|
30
30
|
</div>
|
31
31
|
</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
|
|