type-on-strap 2.4.8 → 2.4.10

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: dba3ab6a8c633aac793ffc8297817c5e43c8d3178d60379b2fd93158a61e063f
4
- data.tar.gz: 3a63ffd7c2a16ca9d784b14703c60405f68a4bdf19a2a8589b58a60864015954
3
+ metadata.gz: 5f7c34c5bda2cf111c6a516ce892acf9b38b8ea736ead2c399afd491ada2c5b0
4
+ data.tar.gz: 730e35d536afe00d315c0d836dc76c1b8602a2f60f389fcbb7c786ca1ea8124a
5
5
  SHA512:
6
- metadata.gz: 159db5d9f28dcc7ce897b4a7cf4e36116f7a6d61e772096f7fd86fc5296b25757991c076106c2076cae10bf0684e753ac4508a420d23c0cd5c980f9c6b5c63ad
7
- data.tar.gz: 077ebef49c8f68ed554d23075ff34ab66002fe6aa9fc28982805dde020feab142e922b6fbc05018395c4c49418b27099c968f92b85fd8fc44c3113f395b546f7
6
+ metadata.gz: 06db757e5c2fd9b0363fa1f1c9ab0d071dae6237f17143f107dff4c22ab61a06e3f8d93d1a8c654186fda792da4cbee696392666286b2f81bd72e86de7643979
7
+ data.tar.gz: 6d1c66f0423baf8093f898dfc301ccf4d72432bf196bb4222ed6e179b6d925de735276400d704343aa0c4099ac2ce87b024979db3869ee0427d37896be0cbc63
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016-2023 Sylhare
3
+ Copyright (c) 2016-2024 Sylhare
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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.yml
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
- You can create with ease diagrams. Add your mermaid script inside two mermaid divs (default Kramdown does not yet support mermaid).
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
- ```html
265
- <div class="mermaid">
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: "%B %-d, %Y" %}
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
- <div class="footer-icons">
5
- <ul>
6
- <!-- Social icons from Font Awesome, if enabled -->
7
- {% include social/icons.liquid %}
8
- </ul>
9
- </div>
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.6.1 -->
44
+ <!-- Mermaid 10.8.0 -->
45
45
  {% if site.mermaid %}
46
- <script defer src="{{ '/assets/js/vendor/mermaid.min.js' | relative_url }}" onload="mermaid.initialize({
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: "%B %-d, %Y" }}",
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: "%B %-d, %Y" | default: "N/A" }}",
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: "%B %-d, %Y" | default: "N/A" }}",
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
- }{% unless forloop.last %},{% endunless %}
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>
@@ -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">{{ group }}</h4>
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: "%B %-d, %Y" }}</p>
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>
@@ -1,6 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <!--
3
- Type on Strap jekyll theme v2.4.8
3
+ Type on Strap jekyll theme v2.4.10
4
4
  Theme free for personal and commercial use under the MIT license
5
5
  https://github.com/sylhare/Type-on-Strap/blob/master/LICENSE
6
6
  -->
@@ -269,7 +269,7 @@ details {
269
269
  }
270
270
 
271
271
  // Mermaid
272
- .mermaid {
272
+ .mermaid, .language-mermaid {
273
273
  background-color: rgba(255, 255, 255, 0.9);
274
274
  border-radius: 2%;
275
275
 
@@ -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
 
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  ---
3
3
  {% comment %}
4
- The json is created in search_input.liquid and included here to be compresed
4
+ The json is created in search_json.liquid and included here to be compressed
5
5
  {% endcomment %}
6
- {% capture _search %}{% include default/search_input.liquid %}{% endcapture %}
6
+ {% capture _search %}{% include default/search_json.liquid %}{% endcapture %}
7
7
  {% assign emptyField = '{ },' %}
8
8
  {{ _search | split: " " | join: " " | remove: emptyField }}