chulapa-jekyll 1.0.1 → 2.0.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.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +68 -9
  3. data/README.md +106 -66
  4. data/_data/version.yml +2 -0
  5. data/_data/welcomments/01_install/01H35P308R2G2YMW849CK7V1VP.json +9 -0
  6. data/_data/welcomments/02_config/01GMBNMYVQS6NCQ45S7KP1TK80.json +10 -0
  7. data/_data/welcomments/02_config/01GMBNP7RB0CBQNKKXKWG5CHJN.json +10 -0
  8. data/_data/welcomments/02_config/01GMBNX1CNV06WN12XR72CNN8D.json +11 -0
  9. data/_data/welcomments/02_config/01GME95BGP5HDQWAWFXT49FDB5.json +10 -0
  10. data/_data/welcomments/02_config/01GME9BZ4N0K0RT3WEPM397VP1.json +10 -0
  11. data/_data/welcomments/02_config/01HAH50GMY2SEESXQNR9D3V44R.json +9 -0
  12. data/_data/welcomments/welcome/01GMDMF77D4VZ7VQX9JAK0RMT5.json +10 -0
  13. data/_data/welcomments/welcome/01H1QVV3C210ND4XY30H0BZHQP.json +9 -0
  14. data/_includes/components/author.html +12 -7
  15. data/_includes/components/breadcrumbdatesocial.html +27 -12
  16. data/_includes/components/cactus.html +18 -0
  17. data/_includes/components/categories.html +1 -1
  18. data/_includes/components/cusdis.html +18 -0
  19. data/_includes/components/disqus.html +1 -1
  20. data/_includes/components/headers.html +10 -10
  21. data/_includes/components/indexcards.html +1 -1
  22. data/_includes/components/navbeforeafter.html +23 -4
  23. data/_includes/components/related.html +72 -0
  24. data/_includes/components/sidetoc.html +15 -0
  25. data/_includes/components/tags.html +1 -1
  26. data/_includes/components/toc.html +120 -50
  27. data/_includes/components/welcomments.html +10 -0
  28. data/_includes/footer.html +63 -17
  29. data/_includes/head.html +41 -31
  30. data/_includes/navbar.html +4 -4
  31. data/_includes/snippets/bootstrapdemo.html +3 -0
  32. data/_includes/snippets/carousel.html +3 -3
  33. data/_includes/snippets/masonry.html +3 -1
  34. data/_includes/snippets/video.html +20 -10
  35. data/_includes/snippets/youtube.html +10 -1
  36. data/_includes/welcomments/comment_form.html +26 -0
  37. data/_includes/welcomments/comments.html +109 -0
  38. data/_includes/welcomments/single_comment.html +57 -0
  39. data/_includes/welcomments/template.html +46 -0
  40. data/_layouts/cloudcategory.html +4 -4
  41. data/_layouts/cloudcategory2.html +89 -0
  42. data/_layouts/cloudtag2.html +86 -0
  43. data/_layouts/compress.html +2 -2
  44. data/_layouts/default.html +17 -3
  45. data/_layouts/landingpage.html +21 -3
  46. data/_layouts/minimal.html +5 -6
  47. data/_layouts/search.html +8 -7
  48. data/_sass/chulapa/_classes.scss +1270 -0
  49. data/_sass/{chulapa-misc.scss → chulapa/_reboot.scss} +24 -4
  50. data/_sass/{chulapa-vars.scss → chulapa/_variables.scss} +25 -5
  51. data/_sass/chulapa-master.scss +5 -5
  52. data/_sass/highlight/monokai.scss +1 -1
  53. data/_sass/reset-algolia.scss +1 -1
  54. data/_sass/skins/academia.scss +24 -18
  55. data/_sass/skins/auto.scss +2 -1
  56. data/_sass/skins/chulapa.scss +14 -12
  57. data/_sass/skins/dark-bg.scss +62 -0
  58. data/_sass/skins/deeply.scss +4 -3
  59. data/_sass/skins/electro.scss +20 -0
  60. data/_sass/skins/focal.scss +52 -0
  61. data/_sass/skins/gitdev-dark.scss +97 -0
  62. data/_sass/skins/gitdev.scss +86 -0
  63. data/_sass/skins/graymor.scss +17 -18
  64. data/_sass/skins/hootstrap.scss +12 -12
  65. data/_sass/skins/journal.scss +6 -5
  66. data/_sass/skins/lux.scss +9 -10
  67. data/_sass/skins/lymcha.scss +10 -10
  68. data/_sass/skins/media.scss +54 -0
  69. data/_sass/skins/mickie.scss +13 -0
  70. data/_sass/skins/minco.scss +12 -0
  71. data/_sass/skins/minty.scss +14 -11
  72. data/_sass/skins/monotone.scss +14 -0
  73. data/_sass/skins/pear.scss +19 -20
  74. data/_sass/skins/preptor.scss +13 -14
  75. data/_sass/skins/skeeblu.scss +20 -0
  76. data/_sass/skins/sketchy.scss +5 -4
  77. data/_sass/skins/sunset.scss +10 -10
  78. data/_sass/skins/towards.scss +21 -0
  79. data/_sass/skins/twitter-dim.scss +38 -28
  80. data/_sass/skins/twitter-lights-out.scss +38 -30
  81. data/_sass/skins/twitter.scss +25 -25
  82. data/_sass/skins/universal.scss +79 -21
  83. data/_sass/skins/wandoo.scss +12 -13
  84. data/assets/css/main.scss +1 -1
  85. data/assets/css/welcomments.scss +572 -0
  86. data/assets/fonts/Hubot-Sans/Hubot-Sans.woff2 +0 -0
  87. data/assets/fonts/Hubot-Sans/LICENSE.txt +93 -0
  88. data/assets/fonts/Mona-Sans/LICENSE.txt +93 -0
  89. data/assets/fonts/Mona-Sans/Mona-Sans.woff2 +0 -0
  90. data/assets/js/ch_ytdefer/ch_ytdefer.js +3 -1
  91. data/assets/js/chulapa_script.js +175 -0
  92. data/assets/js/clipboard/chulapa_clipboard.js +109 -0
  93. data/assets/js/cusdis/chulapa_cusdis.js +1 -0
  94. data/assets/js/google/google-search.js +0 -1
  95. metadata +75 -15
  96. data/_sass/chulapa-classes.scss +0 -844
  97. data/assets/fonts/Chulapa/Chulapa-Bold.otf +0 -0
  98. data/assets/fonts/Chulapa/Chulapa-Bold_v2.1.otf +0 -0
  99. data/assets/fonts/Chulapa/Chulapa-Bold_v2.2.otf +0 -0
  100. data/assets/fonts/Chulapa/Chulapa-Bold_v2.otf +0 -0
  101. data/assets/fonts/Chulapa/Chulapa-Light.otf +0 -0
  102. data/assets/fonts/Chulapa/Chulapa-Regular.otf +0 -0
  103. data/assets/js/ch_ytdefer/ch_ytdefer.min.js +0 -1
  104. data/assets/js/clipboardrouge.js +0 -95
  105. /data/_sass/{bootstrapv5-migration.scss → chulapa/_bootstrapv5.scss} +0 -0
  106. /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 %}
