chulapa-jekyll 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +45 -9
- data/README.md +139 -81
- data/_data/welcomments/01_install/01H35P308R2G2YMW849CK7V1VP.json +9 -0
- data/_data/welcomments/02_config/01GMBNMYVQS6NCQ45S7KP1TK80.json +10 -0
- data/_data/welcomments/02_config/01GMBNP7RB0CBQNKKXKWG5CHJN.json +10 -0
- data/_data/welcomments/02_config/01GMBNX1CNV06WN12XR72CNN8D.json +11 -0
- data/_data/welcomments/02_config/01GME95BGP5HDQWAWFXT49FDB5.json +10 -0
- data/_data/welcomments/02_config/01GME9BZ4N0K0RT3WEPM397VP1.json +10 -0
- data/_data/welcomments/02_config/01HAH50GMY2SEESXQNR9D3V44R.json +9 -0
- data/_data/welcomments/welcome/01GMDMF77D4VZ7VQX9JAK0RMT5.json +10 -0
- data/_data/welcomments/welcome/01H1QVV3C210ND4XY30H0BZHQP.json +9 -0
- data/_includes/components/author.html +12 -7
- data/_includes/components/breadcrumbdatesocial.html +20 -12
- data/_includes/components/cactus.html +18 -0
- data/_includes/components/categories.html +1 -1
- data/_includes/components/cusdis.html +18 -0
- data/_includes/components/disqus.html +1 -1
- data/_includes/components/headers.html +10 -10
- data/_includes/components/indexcards.html +1 -1
- data/_includes/components/navbeforeafter.html +23 -4
- data/_includes/components/related.html +72 -0
- data/_includes/components/sidetoc.html +15 -0
- data/_includes/components/tags.html +1 -1
- data/_includes/components/toc.html +120 -50
- data/_includes/components/welcomments.html +10 -0
- data/_includes/footer.html +27 -9
- data/_includes/head.html +39 -30
- data/_includes/navbar.html +4 -4
- data/_includes/snippets/bootstrapdemo.html +3 -0
- data/_includes/snippets/carousel.html +3 -3
- data/_includes/snippets/masonry.html +3 -1
- data/_includes/snippets/video.html +20 -10
- data/_includes/snippets/youtube.html +10 -1
- data/_includes/welcomments/comment_form.html +26 -0
- data/_includes/welcomments/comments.html +109 -0
- data/_includes/welcomments/single_comment.html +57 -0
- data/_includes/welcomments/template.html +46 -0
- data/_layouts/cloudcategory.html +4 -4
- data/_layouts/compress.html +2 -2
- data/_layouts/default.html +17 -3
- data/_layouts/landingpage.html +21 -3
- data/_layouts/minimal.html +5 -6
- data/_layouts/search.html +8 -7
- data/_sass/chulapa/_classes.scss +1270 -0
- data/_sass/{chulapa-misc.scss → chulapa/_reboot.scss} +24 -4
- data/_sass/{chulapa-vars.scss → chulapa/_variables.scss} +25 -5
- data/_sass/chulapa-master.scss +5 -5
- data/_sass/highlight/monokai.scss +1 -1
- data/_sass/reset-algolia.scss +1 -1
- data/_sass/skins/academia.scss +23 -17
- data/_sass/skins/auto.scss +2 -1
- data/_sass/skins/chulapa.scss +14 -12
- data/_sass/skins/dark-bg.scss +62 -0
- data/_sass/skins/deeply.scss +4 -3
- data/_sass/skins/gitdev-dark.scss +97 -0
- data/_sass/skins/gitdev.scss +86 -0
- data/_sass/skins/graymor.scss +17 -18
- data/_sass/skins/hootstrap.scss +12 -12
- data/_sass/skins/journal.scss +6 -5
- data/_sass/skins/lux.scss +9 -10
- data/_sass/skins/lymcha.scss +10 -10
- data/_sass/skins/minty.scss +14 -11
- data/_sass/skins/pear.scss +18 -18
- data/_sass/skins/preptor.scss +13 -14
- data/_sass/skins/sketchy.scss +5 -4
- data/_sass/skins/sunset.scss +10 -10
- data/_sass/skins/towards.scss +50 -0
- data/_sass/skins/twitter-dim.scss +38 -28
- data/_sass/skins/twitter-lights-out.scss +38 -30
- data/_sass/skins/twitter.scss +25 -25
- data/_sass/skins/universal.scss +79 -21
- data/_sass/skins/wandoo.scss +12 -13
- data/assets/css/main.scss +1 -1
- data/assets/css/welcomments.scss +572 -0
- data/assets/fonts/Hubot-Sans/Hubot-Sans.woff2 +0 -0
- data/assets/fonts/Hubot-Sans/LICENSE.txt +93 -0
- data/assets/fonts/Mona-Sans/LICENSE.txt +93 -0
- data/assets/fonts/Mona-Sans/Mona-Sans.woff2 +0 -0
- data/assets/js/ch_ytdefer/ch_ytdefer.js +3 -1
- data/assets/js/chulapa_script.js +175 -0
- data/assets/js/clipboard/chulapa_clipboard.js +109 -0
- data/assets/js/cusdis/chulapa_cusdis.js +1 -0
- data/assets/js/google/google-search.js +0 -1
- metadata +37 -63
- data/_sass/chulapa-classes.scss +0 -844
- data/assets/fonts/Chulapa/Chulapa-Bold.otf +0 -0
- data/assets/fonts/Chulapa/Chulapa-Bold_v2.1.otf +0 -0
- data/assets/fonts/Chulapa/Chulapa-Bold_v2.2.otf +0 -0
- data/assets/fonts/Chulapa/Chulapa-Bold_v2.otf +0 -0
- data/assets/fonts/Chulapa/Chulapa-Light.otf +0 -0
- data/assets/fonts/Chulapa/Chulapa-Regular.otf +0 -0
- data/assets/js/ch_ytdefer/ch_ytdefer.min.js +0 -1
- data/assets/js/clipboardrouge.js +0 -95
- /data/_sass/{bootstrapv5-migration.scss → chulapa/_bootstrapv5.scss} +0 -0
- /data/_sass/{chulapa-mixins.scss → chulapa/_mixins.scss} +0 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
{% if site.comments.cusdis_app_id %}
|
2
|
+
<div class="container">
|
3
|
+
<div class="row">
|
4
|
+
<div class="col-lg-8 offset-lg-2">
|
5
|
+
<div id="cusdis_thread"
|
6
|
+
class = "py-4"
|
7
|
+
data-host="{{ site.comments.cusdis_host | default: 'https://cusdis.com' }}"
|
8
|
+
data-app-id="{{ site.comments.cusdis_app_id }}"
|
9
|
+
data-page-id="{{ include.pageid }}"
|
10
|
+
data-page-url="{{ include.pageurl | absolute_url }}"
|
11
|
+
data-page-title="{{ include.pagetitle }}"
|
12
|
+
></div>
|
13
|
+
<script async defer src="{{ '/assets/js/cusdis/chulapa_cusdis.js' | absolute_url }}"></script>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
{% endif %}
|
@@ -5,10 +5,10 @@
|
|
5
5
|
<header class="d-flex align-items-center splash-chulapa">
|
6
6
|
{%- endif -%}
|
7
7
|
<div class="container-lg">
|
8
|
-
<h1>{{- page.title | default: "Where's your title?" -}}</h1>
|
8
|
+
<h1 class="p-name" >{{- page.title | default: "Where's your title?" -}}</h1>
|
9
9
|
{%- if page.subtitle -%}
|
10
10
|
<hr class="my-3">
|
11
|
-
<p class="chulapa-subtitle">{{- page.subtitle -}}</p>
|
11
|
+
<p class="chulapa-subtitle p-summary">{{- page.subtitle -}}</p>
|
12
12
|
{%- endif -%}
|
13
13
|
{% if include.projects %}
|
14
14
|
<div class="btn-group-vertical btn-group-lg mt-5 text-center" role="group">
|
@@ -27,10 +27,10 @@
|
|
27
27
|
<header class="d-flex align-items-center hero-chulapa">
|
28
28
|
{%- endif -%}
|
29
29
|
<div class="container-lg py-4">
|
30
|
-
<h1>{{- page.title | default: "Where's your title?" -}}</h1>
|
30
|
+
<h1 class="p-name">{{- page.title | default: "Where's your title?" -}}</h1>
|
31
31
|
{%- if page.subtitle -%}
|
32
32
|
<hr class="my-3">
|
33
|
-
<p class="chulapa-subtitle">{{- page.subtitle -}}</p>
|
33
|
+
<p class="chulapa-subtitle p-summary">{{- page.subtitle -}}</p>
|
34
34
|
{%- endif -%}
|
35
35
|
{% if include.projects %}
|
36
36
|
<div class="btn-group-vertical btn-group-lg mt-2 text-center" role="group">
|
@@ -51,9 +51,9 @@
|
|
51
51
|
<div class="container-lg mt-2">
|
52
52
|
<div class="row">
|
53
53
|
<div class="col-lg-8 offset-lg-2">
|
54
|
-
<h1>{{- page.title | default: "Where's your title?" -}}</h1>
|
54
|
+
<h1 class="p-name">{{- page.title | default: "Where's your title?" -}}</h1>
|
55
55
|
{%- if page.subtitle -%}
|
56
|
-
<p class="lead chulapa-subtitle">{{- page.subtitle -}}</p>
|
56
|
+
<p class="lead chulapa-subtitle p-summary">{{- page.subtitle -}}</p>
|
57
57
|
{%- endif -%}
|
58
58
|
{% if include.projects %}
|
59
59
|
<div class="btn-group btn-group-sm my-1 text-center" role="group">
|
@@ -77,9 +77,9 @@
|
|
77
77
|
<div class="container-lg mt-2">
|
78
78
|
<div class="row">
|
79
79
|
<div class="col-lg-8 offset-lg-2">
|
80
|
-
<h1>{{- page.title | default: "Where's your title?" -}}</h1>
|
80
|
+
<h1 class="p-name">{{- page.title | default: "Where's your title?" -}}</h1>
|
81
81
|
{%- if page.subtitle -%}
|
82
|
-
<p class="lead chulapa-subtitle">{{- page.subtitle -}}</p>
|
82
|
+
<p class="lead chulapa-subtitle p-summary">{{- page.subtitle -}}</p>
|
83
83
|
{%- endif -%}
|
84
84
|
{% if include.projects %}
|
85
85
|
<div class="btn-group btn-group-sm my-1 text-center" role="group">
|
@@ -102,9 +102,9 @@
|
|
102
102
|
<div class="container-lg mt-2">
|
103
103
|
<div class="row">
|
104
104
|
<div class="col-lg-8 offset-lg-2">
|
105
|
-
<h1>{{- page.title | default: "Where's your title?" -}}</h1>
|
105
|
+
<h1 class="p-name">{{- page.title | default: "Where's your title?" -}}</h1>
|
106
106
|
{%- if page.subtitle -%}
|
107
|
-
<p class="lead chulapa-subtitle">{{- page.subtitle -}}</p>
|
107
|
+
<p class="lead chulapa-subtitle p-summary">{{- page.subtitle -}}</p>
|
108
108
|
{%- endif -%}
|
109
109
|
{% if include.projects %}
|
110
110
|
<div class="btn-group btn-group-sm my-1 text-center" role="group">
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{%- assign alldocs = include.cacheddocs -%}
|
2
2
|
{% for post in alldocs limit: include.cachedlimit %}
|
3
3
|
<div class="col-12 mb-2">
|
4
|
-
<div class="card border-
|
4
|
+
<div class="card chulapa-border-card-index">
|
5
5
|
<div class="row g-0">
|
6
6
|
<a href="{{- post.url | absolute_url -}}" class="col-sm-1 chulapa-min-h-10 chulapa-card-img chulapa-overlay-img chulapa-gradient {% if post.header_img == nil or post.og_image -%} d-none d-sm-flex {% endif %} "
|
7
7
|
{% if post.header_img or post.og_image -%} style="background-image: url('{{- post.og_image | default: post.header_img | absolute_url -}}')"{%-endif-%}>
|
@@ -6,16 +6,35 @@
|
|
6
6
|
{%- if page.previous.url -%}
|
7
7
|
{%- assign classitemprevious = "" -%}
|
8
8
|
{%- endif -%}
|
9
|
+
{%- assign titleitemprevious = page.previous.title | strip_html | truncate: 30 -%}
|
10
|
+
{%- assign titleitemnext = page.next.title | strip_html | truncate: 30 -%}
|
11
|
+
|
12
|
+
|
9
13
|
|
10
14
|
<nav aria-label="Navigation" class="container-lg chulapa-pagination ">
|
11
15
|
<ul class="col-lg-8 offset-lg-2 pagination chulapa-pagination-round px-0 ">
|
12
|
-
<li class="page-item text-left mr-
|
13
|
-
<a class="page-link border-0 px-4" href="{{ page.previous.url | absolute_url }}" tabindex="-1">
|
16
|
+
<li class="page-item text-left mr-0 {{ classitemprevious -}}">
|
17
|
+
<a class="page-link border-0 px-4" href="{{ page.previous.url | absolute_url | default: "#" }}" tabindex="-1">
|
14
18
|
<i class="fa fa-chevron-left" aria-hidden="true"></i><span class="sr-only">Previous</span>
|
15
19
|
</a>
|
16
20
|
</li>
|
17
|
-
<li class="page-item text-
|
18
|
-
<
|
21
|
+
<li class="page-item border-0 disabled text-left ml-0 mr-auto d-none d-md-inline {{ classitemprevious -}}">
|
22
|
+
<p class="page-link chulapa-label">{{ titleitemprevious }}</p>
|
23
|
+
</li>
|
24
|
+
<li class="page-item border-0 disabled text-left ml-0 mr-auto d-none d-sm-inline d-md-none {{ classitemprevious -}}">
|
25
|
+
<p class="page-link chulapa-label">{{ titleitemprevious | truncate: 17 }}</p>
|
26
|
+
</li>
|
27
|
+
<li class="page-item disabled mx-auto invisible">
|
28
|
+
<p class="page-link">|</p>
|
29
|
+
</li>
|
30
|
+
<li class="page-item border-0 disabled text-right mr-0 ml-auto d-none d-sm-inline d-md-none {{ classitemnext -}}">
|
31
|
+
<p class="page-link chulapa-label">{{ titleitemnext | truncate: 17 }}</p>
|
32
|
+
</li>
|
33
|
+
<li class="page-item border-0 disabled text-right mr-0 ml-auto d-none d-md-inline {{ classitemnext -}}">
|
34
|
+
<p class="page-link chulapa-label">{{ titleitemnext }}</p>
|
35
|
+
</li>
|
36
|
+
<li class="page-item text-right ml-0 {{ classitemnext -}}">
|
37
|
+
<a class="page-link border-0 px-4" href="{{ page.next.url | absolute_url | default: "#" }}">
|
19
38
|
<i class="fa fa-chevron-right" aria-hidden="true"></i><span class="sr-only">Next</span></a>
|
20
39
|
</li>
|
21
40
|
</ul>
|
@@ -0,0 +1,72 @@
|
|
1
|
+
|
2
|
+
{%- if page.tags -%}
|
3
|
+
{%- assign alldocs = site.documents | where_exp: "item", "item.url != page.url" -%}
|
4
|
+
|
5
|
+
|
6
|
+
{%- for tag in page.tags %}
|
7
|
+
{%- if forloop.first -%}
|
8
|
+
{%- assign relateddocs = alldocs |
|
9
|
+
where_exp: "item", "item.tags contains tag" | map: 'id' | join: ',' | split: ',' -%}
|
10
|
+
|
11
|
+
{%- else -%}
|
12
|
+
{%- assign docloop = alldocs |
|
13
|
+
where_exp: "item", "item.tags contains tag" | map: 'id' | join: ',' | split: ',' -%}
|
14
|
+
{%- assign relateddocs = relateddocs | concat: docloop %}
|
15
|
+
{%- endif -%}
|
16
|
+
{%- endfor -%}
|
17
|
+
|
18
|
+
{%- assign thiscol = alldocs | where_exp: "item", "item.collection == page.collection" | map: 'id' | join: ',' | split: ',' -%}
|
19
|
+
|
20
|
+
{%- assign groupurl = relateddocs | concat: thiscol | group_by: id | sort: 'size' | reverse -%}
|
21
|
+
|
22
|
+
{% assign groupurl = groupurl | where_exp: "item", "item.size > 2" -%}
|
23
|
+
|
24
|
+
|
25
|
+
{% for id in groupurl limit:3 %}
|
26
|
+
{%- if forloop.first -%}
|
27
|
+
{% assign reldoc = alldocs | where_exp: "item", "item.id == id.name" %}
|
28
|
+
{%- else -%}
|
29
|
+
{%- assign relloop = alldocs |
|
30
|
+
where_exp: "item", "item.id == id.name" -%}
|
31
|
+
{% assign reldoc = reldoc | concat: relloop %}
|
32
|
+
{% endif %}
|
33
|
+
{% endfor %}
|
34
|
+
|
35
|
+
{%- if reldoc -%}
|
36
|
+
{% for document in reldoc %}
|
37
|
+
{% assign m = "ml-sm-1" %}
|
38
|
+
|
39
|
+
{%- if forloop.first -%}
|
40
|
+
{% assign m = "" %}
|
41
|
+
<div class="container-lg mt-1 mb-2">
|
42
|
+
<div class="row">
|
43
|
+
<div class="col-lg-8 offset-lg-2">
|
44
|
+
<hr>
|
45
|
+
<p><i class="fa-solid fa-shuffle fa-xl"></i><span class="sr-only">Related</span></p>
|
46
|
+
<nav class="card-group" aria-label="related-articles">
|
47
|
+
{%- endif %}
|
48
|
+
<div class="card {{ m }} border chulapa-related">
|
49
|
+
<div class="card-body">
|
50
|
+
<p class="card-title chulapa-headingfont"><a href="{{ document.url | absolute_url }}" class="chulapa-text-body-color">{{ document.title }}</a></p>
|
51
|
+
{% if document.subtitle %}<p class="card-text"><small>{{- document.subtitle -}}</small></p> {%- endif -%}
|
52
|
+
</div>
|
53
|
+
<div class="card-footer bg-transparent">
|
54
|
+
{% if document.date %}
|
55
|
+
{% assign dateformat = document.date | date: "%B %d, %Y" %}
|
56
|
+
<small><i class="far fa-calendar" aria-hidden="true"></i> <time datetime="{{- document.date | date_to_xmlschema -}}">{% include_cached snippets/datetranslate.html date=dateformat %}</time></small>
|
57
|
+
{% else %}
|
58
|
+
<small>-</small>
|
59
|
+
{% endif %}
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
{%- if forloop.last -%}
|
63
|
+
</nav>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
</div>
|
67
|
+
{%- endif -%}
|
68
|
+
{%- endfor -%}
|
69
|
+
{%- endif -%}
|
70
|
+
{%- endif -%}
|
71
|
+
|
72
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{% assign h_min = page.h_min | default: 2 %}
|
2
|
+
{% assign h_max = page.h_max | default: 4 %}
|
3
|
+
<button class="btn btn-primary btn-sm rounded-right position-fixed chulapa-btn-sidebar bs-canvas-anim chulapa-btn-nofocus chulapa-fa-static" id='demo' onclick="openSideBar()" aria-label="Open Sidebar" aria-expanded="false" aria-controls="sideBar">
|
4
|
+
<i class="fa-solid fa-plus"></i><span class="sr-only">Open Sidebar</span>
|
5
|
+
</button>
|
6
|
+
<div class="bs-canvas bs-canvas-anim bs-canvas-left position-fixed navbar-chulapa h-100" id='sideBar'>
|
7
|
+
<p class="pt-2 pb-1 px-3">
|
8
|
+
<button type="button" class="navbar-text close chulapa-btn-nofocus chulapa-fa-static" aria-label="Close" onclick="closeSideBar()">
|
9
|
+
<i class="fa-solid fa-times"></i><span class="sr-only">Close Sidebar</span>
|
10
|
+
</button>
|
11
|
+
</p>
|
12
|
+
<nav class="navbar-nav px-3 my-auto"> <p class="mb-2" ><a class="nav-link font-weight-bold lead" href="#">{{ page.title }}</a></p>
|
13
|
+
{% include components/toc.html sanitize=false html=content h_min=h_min h_max=h_max skip_no_ids=true id="sidetoc" class="nav.flex-column" item_class="nav-item.nav.d-block" anchor_class="nav-link" %}
|
14
|
+
</nav>
|
15
|
+
</div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
{%- for tag in page.tags %}
|
8
8
|
<a href="{{- tag | replace: " ", "-" | prepend: "#" |
|
9
9
|
prepend: page.cloudtag_url |
|
10
|
-
absolute_url | uri_escape -}}" class="badge chulapa-pill-bg-primary">{{- tag -}}</a>
|
10
|
+
absolute_url | uri_escape -}}" class="badge chulapa-pill-bg-primary p-category" rel="tag" >{{- tag -}}</a>
|
11
11
|
{% endfor -%}
|
12
12
|
</div>
|
13
13
|
</div>
|
@@ -1,6 +1,30 @@
|
|
1
1
|
{% capture tocWorkspace %}
|
2
2
|
{% comment %}
|
3
|
-
|
3
|
+
Copyright (c) 2017 Vladimir "allejo" Jimenez
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person
|
6
|
+
obtaining a copy of this software and associated documentation
|
7
|
+
files (the "Software"), to deal in the Software without
|
8
|
+
restriction, including without limitation the rights to use,
|
9
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the
|
11
|
+
Software is furnished to do so, subject to the following
|
12
|
+
conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be
|
15
|
+
included in all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
19
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
21
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
22
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
23
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
24
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
25
|
+
{% endcomment %}
|
26
|
+
{% comment %}
|
27
|
+
Version 1.2.0
|
4
28
|
https://github.com/allejo/jekyll-toc
|
5
29
|
|
6
30
|
"...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
|
@@ -12,46 +36,59 @@
|
|
12
36
|
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
|
13
37
|
|
14
38
|
Optional Parameters:
|
15
|
-
* sanitize
|
16
|
-
* class
|
17
|
-
* id
|
18
|
-
* h_min
|
19
|
-
* h_max
|
20
|
-
* ordered
|
21
|
-
* item_class
|
22
|
-
*
|
23
|
-
*
|
24
|
-
*
|
39
|
+
* sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
|
40
|
+
* class (string) : '' - a CSS class assigned to the TOC
|
41
|
+
* id (string) : '' - an ID to assigned to the TOC
|
42
|
+
* h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
|
43
|
+
* h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
|
44
|
+
* ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
|
45
|
+
* item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
|
46
|
+
* submenu_class (string) : '' - add custom class(es) for each child group of headings; has support for '%level%' placeholder which is the current "submenu" heading level
|
47
|
+
* base_url (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
|
48
|
+
* anchor_class (string) : '' - add custom class(es) for each anchor element
|
49
|
+
* skip_no_ids (bool) : false - skip headers that do not have an `id` attribute
|
25
50
|
|
26
51
|
Output:
|
27
52
|
An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
|
28
53
|
generate the table of contents and will NOT output the markdown given to it
|
29
54
|
{% endcomment %}
|
30
55
|
|
31
|
-
{% capture
|
56
|
+
{% capture newline %}
|
57
|
+
{% endcapture %}
|
58
|
+
{% assign newline = newline | rstrip %} <!-- Remove the extra spacing but preserve the newline -->
|
59
|
+
|
60
|
+
{% capture deprecation_warnings %}{% endcapture %}
|
61
|
+
|
62
|
+
{% if include.baseurl %}
|
63
|
+
{% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "baseurl" has been deprecated, use "base_url" instead -->{{ newline }}{% endcapture %}
|
64
|
+
{% endif %}
|
65
|
+
|
66
|
+
{% if include.skipNoIDs %}
|
67
|
+
{% capture deprecation_warnings %}{{ deprecation_warnings }}<!-- jekyll-toc :: "skipNoIDs" has been deprecated, use "skip_no_ids" instead -->{{ newline }}{% endcapture %}
|
68
|
+
{% endif %}
|
69
|
+
|
70
|
+
{% capture jekyll_toc %}{% endcapture %}
|
32
71
|
{% assign orderedList = include.ordered | default: false %}
|
33
|
-
{% assign
|
72
|
+
{% assign baseURL = include.base_url | default: include.baseurl | default: '' %}
|
73
|
+
{% assign skipNoIDs = include.skip_no_ids | default: include.skipNoIDs | default: false %}
|
34
74
|
{% assign minHeader = include.h_min | default: 1 %}
|
35
75
|
{% assign maxHeader = include.h_max | default: 6 %}
|
36
|
-
{% assign nodes = include.html | split: '<h' %}
|
76
|
+
{% assign nodes = include.html | strip | split: '<h' %}
|
77
|
+
|
37
78
|
{% assign firstHeader = true %}
|
79
|
+
{% assign currLevel = 0 %}
|
80
|
+
{% assign lastLevel = 0 %}
|
38
81
|
|
39
|
-
{% capture listModifier %}{% if orderedList %}
|
82
|
+
{% capture listModifier %}{% if orderedList %}ol{% else %}ul{% endif %}{% endcapture %}
|
40
83
|
|
41
84
|
{% for node in nodes %}
|
42
85
|
{% if node == "" %}
|
43
86
|
{% continue %}
|
44
87
|
{% endif %}
|
45
88
|
|
46
|
-
{%
|
47
|
-
{% unless node contains "id=" %}
|
48
|
-
{% continue %}
|
49
|
-
{% endunless %}
|
50
|
-
{% endif %}
|
51
|
-
|
52
|
-
{% assign headerLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
|
89
|
+
{% assign currLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
|
53
90
|
|
54
|
-
{% if
|
91
|
+
{% if currLevel < minHeader or currLevel > maxHeader %}
|
55
92
|
{% continue %}
|
56
93
|
{% endif %}
|
57
94
|
|
@@ -59,54 +96,87 @@
|
|
59
96
|
|
60
97
|
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
|
61
98
|
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
|
62
|
-
{% assign
|
99
|
+
{% assign htmlID = _idWorkspace[0] %}
|
63
100
|
|
64
101
|
{% assign _classWorkspace = _workspace[0] | split: 'class="' %}
|
65
102
|
{% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
|
66
|
-
{% assign
|
103
|
+
{% assign htmlClass = _classWorkspace[0] %}
|
67
104
|
|
68
|
-
{% if
|
105
|
+
{% if htmlClass contains "no_toc" %}
|
69
106
|
{% continue %}
|
70
107
|
{% endif %}
|
71
108
|
|
72
109
|
{% if firstHeader %}
|
73
|
-
{% assign
|
74
|
-
{% assign minHeader = headerLevel %}
|
110
|
+
{% assign minHeader = currLevel %}
|
75
111
|
{% endif %}
|
76
112
|
|
77
113
|
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
|
78
114
|
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
|
79
115
|
|
80
|
-
{% assign indentAmount = headerLevel | minus: minHeader %}
|
81
|
-
{% assign space = '' %}
|
82
|
-
{% for i in (1..indentAmount) %}
|
83
|
-
{% assign space = space | prepend: ' ' %}
|
84
|
-
{% endfor %}
|
85
|
-
|
86
116
|
{% if include.item_class and include.item_class != blank %}
|
87
|
-
{% capture listItemClass %}{
|
117
|
+
{% capture listItemClass %} class="{{ include.item_class | replace: '%level%', currLevel | split: '.' | join: ' ' }}"{% endcapture %}
|
118
|
+
{% endif %}
|
119
|
+
|
120
|
+
{% if include.submenu_class and include.submenu_class != blank %}
|
121
|
+
{% assign subMenuLevel = currLevel | minus: 1 %}
|
122
|
+
{% capture subMenuClass %} class="{{ include.submenu_class | replace: '%level%', subMenuLevel | split: '.' | join: ' ' }}"{% endcapture %}
|
123
|
+
{% endif %}
|
124
|
+
|
125
|
+
{% capture anchorBody %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
|
126
|
+
|
127
|
+
{% if htmlID %}
|
128
|
+
{% capture anchorAttributes %} href="{% if baseURL %}{{ baseURL }}{% endif %}#{{ htmlID }}"{% endcapture %}
|
129
|
+
|
130
|
+
{% if include.anchor_class %}
|
131
|
+
{% capture anchorAttributes %}{{ anchorAttributes }} class="{{ include.anchor_class | split: '.' | join: ' ' }}"{% endcapture %}
|
132
|
+
{% endif %}
|
133
|
+
|
134
|
+
{% capture listItem %}<a{{ anchorAttributes }}>{{ anchorBody }}</a>{% endcapture %}
|
135
|
+
{% elsif skipNoIDs == true %}
|
136
|
+
{% continue %}
|
137
|
+
{% else %}
|
138
|
+
{% capture listItem %}{{ anchorBody }}{% endcapture %}
|
88
139
|
{% endif %}
|
89
140
|
|
90
|
-
{%
|
91
|
-
|
141
|
+
{% if currLevel > lastLevel %}
|
142
|
+
{% capture jekyll_toc %}{{ jekyll_toc }}<{{ listModifier }}{{ subMenuClass }}>{% endcapture %}
|
143
|
+
{% elsif currLevel < lastLevel %}
|
144
|
+
{% assign repeatCount = lastLevel | minus: currLevel %}
|
92
145
|
|
93
|
-
|
94
|
-
|
146
|
+
{% for i in (1..repeatCount) %}
|
147
|
+
{% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
|
148
|
+
{% endfor %}
|
149
|
+
|
150
|
+
{% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
|
95
151
|
{% else %}
|
96
|
-
{% capture
|
152
|
+
{% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
|
97
153
|
{% endif %}
|
98
154
|
|
99
|
-
{% capture
|
100
|
-
|
155
|
+
{% capture jekyll_toc %}{{ jekyll_toc }}<li{{ listItemClass }}>{{ listItem }}{% endcapture %}
|
156
|
+
|
157
|
+
{% assign lastLevel = currLevel %}
|
158
|
+
{% assign firstHeader = false %}
|
101
159
|
{% endfor %}
|
102
160
|
|
103
|
-
{%
|
104
|
-
|
105
|
-
{
|
106
|
-
|
161
|
+
{% assign repeatCount = minHeader | minus: 1 %}
|
162
|
+
{% assign repeatCount = lastLevel | minus: repeatCount %}
|
163
|
+
{% for i in (1..repeatCount) %}
|
164
|
+
{% capture jekyll_toc %}{{ jekyll_toc }}</li></{{ listModifier }}>{% endcapture %}
|
165
|
+
{% endfor %}
|
166
|
+
|
167
|
+
{% if jekyll_toc != '' %}
|
168
|
+
{% assign rootAttributes = '' %}
|
169
|
+
{% if include.class and include.class != blank %}
|
170
|
+
{% capture rootAttributes %} class="{{ include.class | split: '.' | join: ' ' }}"{% endcapture %}
|
171
|
+
{% endif %}
|
107
172
|
|
108
|
-
|
109
|
-
|
110
|
-
{
|
173
|
+
{% if include.id and include.id != blank %}
|
174
|
+
{% capture rootAttributes %}{{ rootAttributes }} id="{{ include.id }}"{% endcapture %}
|
175
|
+
{% endif %}
|
176
|
+
|
177
|
+
{% if rootAttributes %}
|
178
|
+
{% assign nodes = jekyll_toc | split: '>' %}
|
179
|
+
{% capture jekyll_toc %}<{{ listModifier }}{{ rootAttributes }}>{{ nodes | shift | join: '>' }}>{% endcapture %}
|
180
|
+
{% endif %}
|
111
181
|
{% endif %}
|
112
|
-
{% endcapture %}{% assign tocWorkspace = '' %}{{
|
182
|
+
{% endcapture %}{% assign tocWorkspace = '' %}{{ deprecation_warnings }}{{ jekyll_toc -}}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{% if site.comments.website_id %}
|
2
|
+
<div class="container my-3 pb-2">
|
3
|
+
<div class="row">
|
4
|
+
<div class="col-lg-8 offset-lg-2">
|
5
|
+
{% include welcomments/comments.html website_id = site.comments.website_id %}
|
6
|
+
<p class="text-center chulapa-footer-brand mt-4">Comments thanks to <a href="https://welcomments.io/">Welcomments</a>
|
7
|
+
</div>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
{% endif %}
|
data/_includes/footer.html
CHANGED
@@ -38,22 +38,34 @@
|
|
38
38
|
{%- assign name = 'Minty' - %}
|
39
39
|
{%- assign author = 'Bootswatch' - %}
|
40
40
|
{%- assign url = 'https://bootswatch.com/' - %}
|
41
|
+
{%- elsif site.chulapa-skin.skin == 'towards' -%}
|
42
|
+
{%- assign name = 'Towards' - %}
|
43
|
+
{%- assign author = 'dieghernan' - %}
|
44
|
+
{%- assign url = 'https://github.com/dieghernan' - %}
|
41
45
|
{%- elsif site.chulapa-skin.skin == 'twitter' -%}
|
42
46
|
{%- assign name = 'Twitter' - %}
|
43
47
|
{%- assign author = 'dieghernan' - %}
|
44
48
|
{%- assign url = 'https://github.com/dieghernan' - %}
|
45
49
|
{%- elsif site.chulapa-skin.skin == 'twitter-dim' -%}
|
46
|
-
{%- assign name = '
|
50
|
+
{%- assign name = 'Twitter Dim' - %}
|
47
51
|
{%- assign author = 'dieghernan' - %}
|
48
52
|
{%- assign url = 'https://github.com/dieghernan' - %}
|
49
53
|
{%- elsif site.chulapa-skin.skin == 'twitter-lights-out' -%}
|
50
|
-
{%- assign name = '
|
54
|
+
{%- assign name = 'Twitter Lights Out' - %}
|
51
55
|
{%- assign author = 'dieghernan' - %}
|
52
56
|
{%- assign url = 'https://github.com/dieghernan' - %}
|
53
57
|
{%- elsif site.chulapa-skin.skin == 'chulapa' -%}
|
54
58
|
{%- assign name = 'Chulapa' - %}
|
55
59
|
{%- assign author = 'dieghernan' - %}
|
56
60
|
{%- assign url = 'https://github.com/dieghernan' - %}
|
61
|
+
{%- elsif site.chulapa-skin.skin == 'gitdev' -%}
|
62
|
+
{%- assign name = 'GitDev' - %}
|
63
|
+
{%- assign author = 'dieghernan' - %}
|
64
|
+
{%- assign url = 'https://github.com/dieghernan' - %}
|
65
|
+
{%- elsif site.chulapa-skin.skin == 'gitdev-dark' -%}
|
66
|
+
{%- assign name = 'GitDev Dark' - %}
|
67
|
+
{%- assign author = 'dieghernan' - %}
|
68
|
+
{%- assign url = 'https://github.com/dieghernan' - %}
|
57
69
|
{%- elsif site.chulapa-skin.skin == 'pear' -%}
|
58
70
|
{%- assign name = 'Pear' - %}
|
59
71
|
{%- assign author = 'dieghernan' - %}
|
@@ -76,6 +88,12 @@
|
|
76
88
|
{% if include.show_comments -%}
|
77
89
|
{% if site.comments.provider == 'disqus' %}
|
78
90
|
{% include components/disqus.html pageid=include.pageid pageurl=include.pageurl %}
|
91
|
+
{%- elsif site.comments.provider == 'cactus' -%}
|
92
|
+
{% include components/cactus.html pageurl=include.pageurl %}
|
93
|
+
{%- elsif site.comments.provider == 'cusdis' -%}
|
94
|
+
{% include components/cusdis.html pageid=include.pageid pageurl=include.pageurl pagetitle = include.pagetitle %}
|
95
|
+
{%- elsif site.comments.provider == 'welcomments' -%}
|
96
|
+
{% include components/welcomments.html %}
|
79
97
|
{%- elsif site.comments.provider == 'giscus' -%}
|
80
98
|
<div class="container">
|
81
99
|
<div class="row">
|
@@ -92,11 +110,14 @@
|
|
92
110
|
{%- if site.footer.links -%}
|
93
111
|
<div role="navigation" class="d-flex flex-wrap justify-content-center">
|
94
112
|
{%- for social in site.footer.links -%}
|
95
|
-
{%-
|
113
|
+
{%- assign urlslice = social.url | slice: 0,4 -%}
|
114
|
+
{%- if urlslice == "http" -%}
|
115
|
+
<a href="{{ social.url | absolute_url }}" title="footer{{ social.label }}" class="chulapa-footer-sociallink lead">
|
116
|
+
{%- elsif social.url contains "@" -%}
|
96
117
|
<a href="mailto:{{- social.url -}}?subject={{ site.title | append: ' web contact' | strip_html | uri_escape }}" title="footer{{ social.label }}" class="chulapa-footer-sociallink lead">
|
97
|
-
|
98
118
|
{%- else -%}
|
99
|
-
|
119
|
+
<a href="{{ social.url | absolute_url }}" title="footer{{ social.label }}" class="chulapa-footer-sociallink lead">
|
120
|
+
{%- endif -%}
|
100
121
|
<span class="fa-stack fa-lg" aria-hidden="true">
|
101
122
|
<i class="fa fa-circle fa-stack-2x"></i>
|
102
123
|
<i class="{{ social.icon }} fa-stack-1x fa-inverse"></i>
|
@@ -117,10 +138,7 @@
|
|
117
138
|
{%- endif -%}
|
118
139
|
</p>
|
119
140
|
<!-- Do not remove this in order to give attributions -->
|
120
|
-
{%- if name -%}
|
121
|
-
<p class="small"><b>{{- name -}}</b> skin by <a href="{{ url }}">{{ author }}</a></p>
|
122
|
-
{%- endif -%}
|
123
|
-
<p class="small">Powered by <a href="https://dieghernan.github.io/chulapa"> <span class="chulapa">Chulapa</span> Jekyll Theme</a></p>
|
141
|
+
<p class="chulapa-footer-brand">Powered by <a href="https://dieghernan.github.io/chulapa"> <span class="chulapa">Chulapa</span> Jekyll Theme</a>{%- if name -%}<br><b>{{- name -}}</b> skin by <a href="{{ url }}">{{ author }}</a>{%- endif -%}</p>
|
124
142
|
<!-- End attributions -->
|
125
143
|
</div>
|
126
144
|
</div>
|