@@ -1,5 +1,5 @@
1
1
  {% if site.comments.disqus_shortname %}
2
- <div class="container-lg">
2
+ <div class="container">
3
3
  <div class="row">
4
4
  <div id="disqus_thread" class="col-lg-8 offset-lg-2"></div>
5
5
  <script>
@@ -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-primary ">
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-auto {{ classitemprevious -}}">
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-right ml-auto {{ classitemnext -}}">
18
- <a class="page-link border-0 px-4" href="{{ page.next.url | absolute_url }}">
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
- Version 1.0.12
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 (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
16
- * class (string) : '' - a CSS class assigned to the TOC
17
- * id (string) : '' - an ID to assigned to the TOC
18
- * h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
19
- * h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
20
- * ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
21
- * item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
22
- * baseurl (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
23
- * anchor_class (string) : '' - add custom class(es) for each anchor element
24
- * skipNoIDs (bool) : false - skip headers that do not have an `id` attribute
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 my_toc %}{% endcapture %}
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 skipNoIDs = include.skipNoIDs | default: false %}
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 %}1.{% else %}-{% endif %}{% endcapture %}
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
- {% if skipNoIDs == true %}
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 headerLevel < minHeader or headerLevel > maxHeader %}
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 html_id = _idWorkspace[0] %}
99
+ {% assign htmlID = _idWorkspace[0] %}
63
100
 
64
101
  {% assign _classWorkspace = _workspace[0] | split: 'class="' %}
65
102
  {% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
66
- {% assign html_class = _classWorkspace[0] %}
103
+ {% assign htmlClass = _classWorkspace[0] %}
67
104
 
68
- {% if html_class contains "no_toc" %}
105
+ {% if htmlClass contains "no_toc" %}
69
106
  {% continue %}
70
107
  {% endif %}
71
108
 
72
109
  {% if firstHeader %}
73
- {% assign firstHeader = false %}
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 %}{:.{{ include.item_class | replace: '%level%', headerLevel }}}{% endcapture %}
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
- {% capture anchor_body %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
91
- {% capture anchor_body %}{{ anchor_body | replace: "|", "\|" }}{% endcapture %}
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
- {% if html_id %}
94
- {% capture list_item %}[{{ anchor_body }}]({% if include.baseurl %}{{ include.baseurl }}{% endif %}#{{ html_id }}){% endcapture %}
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 list_item %}{{ anchor_body }}{% endcapture %}
152
+ {% capture jekyll_toc %}{{ jekyll_toc }}</li>{% endcapture %}
97
153
  {% endif %}
98
154
 
99
- {% capture my_toc %}{{ my_toc }}
100
- {{ space }}{{ listModifier }} {{ listItemClass }} {{ list_item }}{% if include.anchor_class %}{:.{{ include.anchor_class }}}{% endif %}{% endcapture %}
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
- {% if include.class and include.class != blank %}
104
- {% capture my_toc %}{:.{{ include.class }}}
105
- {{ my_toc | lstrip }}{% endcapture %}
106
- {% endif %}
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
- {% if include.id %}
109
- {% capture my_toc %}{: #{{ include.id }}}
110
- {{ my_toc | lstrip }}{% endcapture %}
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 = '' %}{{ my_toc | markdownify | strip }}
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 %}
@@ -18,10 +18,22 @@
18
18
  {%- assign name = 'Graymor' - %}
19
19
  {%- assign author = 'Tophat' - %}
20
20
  {%- assign url = 'https://themesguide.github.io/top-hat/dist/' - %}
21
+ {%- elsif site.chulapa-skin.skin == 'electro' -%}
22
+ {%- assign name = 'Electro' - %}
23
+ {%- assign author = 'Tophat' - %}
24
+ {%- assign url = 'https://themesguide.github.io/top-hat/dist/' - %}
21
25
  {%- elsif site.chulapa-skin.skin == 'wandoo' -%}
22
26
  {%- assign name = 'Wandoo' - %}
23
27
  {%- assign author = 'Tophat' - %}
24
28
  {%- assign url = 'https://themesguide.github.io/top-hat/dist/' - %}
29
+ {%- elsif site.chulapa-skin.skin == 'skeeblu' -%}
30
+ {%- assign name = 'Skeeblu' - %}
31
+ {%- assign author = 'Tophat' - %}
32
+ {%- assign url = 'https://themesguide.github.io/top-hat/dist/' - %}
33
+ {%- elsif site.chulapa-skin.skin == 'mickie' -%}
34
+ {%- assign name = 'Mickie' - %}
35
+ {%- assign author = 'Tophat' - %}
36
+ {%- assign url = 'https://themesguide.github.io/top-hat/dist/' - %}
25
37
  {%- elsif site.chulapa-skin.skin == 'sketchy' -%}
26
38
  {%- assign name = 'Sketchy' - %}
27
39
  {%- assign author = 'Bootswatch' - %}
@@ -38,22 +50,34 @@
38
50
  {%- assign name = 'Minty' - %}
39
51
  {%- assign author = 'Bootswatch' - %}
40
52
  {%- assign url = 'https://bootswatch.com/' - %}
53
+ {%- elsif site.chulapa-skin.skin == 'towards' -%}
54
+ {%- assign name = 'Towards' - %}
55
+ {%- assign author = 'dieghernan' - %}
56
+ {%- assign url = 'https://github.com/dieghernan' - %}
41
57
  {%- elsif site.chulapa-skin.skin == 'twitter' -%}
42
58
  {%- assign name = 'Twitter' - %}
43
59
  {%- assign author = 'dieghernan' - %}
44
60
  {%- assign url = 'https://github.com/dieghernan' - %}
45
61
  {%- elsif site.chulapa-skin.skin == 'twitter-dim' -%}
46
- {%- assign name = 'TwitterDim' - %}
62
+ {%- assign name = 'Twitter Dim' - %}
47
63
  {%- assign author = 'dieghernan' - %}
48
64
  {%- assign url = 'https://github.com/dieghernan' - %}
49
65
  {%- elsif site.chulapa-skin.skin == 'twitter-lights-out' -%}
50
- {%- assign name = 'TwitterLightsOut' - %}
66
+ {%- assign name = 'Twitter Lights Out' - %}
51
67
  {%- assign author = 'dieghernan' - %}
52
68
  {%- assign url = 'https://github.com/dieghernan' - %}
53
69
  {%- elsif site.chulapa-skin.skin == 'chulapa' -%}
54
70
  {%- assign name = 'Chulapa' - %}
55
71
  {%- assign author = 'dieghernan' - %}
56
72
  {%- assign url = 'https://github.com/dieghernan' - %}
73
+ {%- elsif site.chulapa-skin.skin == 'gitdev' -%}
74
+ {%- assign name = 'GitDev' - %}
75
+ {%- assign author = 'dieghernan' - %}
76
+ {%- assign url = 'https://github.com/dieghernan' - %}
77
+ {%- elsif site.chulapa-skin.skin == 'gitdev-dark' -%}
78
+ {%- assign name = 'GitDev Dark' - %}
79
+ {%- assign author = 'dieghernan' - %}
80
+ {%- assign url = 'https://github.com/dieghernan' - %}
57
81
  {%- elsif site.chulapa-skin.skin == 'pear' -%}
58
82
  {%- assign name = 'Pear' - %}
59
83
  {%- assign author = 'dieghernan' - %}
@@ -62,10 +86,26 @@
62
86
  {%- assign name = 'Academia' - %}
63
87
  {%- assign author = 'dieghernan' - %}
64
88
  {%- assign url = 'https://github.com/dieghernan' - %}
89
+ {%- elsif site.chulapa-skin.skin == 'focal' -%}
90
+ {%- assign name = 'Focal' - %}
91
+ {%- assign author = 'dieghernan' - %}
92
+ {%- assign url = 'https://github.com/dieghernan' - %}
93
+ {%- elsif site.chulapa-skin.skin == 'media' -%}
94
+ {%- assign name = 'Media' - %}
95
+ {%- assign author = 'dieghernan' - %}
96
+ {%- assign url = 'https://github.com/dieghernan' - %}
65
97
  {%- elsif site.chulapa-skin.skin == 'universal' -%}
66
98
  {%- assign name = 'Universal' - %}
67
99
  {%- assign author = 'Bootstrapious' - %}
68
- {%- assign url = 'https://bootstrapious.com/' - %}
100
+ {%- assign url = 'https://bootstrapious.com/' - %}
101
+ {%- elsif site.chulapa-skin.skin == 'monotone' -%}
102
+ {%- assign name = 'Monotone' - %}
103
+ {%- assign author = 'Tophat' - %}
104
+ {%- assign url = 'https://themesguide.github.io/top-hat/dist/' - %}
105
+ {%- elsif site.chulapa-skin.skin == 'minco' -%}
106
+ {%- assign name = 'Minco' - %}
107
+ {%- assign author = 'Tophat' - %}
108
+ {%- assign url = 'https://themesguide.github.io/top-hat/dist/' - %}
69
109
  {%- elsif site.chulapa-skin.skin == 'sunset' -%}
70
110
  {%- assign name = 'Sunset' - %}
71
111
  {%- assign author = 'Tophat' - %}
@@ -76,11 +116,17 @@
76
116
  {% if include.show_comments -%}
77
117
  {% if site.comments.provider == 'disqus' %}
78
118
  {% include components/disqus.html pageid=include.pageid pageurl=include.pageurl %}
79
- {%- elsif site.comments.provider == 'giscus' -%}
119
+ {%- elsif site.comments.provider == 'cactus' -%}
120
+ {% include components/cactus.html pageurl=include.pageurl %}
121
+ {%- elsif site.comments.provider == 'cusdis' -%}
122
+ {% include components/cusdis.html pageid=include.pageid pageurl=include.pageurl pagetitle = include.pagetitle %}
123
+ {%- elsif site.comments.provider == 'welcomments' -%}
124
+ {% include components/welcomments.html %}
125
+ {%- elsif site.comments.provider == 'giscus' -%}
80
126
  <div class="container">
81
127
  <div class="row">
82
128
  <div class="col-lg-8 offset-lg-2">
83
- {% include custom/giscus.html %}
129
+ {% include custom/giscus.html %}
84
130
  </div>
85
131
  </div>
86
132
  </div>
@@ -92,11 +138,14 @@
92
138
  {%- if site.footer.links -%}
93
139
  <div role="navigation" class="d-flex flex-wrap justify-content-center">
94
140
  {%- for social in site.footer.links -%}
95
- {%- if social.url contains "@" -%}
96
- <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
-
141
+ {%- assign urlslice = social.url | slice: 0,4 -%}
142
+ {%- if urlslice == "http" -%}
143
+ <a href="{{ social.url | absolute_url }}" title="footer{{ social.label }}" class="chulapa-footer-sociallink lead">
144
+ {%- elsif social.url contains "@" -%}
145
+ <a href="mailto:{{- social.url -}}?subject={{ site.title | append: ' web contact' | strip_html | uri_escape }}" title="footer{{ social.label }}" class="chulapa-footer-sociallink lead">
98
146
  {%- else -%}
99
- <a href="{{ social.url | absolute_url }}" title="footer{{ social.label }}" class="chulapa-footer-sociallink lead"> {%- endif -%}
147
+ <a href="{{ social.url | absolute_url }}" title="footer{{ social.label }}" class="chulapa-footer-sociallink lead">
148
+ {%- endif -%}
100
149
  <span class="fa-stack fa-lg" aria-hidden="true">
101
150
  <i class="fa fa-circle fa-stack-2x"></i>
102
151
  <i class="{{ social.icon }} fa-stack-1x fa-inverse"></i>
@@ -107,20 +156,17 @@
107
156
  {%- endif -%}
108
157
  <p class="mt-2 mb-3">
109
158
  {%- if site.footer.copyright -%}
110
-
159
+
111
160
  {{ site.footer.copyright }}
112
-
161
+
113
162
  {%- else -%}
114
-
163
+
115
164
  &copy; {{ site.time | date: '%Y' }} {{ site.author.name | default: site.github.owner_name }}
116
-
165
+
117
166
  {%- endif -%}
118
167
  </p>
119
168
  <!-- 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>
169
+ <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
170
  <!-- End attributions -->
125
171
  </div>
126
172
  </div>