chulapa-jekyll 2.0.1 → 2.2.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 (329) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +264 -35
  3. data/README.md +189 -180
  4. data/_data/version.yml +2 -2
  5. data/_includes/components/archive-documents.html +56 -0
  6. data/_includes/components/author.html +6 -1
  7. data/_includes/components/breadcrumbdatesocial.html +16 -12
  8. data/_includes/components/cactus.html +2 -1
  9. data/_includes/components/cloud-entry.html +26 -0
  10. data/_includes/components/cloud.html +66 -0
  11. data/_includes/components/collection-documents.html +17 -0
  12. data/_includes/components/footer-content.html +34 -0
  13. data/_includes/components/headers.html +22 -15
  14. data/_includes/components/indexcards.html +13 -10
  15. data/_includes/components/indexcategory-documents.html +11 -0
  16. data/_includes/components/navbar-classic.html +58 -0
  17. data/_includes/components/navbeforeafter.html +9 -6
  18. data/_includes/components/navigation-fallback.html +19 -0
  19. data/_includes/components/random.html +1 -0
  20. data/_includes/components/recommendations.html +97 -0
  21. data/_includes/components/related.html +1 -104
  22. data/_includes/components/scripts.html +9 -0
  23. data/_includes/components/sidetoc.html +5 -4
  24. data/_includes/components/simplelist.html +26 -0
  25. data/_includes/components/skin-attribution.html +169 -0
  26. data/_includes/components/theme-selector.html +14 -0
  27. data/_includes/footer.html +14 -165
  28. data/_includes/head.html +389 -242
  29. data/_includes/navbar.html +33 -77
  30. data/_includes/search/fusejs.html +20 -0
  31. data/_includes/search/google.html +3 -3
  32. data/_includes/search/lunr.html +19 -7
  33. data/_includes/search/simplesearch.html +46 -0
  34. data/_includes/snippets/article-images.html +25 -0
  35. data/_includes/snippets/bootstrapdemo.html +1472 -1303
  36. data/_includes/snippets/breadcrumb-names.html +5 -0
  37. data/_includes/snippets/canonical-url.html +17 -0
  38. data/_includes/snippets/carousel.html +16 -12
  39. data/_includes/snippets/dark-skin-enabled.html +14 -0
  40. data/_includes/snippets/datetranslate.html +7 -1
  41. data/_includes/snippets/jsonld-string.html +16 -0
  42. data/_includes/snippets/masonry.html +6 -4
  43. data/_includes/snippets/microformats-url.html +2 -0
  44. data/_includes/snippets/og-locale.html +19 -0
  45. data/_includes/snippets/page-language.html +4 -0
  46. data/_includes/snippets/publisher.html +22 -0
  47. data/_includes/snippets/video-metadata.html +15 -0
  48. data/_includes/snippets/video.html +21 -18
  49. data/_includes/snippets/youtube.html +17 -6
  50. data/_includes/theme-styles.html +201 -0
  51. data/_includes/welcomments/comment_form.html +5 -4
  52. data/_includes/welcomments/comments.html +5 -5
  53. data/_includes/welcomments/template.html +1 -1
  54. data/_layouts/archive.html +2 -75
  55. data/_layouts/cloudcategory.html +2 -101
  56. data/_layouts/cloudtag.html +2 -103
  57. data/_layouts/compress.html +1 -1
  58. data/_layouts/default.html +20 -9
  59. data/_layouts/indexcategory.html +2 -30
  60. data/_layouts/landingpage.html +12 -7
  61. data/_layouts/minimal.html +19 -9
  62. data/_layouts/search.html +17 -17
  63. data/_sass/bootstrap/_variables.scss +1 -1
  64. data/_sass/bootstrap/mixins/_badge.scss +1 -1
  65. data/_sass/chulapa/_autothemer.scss +31 -0
  66. data/_sass/chulapa/_buttons.scss +101 -0
  67. data/_sass/chulapa/_classes.scss +197 -59
  68. data/_sass/chulapa/_mixins.scss +42 -1
  69. data/_sass/chulapa/_reboot.scss +31 -0
  70. data/_sass/chulapa/_theme-selector.scss +1 -0
  71. data/_sass/chulapa/_variables.scss +8 -1
  72. data/_sass/chulapa/skins/_deeply.scss +229 -0
  73. data/_sass/chulapa/skins/_electro.scss +30 -0
  74. data/_sass/chulapa/skins/_graymor.scss +39 -0
  75. data/_sass/chulapa/skins/_hootstrap.scss +34 -0
  76. data/_sass/chulapa/skins/_lymcha.scss +27 -0
  77. data/_sass/chulapa/skins/_mickie.scss +38 -0
  78. data/_sass/chulapa/skins/_minco.scss +45 -0
  79. data/_sass/chulapa/skins/_monotone.scss +15 -0
  80. data/_sass/chulapa/skins/_preptor.scss +30 -0
  81. data/_sass/chulapa/skins/_skeeblu.scss +34 -0
  82. data/_sass/chulapa/skins/_sunset.scss +33 -0
  83. data/_sass/chulapa/skins/_wandoo.scss +22 -0
  84. data/_sass/chulapa/skins/bootswatch/_cyborg.scss +543 -0
  85. data/_sass/chulapa/skins/bootswatch/_darkly.scss +452 -0
  86. data/_sass/chulapa/skins/bootswatch/_flatly.scss +415 -0
  87. data/_sass/chulapa/skins/bootswatch/_journal.scss +163 -0
  88. data/_sass/chulapa/skins/bootswatch/_lux.scss +342 -0
  89. data/_sass/chulapa/skins/bootswatch/_materia.scss +914 -0
  90. data/_sass/chulapa/skins/bootswatch/_minty.scss +342 -0
  91. data/_sass/chulapa/skins/bootswatch/_sketchy.scss +757 -0
  92. data/_sass/chulapa/skins/bootswatch/_slate.scss +746 -0
  93. data/_sass/chulapa/skins/bootswatch/_solar.scss +454 -0
  94. data/_sass/chulapa/skins/bootswatch/_united.scss +85 -0
  95. data/_sass/chulapa/skins/bootswatch/_yeti.scss +699 -0
  96. data/_sass/chulapa/skins/bootswatch/cyborg.patch +301 -0
  97. data/_sass/chulapa/skins/bootswatch/darkly.patch +493 -0
  98. data/_sass/chulapa/skins/bootswatch/flatly.patch +325 -0
  99. data/_sass/chulapa/skins/bootswatch/journal.patch +71 -0
  100. data/_sass/chulapa/skins/bootswatch/lux.patch +97 -0
  101. data/_sass/chulapa/skins/bootswatch/materia.patch +250 -0
  102. data/_sass/chulapa/skins/bootswatch/minty.patch +400 -0
  103. data/_sass/chulapa/skins/bootswatch/sketchy.patch +863 -0
  104. data/_sass/chulapa/skins/bootswatch/slate.patch +537 -0
  105. data/_sass/chulapa/skins/bootswatch/solar.patch +307 -0
  106. data/_sass/chulapa/skins/bootswatch/united.patch +91 -0
  107. data/_sass/chulapa/skins/bootswatch/yeti.patch +552 -0
  108. data/_sass/chulapa-master.scss +10 -0
  109. data/_sass/highlight/README.md +176 -14
  110. data/_sass/highlight/abap.scss +62 -0
  111. data/_sass/highlight/algol.scss +46 -0
  112. data/_sass/highlight/algol_nu.scss +46 -0
  113. data/_sass/highlight/arduino.scss +63 -0
  114. data/_sass/highlight/autumn.scss +69 -58
  115. data/_sass/highlight/base16.scss +90 -0
  116. data/_sass/highlight/borland.scss +55 -46
  117. data/_sass/highlight/bw.scss +70 -34
  118. data/_sass/highlight/cobalt2.scss +197 -0
  119. data/_sass/highlight/coffee.scss +82 -0
  120. data/_sass/highlight/colorful.scss +178 -61
  121. data/_sass/highlight/cran.scss +185 -169
  122. data/_sass/highlight/default.scss +72 -61
  123. data/_sass/highlight/dracula.scss +93 -169
  124. data/_sass/highlight/emacs.scss +72 -61
  125. data/_sass/highlight/friendly.scss +72 -61
  126. data/_sass/highlight/friendly_grayscale.scss +72 -0
  127. data/_sass/highlight/fruity.scss +82 -70
  128. data/_sass/highlight/github.dark.scss +83 -0
  129. data/_sass/highlight/github.scss +116 -61
  130. data/_sass/highlight/gruvbox.dark.scss +83 -0
  131. data/_sass/highlight/gruvbox.light.scss +68 -84
  132. data/_sass/highlight/gruvbox.scss +97 -0
  133. data/_sass/highlight/igor.scss +36 -0
  134. data/_sass/highlight/igorpro.scss +45 -0
  135. data/_sass/highlight/inkpot.scss +78 -0
  136. data/_sass/highlight/lightbulb.scss +82 -0
  137. data/_sass/highlight/lilypond.scss +58 -0
  138. data/_sass/highlight/lovelace.scss +74 -0
  139. data/_sass/highlight/magritte.scss +175 -0
  140. data/_sass/highlight/manni.scss +72 -61
  141. data/_sass/highlight/material.scss +81 -0
  142. data/_sass/highlight/molokai.scss +211 -0
  143. data/_sass/highlight/monokai.scss +217 -65
  144. data/_sass/highlight/monokai.sublime.scss +203 -0
  145. data/_sass/highlight/murphy.scss +72 -61
  146. data/_sass/highlight/native.scss +82 -70
  147. data/_sass/highlight/night-owl.scss +201 -0
  148. data/_sass/highlight/nord.darker.scss +82 -0
  149. data/_sass/highlight/nord.scss +82 -0
  150. data/_sass/highlight/oksolar.dark.scss +175 -0
  151. data/_sass/highlight/oksolar.light.scss +175 -0
  152. data/_sass/highlight/one.dark.scss +82 -0
  153. data/_sass/highlight/panda.scss +195 -0
  154. data/_sass/highlight/paraiso.dark.scss +76 -0
  155. data/_sass/highlight/paraiso.light.scss +76 -0
  156. data/_sass/highlight/pastie.scss +154 -60
  157. data/_sass/highlight/perldoc.scss +69 -58
  158. data/_sass/highlight/rainbow_dash.scss +65 -0
  159. data/_sass/highlight/rrt.scss +82 -0
  160. data/_sass/highlight/sas.scss +63 -0
  161. data/_sass/highlight/selenized.black.scss +175 -0
  162. data/_sass/highlight/selenized.dark.scss +175 -0
  163. data/_sass/highlight/selenized.light.scss +175 -0
  164. data/_sass/highlight/selenized.white.scss +175 -0
  165. data/_sass/highlight/skeletor.scss +190 -140
  166. data/_sass/highlight/solarized.dark.scss +82 -0
  167. data/_sass/highlight/solarized.light.scss +82 -0
  168. data/_sass/highlight/stackoverflow.dark.scss +175 -0
  169. data/_sass/highlight/stackoverflow.light.scss +175 -0
  170. data/_sass/highlight/staroffice.scss +82 -0
  171. data/_sass/highlight/stata.dark.scss +82 -0
  172. data/_sass/highlight/stata.light.scss +49 -0
  173. data/_sass/highlight/tango.scss +81 -69
  174. data/_sass/highlight/template.scss +290 -0
  175. data/_sass/highlight/thankful_eyes.scss +180 -173
  176. data/_sass/highlight/trac.scss +70 -59
  177. data/_sass/highlight/tulip.scss +171 -0
  178. data/_sass/highlight/vim.scss +82 -70
  179. data/_sass/highlight/vs.scss +41 -33
  180. data/_sass/highlight/xcode.scss +65 -0
  181. data/_sass/highlight/zenburn.scss +82 -136
  182. data/_sass/reset-algolia.scss +27 -17
  183. data/_sass/skins/academia.scss +47 -10
  184. data/_sass/skins/auto.scss +25 -27
  185. data/_sass/skins/butterfly-dark.scss +73 -0
  186. data/_sass/skins/butterfly-dim.scss +81 -0
  187. data/_sass/skins/butterfly.scss +65 -0
  188. data/_sass/skins/cerulean.scss +120 -0
  189. data/_sass/skins/chulapa.scss +33 -6
  190. data/_sass/skins/cyborg.scss +3 -0
  191. data/_sass/skins/dark-bg.scss +83 -49
  192. data/_sass/skins/darkly.scss +3 -0
  193. data/_sass/skins/deeply.scss +17 -87
  194. data/_sass/skins/electro.scss +5 -19
  195. data/_sass/skins/flatly.scss +3 -0
  196. data/_sass/skins/focal.scss +56 -19
  197. data/_sass/skins/gitdev-dark.scss +28 -25
  198. data/_sass/skins/gitdev.scss +22 -19
  199. data/_sass/skins/graymor.scss +7 -22
  200. data/_sass/skins/hootstrap.scss +6 -13
  201. data/_sass/skins/journal.scss +3 -143
  202. data/_sass/skins/listen.scss +83 -0
  203. data/_sass/skins/litera.scss +281 -0
  204. data/_sass/skins/lux.scss +3 -376
  205. data/_sass/skins/lymcha.scss +4 -12
  206. data/_sass/skins/materia.scss +3 -0
  207. data/_sass/skins/media.scss +40 -12
  208. data/_sass/skins/mickie.scss +8 -11
  209. data/_sass/skins/minco.scss +11 -10
  210. data/_sass/skins/minty.scss +3 -168
  211. data/_sass/skins/monotone.scss +7 -11
  212. data/_sass/skins/navi.scss +54 -0
  213. data/_sass/skins/none.scss +24 -2
  214. data/_sass/skins/pear.scss +50 -6
  215. data/_sass/skins/preptor.scss +6 -15
  216. data/_sass/skins/pulse.scss +158 -0
  217. data/_sass/skins/skeeblu.scss +6 -17
  218. data/_sass/skins/sketchy.scss +3 -746
  219. data/_sass/skins/slate.scss +3 -0
  220. data/_sass/skins/solar.scss +3 -0
  221. data/_sass/skins/sunset.scss +6 -11
  222. data/_sass/skins/towards.scss +44 -5
  223. data/_sass/skins/twitter-dim.scss +60 -13
  224. data/_sass/skins/twitter-lights-out.scss +44 -11
  225. data/_sass/skins/twitter.scss +51 -10
  226. data/_sass/skins/united.scss +3 -0
  227. data/_sass/skins/universal.scss +46 -27
  228. data/_sass/skins/wandoo.scss +7 -12
  229. data/_sass/skins/yeti.scss +3 -0
  230. data/_sass/vendor/bootswatch/LICENSE +21 -0
  231. data/_sass/vendor/bootswatch/LICENSE-4.5.0 +21 -0
  232. data/_sass/vendor/bootswatch/README.md +57 -0
  233. data/_sass/vendor/bootswatch/cerulean/_bootswatch.scss +102 -0
  234. data/_sass/vendor/bootswatch/cerulean/_variables.scss +57 -0
  235. data/_sass/vendor/bootswatch/cyborg/_bootswatch.scss +330 -0
  236. data/_sass/vendor/bootswatch/cyborg/_variables.scss +169 -0
  237. data/_sass/vendor/bootswatch/darkly/_bootswatch.scss +247 -0
  238. data/_sass/vendor/bootswatch/darkly/_variables.scss +164 -0
  239. data/_sass/vendor/bootswatch/flatly/_bootswatch.scss +274 -0
  240. data/_sass/vendor/bootswatch/flatly/_variables.scss +106 -0
  241. data/_sass/vendor/bootswatch/journal/_bootswatch.scss +62 -0
  242. data/_sass/vendor/bootswatch/journal/_variables.scss +60 -0
  243. data/_sass/vendor/bootswatch/litera/_bootswatch.scss +268 -0
  244. data/_sass/vendor/bootswatch/litera/_variables.scss +96 -0
  245. data/_sass/vendor/bootswatch/lux/_bootswatch.scss +191 -0
  246. data/_sass/vendor/bootswatch/lux/_variables.scss +103 -0
  247. data/_sass/vendor/bootswatch/materia/_bootswatch.scss +747 -0
  248. data/_sass/vendor/bootswatch/materia/_variables.scss +129 -0
  249. data/_sass/vendor/bootswatch/minty/_bootswatch.scss +380 -0
  250. data/_sass/vendor/bootswatch/minty/_variables.scss +94 -0
  251. data/_sass/vendor/bootswatch/pulse/_bootswatch.scss +145 -0
  252. data/_sass/vendor/bootswatch/pulse/_variables.scss +96 -0
  253. data/_sass/vendor/bootswatch/sketchy/_bootswatch.scss +492 -0
  254. data/_sass/vendor/bootswatch/sketchy/_variables.scss +172 -0
  255. data/_sass/vendor/bootswatch/slate/_bootswatch.scss +531 -0
  256. data/_sass/vendor/bootswatch/slate/_variables.scss +163 -0
  257. data/_sass/vendor/bootswatch/solar/_bootswatch.scss +243 -0
  258. data/_sass/vendor/bootswatch/solar/_variables.scss +171 -0
  259. data/_sass/vendor/bootswatch/source.json +86 -0
  260. data/_sass/vendor/bootswatch/united/_bootswatch.scss +10 -0
  261. data/_sass/vendor/bootswatch/united/_variables.scss +54 -0
  262. data/_sass/vendor/bootswatch/yeti/_bootswatch.scss +586 -0
  263. data/_sass/vendor/bootswatch/yeti/_variables.scss +110 -0
  264. data/_sass/vendor/tophat/LICENSE +21 -0
  265. data/_sass/vendor/tophat/README.md +38 -0
  266. data/_sass/vendor/tophat/deeply/_styles.scss +6 -0
  267. data/_sass/vendor/tophat/deeply/_variables.scss +73 -0
  268. data/_sass/vendor/tophat/deeply/theme.scss +77 -0
  269. data/_sass/vendor/tophat/electro/_styles.scss +5 -0
  270. data/_sass/vendor/tophat/electro/_variables.scss +23 -0
  271. data/_sass/vendor/tophat/electro/theme.scss +28 -0
  272. data/_sass/vendor/tophat/graymor/_styles.scss +5 -0
  273. data/_sass/vendor/tophat/graymor/_variables.scss +18 -0
  274. data/_sass/vendor/tophat/graymor/theme.scss +24 -0
  275. data/_sass/vendor/tophat/hootstrap/_styles.scss +5 -0
  276. data/_sass/vendor/tophat/hootstrap/_variables.scss +14 -0
  277. data/_sass/vendor/tophat/hootstrap/theme.scss +18 -0
  278. data/_sass/vendor/tophat/lymcha/_styles.scss +5 -0
  279. data/_sass/vendor/tophat/lymcha/_variables.scss +13 -0
  280. data/_sass/vendor/tophat/lymcha/theme.scss +16 -0
  281. data/_sass/vendor/tophat/mickie/_styles.scss +5 -0
  282. data/_sass/vendor/tophat/mickie/_variables.scss +13 -0
  283. data/_sass/vendor/tophat/mickie/theme.scss +17 -0
  284. data/_sass/vendor/tophat/minco/_styles.scss +5 -0
  285. data/_sass/vendor/tophat/minco/_variables.scss +14 -0
  286. data/_sass/vendor/tophat/minco/theme.scss +18 -0
  287. data/_sass/vendor/tophat/monotone/_styles.scss +5 -0
  288. data/_sass/vendor/tophat/monotone/_variables.scss +14 -0
  289. data/_sass/vendor/tophat/monotone/theme.scss +18 -0
  290. data/_sass/vendor/tophat/preptor/_styles.scss +5 -0
  291. data/_sass/vendor/tophat/preptor/_variables.scss +14 -0
  292. data/_sass/vendor/tophat/preptor/theme.scss +18 -0
  293. data/_sass/vendor/tophat/skeeblu/_styles.scss +5 -0
  294. data/_sass/vendor/tophat/skeeblu/_variables.scss +17 -0
  295. data/_sass/vendor/tophat/skeeblu/theme.scss +22 -0
  296. data/_sass/vendor/tophat/source.json +57 -0
  297. data/_sass/vendor/tophat/sunset/_styles.scss +5 -0
  298. data/_sass/vendor/tophat/sunset/_variables.scss +13 -0
  299. data/_sass/vendor/tophat/sunset/theme.scss +16 -0
  300. data/_sass/vendor/tophat/wandoo/_styles.scss +5 -0
  301. data/_sass/vendor/tophat/wandoo/_variables.scss +18 -0
  302. data/_sass/vendor/tophat/wandoo/theme.scss +24 -0
  303. data/assets/atom.xml +10 -6
  304. data/assets/css/dark/highlighter.scss +10 -0
  305. data/assets/css/dark/main.scss +43 -0
  306. data/assets/css/highlighter.scss +6 -1
  307. data/assets/css/main.scss +12 -3
  308. data/assets/css/search-fusejs.css +14 -0
  309. data/assets/css/search-lunr.css +7 -0
  310. data/assets/js/better404/better404.js +68 -0
  311. data/assets/js/ch_ytdefer/ch_ytdefer.js +27 -83
  312. data/assets/js/chulapa_carousel.js +115 -0
  313. data/assets/js/chulapa_mermaid.js +31 -0
  314. data/assets/js/chulapa_navigation.js +71 -0
  315. data/assets/js/chulapa_photoswipe.js +106 -0
  316. data/assets/js/chulapa_script.js +199 -77
  317. data/assets/js/chulapa_search.js +89 -0
  318. data/assets/js/clipboard/chulapa_clipboard.js +17 -108
  319. data/assets/js/cusdis/chulapa_cusdis.js +1 -1
  320. data/assets/js/fusejs/fusejs-search.js +62 -0
  321. data/assets/js/fusejs/fusejs-search.min.js +4 -0
  322. data/assets/js/fusejs/fusejs-store.js +43 -0
  323. data/assets/js/lunr/lunr-search.js +127 -115
  324. data/assets/js/lunr/lunr-search.min.js +4 -0
  325. data/assets/js/lunr/lunr-store.js +31 -23
  326. data/assets/js/simplesearch/simplesearch-store.json +45 -0
  327. data/assets/rss.xml +4 -3
  328. metadata +220 -8
  329. data/_sass/highlight/UNLICENSE.txt +0 -24
data/_includes/head.html CHANGED
@@ -1,319 +1,466 @@
1
- <head>
2
- <meta charset="utf-8">
3
- <!-- Chulapa Jekyll Theme - 2.0.1 -->
4
- <!-- MIT License-->
5
- <!-- Docs: https://dieghernan.github.io/chulapa -->
6
- <!-- Repo: https://github.com/dieghernan/chulapa -->
7
- <!-- Page build {{ site.time }} -->
8
- <!-- Jekyll Version {{ jekyll.version }} -->
9
- {%- assign canonical_url = page.url | replace: "index.html", "" | absolute_url | uri_escape -%}
10
- {%- assign home_url = "index.html" | absolute_url | replace: "index.html", "" | uri_escape -%}
11
- {%- assign metatitle1 = page.title | default: site.title | default: site.github.repository_name | strip_html -%}
12
- {%- assign metatitle2 = site.title | default: site.github.repository_name | strip_html -%}
13
- {%- assign strippedurl = page.url | replace: "index.html", "" -%}
1
+ {%- include snippets/canonical-url.html url=page.url canonical=page.canonical_url -%}
2
+ {%- assign home_url = '/' | absolute_url | uri_escape -%}
3
+ {%- include snippets/breadcrumb-names.html -%}
4
+ {%- assign metatitle1 = page.title | default: site.title | default: site.github.repository_name | markdownify | strip_html | strip -%}
5
+ {%- assign metatitle2 = site.title | default: site.github.repository_name | markdownify | strip_html | strip -%}
6
+ {%- assign strippedurl = canonical_path -%}
14
7
  {%- if strippedurl == "/" -%}
15
- {%- assign metatitle1 = site.title | default: site.github.repository_name -%}
16
- {%- assign metatitle2 = site.subtitle | default: site.github.project_tagline -%}
8
+ {%- assign metatitle1 = site.title | default: site.github.repository_name | strip -%}
9
+ {%- assign metatitle2 = site.subtitle | default: site.github.project_tagline | strip -%}
10
+ {%- endif -%}
11
+ {%- assign metatitle1 = metatitle1 | strip_html | strip -%}
12
+ {%- assign metatitle2 = metatitle2 | strip_html | strip -%}
13
+ {%- capture metatitle -%}{{ metatitle1 }}{%- if metatitle1 != empty and metatitle2 != empty %} {{ site.title_separator | default: "|" }} {% endif -%}{{ metatitle2 }}{%- endcapture -%}
14
+ {%- assign seo_title = page.seo_title | markdownify | strip_html | strip -%}
15
+ {%- if seo_title != empty -%}
16
+ {%- assign metatitle = seo_title -%}
17
+ {%- assign metatitle1 = seo_title -%}
17
18
  {%- endif -%}
18
- {%- capture metatitle -%}{{ metatitle1 | strip_html }} {{ site.title_separator | default: "|" }} {{ metatitle2 | strip_html }}{%- endcapture -%}
19
+ {%- assign social_title = page.og_title | markdownify | strip_html | strip -%}
20
+ {%- if social_title == empty -%}{%- assign social_title = metatitle -%}{%- endif -%}
19
21
  {%- assign mainname = site.title | default: site.github.repository_name -%}
20
- {%- assign mainsub = site.subtitle | default: site.github.project_tagline -%}
21
- {%- capture sitename -%}{{ mainname | strip_html }} {{ site.title_separator | default: "|" }} {{ mainsub | strip_html }}{%- endcapture -%}
22
- {%- assign ogimage = page.og_image | default: page.header_img | default: site.og_image | default: site.author.avatar | default: site.github.owner_gravatar_url | absolute_url -%}
22
+ {%- assign sitename = mainname | markdownify | strip_html | strip -%}
23
+ {%- assign page_image_source = page.og_image | default: page.header_img | strip -%}
24
+ {%- assign ogimage_source = page.og_image | default: page.header_img | default: site.og_image | default: site.author.avatar | default: site.github.owner_gravatar_url | strip -%}
25
+ {%- assign ogimage = nil -%}
26
+ {%- if ogimage_source != empty -%}
27
+ {%- assign ogimage = ogimage_source | absolute_url -%}
28
+ {%- endif -%}
29
+ {%- assign explicit_description = page.description | markdownify | strip_html | split: ' ' | join: ' ' | strip -%}
30
+ {%- if explicit_description != empty -%}
31
+ {%- assign ogdesc = explicit_description -%}
32
+ {%- else -%}
33
+ {%- assign ogdesc = page.excerpt | markdownify | strip_html | split: ' ' | join: ' ' | strip -%}
34
+ {%- if ogdesc == empty and strippedurl == '/' -%}
35
+ {%- assign ogdesc = site.description | markdownify | strip_html | split: ' ' | join: ' ' | strip -%}
36
+ {%- endif -%}
37
+ {%- if ogdesc == empty -%}
23
38
  {%- assign descfallback = page.content |
24
39
  markdownify | newline_to_br |
25
40
  replace:"<br />", ",.," |
26
41
  replace:"{{", ",.," |
27
42
  replace:"{%", ",.," |
28
43
  split: ",.," | first -%}
29
- {%- assign ogdesc = page.excerpt | default: descfallback |
30
- strip_html | escape_once -%}
31
- {%- if page.subtitle -%}
32
- {%- assign ogdesc = page.subtitle | append: " - " | append: ogdesc | strip_html | escape_once -%}
44
+ {%- assign ogdesc = descfallback | markdownify | strip_html | split: ' ' | join: ' ' | strip -%}
45
+ {%- endif -%}
46
+ {%- assign metasubtitle = page.subtitle | markdownify | strip_html | split: ' ' | join: ' ' | strip -%}
47
+ {%- if metasubtitle != empty -%}
48
+ {%- assign description_lower = ogdesc | downcase -%}
49
+ {%- assign subtitle_lower = metasubtitle | downcase -%}
50
+ {%- if ogdesc == empty -%}
51
+ {%- assign ogdesc = metasubtitle -%}
52
+ {%- else -%}
53
+ {%- unless description_lower contains subtitle_lower -%}
54
+ {%- assign ogdesc = metasubtitle | append: ' - ' | append: ogdesc -%}
55
+ {%- endunless -%}
56
+ {%- endif -%}
33
57
  {%- endif -%}
58
+ {%- endif -%}
59
+ {%- assign ogdesc = ogdesc | newline_to_br | replace: '<br />', ' ' | strip_newlines | strip | escape_once -%}
34
60
  {%- assign links = page.author.links | default: site.author.links -%}
35
- {%- for item in links -%}
36
- {%- if item.url contains "twitter.com/" -%}
37
- {%- assign twitterauthor = item.url | split: "/" | last -%}
38
- {%- break -%}
61
+ {%- assign creator_links = site.author.links -%}
62
+ {%- if page.author -%}
63
+ {%- assign creator_links = page.author.links -%}
64
+ {%- endif -%}
65
+ {%- assign twitterauthor = nil -%}
66
+ {%- assign twitter_reserved_paths = 'home,explore,search,notifications,messages,settings,i,intent,share,compose,login,logout,signup,about,privacy,tos,help,download,jobs,hashtag,lists,communities,premium,verified,account' | split: ',' -%}
67
+ {%- assign twitter_username_chars = 'abcdefghijklmnopqrstuvwxyz0123456789_' -%}
68
+ {%- for item in creator_links -%}
69
+ {%- assign author_profile_url = item.url | split: '?' | first | split: '#' | first -%}
70
+ {%- assign author_url_parts = author_profile_url | split: '/' -%}
71
+ {%- assign author_scheme = author_url_parts[0] | downcase -%}
72
+ {%- assign author_host = nil -%}
73
+ {%- unless author_url_parts[2] contains '@' -%}
74
+ {%- assign author_host = author_url_parts[2] | split: ':' | first | downcase -%}
75
+ {%- endunless -%}
76
+ {%- if author_host == "twitter.com" or author_host == "www.twitter.com" or author_host == "x.com" or author_host == "www.x.com" -%}
77
+ {%- assign twitter_username = author_url_parts[3] -%}
78
+ {%- assign twitter_username_lower = twitter_username | downcase -%}
79
+ {%- assign twitter_username_size = twitter_username | size -%}
80
+ {%- assign twitter_profile_path = author_url_parts[0] | append: '//' | append: author_url_parts[2] | append: '/' | append: twitter_username -%}
81
+ {%- assign twitter_profile_path_slash = twitter_profile_path | append: '/' -%}
82
+ {%- assign twitter_profile_valid = false -%}
83
+ {%- if author_scheme == 'https:' or author_scheme == 'http:' -%}
84
+ {%- if author_profile_url == twitter_profile_path or author_profile_url == twitter_profile_path_slash -%}
85
+ {%- if twitter_username_size > 0 and twitter_username_size <= 15 -%}
86
+ {%- unless twitter_reserved_paths contains twitter_username_lower -%}
87
+ {%- assign twitter_profile_valid = true -%}
88
+ {%- assign twitter_characters = twitter_username_lower | split: '' -%}
89
+ {%- for character in twitter_characters -%}
90
+ {%- unless twitter_username_chars contains character -%}
91
+ {%- assign twitter_profile_valid = false -%}
92
+ {%- endunless -%}
93
+ {%- endfor -%}
94
+ {%- endunless -%}
95
+ {%- endif -%}
96
+ {%- endif -%}
97
+ {%- endif -%}
98
+ {%- if twitter_profile_valid -%}
99
+ {%- assign twitterauthor = twitter_username -%}
100
+ {%- break -%}
101
+ {%- endif -%}
39
102
  {%- endif -%}
40
103
  {%- endfor %}
41
104
  {%- assign authorlink = links | where_exp: "item", "item.url contains 'http'" %}
42
- <!--Google Structured Data-->
105
+ {%- if page.collection == "posts" -%}
106
+ {%- assign schema_type = "BlogPosting" -%}
107
+ {%- elsif strippedurl == "/" -%}
108
+ {%- assign schema_type = "WebSite" -%}
109
+ {%- else -%}
110
+ {%- assign schema_type = "WebPage" -%}
111
+ {%- endif %}
112
+ <head>
113
+ <meta charset="utf-8">
114
+ <!-- Chulapa Jekyll Theme - v2.2.0 -->
115
+ <!-- MIT License -->
116
+ <!-- Docs: https://dieghernan.github.io/chulapa -->
117
+ <!-- Repo: https://github.com/dieghernan/chulapa -->
118
+ <!-- Page build {{ site.time | date: "%Y-%m-%d" }} -->
119
+ <!-- Jekyll Version {{ jekyll.version }} -->
120
+ <!-- Google structured data -->
43
121
  <script type="application/ld+json">
44
- {
45
- "@context": "https://schema.org",
46
- {% if page.collection == "posts" %}
47
- "@type": "BlogPosting",
48
- {% else %}
49
- "@type": "Article",
50
- {% endif %}
51
- "mainEntityOfPage": {
52
- "@type": "WebPage",
53
- "@id": "{{ canonical_url }}"
54
- },
55
- "headline": "{{ metatitle1 | strip_html }}",
56
- "image": "{{ ogimage }}",
57
- "datePublished": "{{ page.date | default: site.time | date_to_xmlschema }}",
58
- "dateModified": "{{ page.last_modified_at | default: page.date | default: site.time | date_to_xmlschema }}",
59
- "author": {
60
- "@type": "Person",
61
- "name": "{{ page.author.name | default: site.author.name | default: site.github.owner_name }}"
62
- {% if authorlink %}
63
- {% for item in authorlink %}
64
- {% if forloop.first %}
65
- , "url": "{{ item.url }}"
66
- {% else %}
67
- {% if forloop.index == 2 %}
68
- , "sameAs" : [
69
- {% endif %}
70
- "{{ item.url }}"
71
- {%- if forloop.last %}
72
- ]
73
- {% else %}
74
- ,
75
- {% endif %}
76
- {% endif %}
77
- {% endfor %}
78
- {% endif %}
79
- },
80
- "publisher": {
81
- "@type": "Organization",
82
- "name": "{{ site.author.name | default: site.github.owner_name }}",
83
- "url": "{{ home_url }}",
84
- "logo": {
85
- "@type": "ImageObject",
86
- "url": "{{ site.og_image | default: site.author.avatar | default: site.github.owner_gravatar_url | absolute_url }}"
87
- }
122
+ {
123
+ "@context": "https://schema.org",
124
+ "@type": {{ schema_type | jsonify }},
125
+ {% if schema_type == 'WebPage' %}
126
+ "@id": {% include snippets/jsonld-string.html value=canonical_url decode_html=false %},
127
+ "name": {% include snippets/jsonld-string.html value=metatitle1 %},
128
+ "description": {% include snippets/jsonld-string.html value=ogdesc %},
129
+ {% elsif schema_type == 'WebSite' %}
130
+ "@id": {% assign jsonld_value = home_url | append: '#website' %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %},
131
+ "name": {% include snippets/jsonld-string.html value=breadcrumb_site_name %},
132
+ "url": {% include snippets/jsonld-string.html value=home_url decode_html=false %},
133
+ {% else %}
134
+ "@id": {% assign jsonld_value = canonical_url | append: '#article' %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %},
135
+ "mainEntityOfPage": {
136
+ "@type": "WebPage",
137
+ "@id": {% include snippets/jsonld-string.html value=canonical_url decode_html=false %}
138
+ },
139
+ {% endif %}
140
+ "headline": {% assign jsonld_value = metatitle1 | strip_html | strip %}{% include snippets/jsonld-string.html value=jsonld_value %},
141
+ {% if schema_type == 'BlogPosting' %}
142
+ {% include snippets/article-images.html %}
143
+ {% else %}
144
+ "image": {% include snippets/jsonld-string.html value=ogimage decode_html=false %},
145
+ {% endif %}
146
+ {% if page.date %}
147
+ "datePublished": {{ page.date | date_to_xmlschema | jsonify }},
148
+ "dateModified": {{ page.last_modified_at | default: page.date | date_to_xmlschema | jsonify }},
149
+ {% endif %}
150
+ "author": {
151
+ "@type": "Person",
152
+ "name": {% assign jsonld_value = page.author.name | default: site.author.name | default: site.github.owner_name %}{% include snippets/jsonld-string.html value=jsonld_value %}{% if authorlink.size > 0 %},
153
+ "url": {% include snippets/jsonld-string.html value=authorlink.first.url decode_html=false %}{% if authorlink.size > 1 %},
154
+ "sameAs": [
155
+ {% for item in authorlink offset:1 %}
156
+ {% include snippets/jsonld-string.html value=item.url decode_html=false %}{% unless forloop.last %},{% endunless %}
157
+ {% endfor %}
158
+ ]{% endif %}{% endif %}
159
+ },
160
+ "publisher": {% include snippets/publisher.html %}
88
161
  }
89
- }
90
162
  </script>
91
- {% if page.breadcrumb_list %}
92
- <script type="application/ld+json">
93
- {
94
- "@context": "https://schema.org",
95
- "@type": "BreadcrumbList",
96
- "itemListElement": [
97
- {% for item in page.breadcrumb_list %}
163
+ {% if page.breadcrumb_list.size > 0 %}
164
+ <script type="application/ld+json">
98
165
  {
99
- "@type": "ListItem",
100
- "position": {{ forloop.index }},
101
- "name": "{{ item.label | strip_html }}",
102
- "item": "{{ item.url | absolute_url }}"
103
- },
166
+ "@context": "https://schema.org",
167
+ "@type": "BreadcrumbList",
168
+ "@id": {% assign jsonld_value = canonical_url | append: '#breadcrumb' %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %},
169
+ "itemListElement": [
170
+ {% for item in page.breadcrumb_list %}
171
+ {
172
+ "@type": "ListItem",
173
+ "@id": {% assign jsonld_value = canonical_url | append: '#breadcrumb-' | append: forloop.index %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %},
174
+ "position": {{ forloop.index }},
175
+ "name": {% assign jsonld_value = item.label | strip_html | strip | default: item.url | default: breadcrumb_home_name %}{% include snippets/jsonld-string.html value=jsonld_value %},
176
+ "item": {% assign jsonld_value = item.url | absolute_url %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %}
177
+ },
104
178
  {% if forloop.last %}
105
179
  {% assign loopplus1 = forloop.index | plus: 1 %}
106
180
  {% endif %}
107
181
  {% endfor %}
108
- {
109
- "@type": "ListItem",
110
- "position": {{ loopplus1 }},
111
- "name": "{{ page.title | strip_html }}"
112
- }]
113
- }
182
+ {
183
+ "@type": "ListItem",
184
+ "@id": {% assign jsonld_value = canonical_url | append: '#breadcrumb-' | append: loopplus1 %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %},
185
+ "position": {{ loopplus1 }},
186
+ "item": {% include snippets/jsonld-string.html value=canonical_url decode_html=false %},
187
+ "name": {% include snippets/jsonld-string.html value=breadcrumb_page_name %}
188
+ }
189
+ ]
190
+ }
114
191
  </script>
115
- {% else %}
192
+ {% elsif strippedurl != "/" %}
116
193
  <script type="application/ld+json">
117
- {
118
- "@context": "https://schema.org",
119
- "@type": "BreadcrumbList",
120
- "itemListElement": [{
121
- "@type": "ListItem",
122
- "position": 1,
123
- "name": "{{ site.navbar.brand.title | default: site.title | default: site.github.repository_name | strip_html }}",
124
- "item": "{{ "/" | absolute_url }}"
125
- },{
126
- "@type": "ListItem",
127
- "position": 2,
128
- "name": "{{ page.title | strip_html }}"
129
- }]
130
- }
194
+ {
195
+ "@context": "https://schema.org",
196
+ "@type": "BreadcrumbList",
197
+ "@id": {% assign jsonld_value = canonical_url | append: '#breadcrumb' %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %},
198
+ "itemListElement": [{
199
+ "@type": "ListItem",
200
+ "@id": {% assign jsonld_value = canonical_url | append: '#breadcrumb-1' %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %},
201
+ "position": 1,
202
+ "name": {% include snippets/jsonld-string.html value=breadcrumb_home_name %},
203
+ "item": {% assign jsonld_value = "/" | absolute_url %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %}
204
+ },{
205
+ "@type": "ListItem",
206
+ "@id": {% assign jsonld_value = canonical_url | append: '#breadcrumb-2' %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %},
207
+ "position": 2,
208
+ "item": {% include snippets/jsonld-string.html value=canonical_url decode_html=false %},
209
+ "name": {% include snippets/jsonld-string.html value=breadcrumb_page_name %}
210
+ }
211
+ ]
212
+ }
131
213
  </script>
132
214
  {% endif %}
133
-
215
+ {% if schema_type != 'WebPage' %}
134
216
  <script type="application/ld+json">
135
- {
136
- "@context": "http://schema.org",
137
- "@type": "WebPage",
138
- "name": "{{ metatitle1 | strip_html }}",
139
- "description": "{{ ogdesc }}"
140
- }
141
- }
142
- </script>
143
- {%- assign sitelink = site.author.links |
217
+ {
218
+ "@context": "https://schema.org",
219
+ "@type": "WebPage",
220
+ "@id": {% include snippets/jsonld-string.html value=canonical_url decode_html=false %},
221
+ "isPartOf": {"@id": {% assign jsonld_value = home_url | append: '#website' %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %}},
222
+ "name": {% assign jsonld_value = metatitle1 | strip_html %}{% include snippets/jsonld-string.html value=jsonld_value %},
223
+ "description": {% include snippets/jsonld-string.html value=ogdesc %}
224
+ }
225
+ </script>
226
+ {% endif %}
227
+ {% assign sitelink = site.author.links |
144
228
  where_exp: "item", "item.url contains 'http'"
145
- -%}
146
- <script type="application/ld+json">
147
- {
148
- "@context" : "https://schema.org",
149
- "@type" : "Person",
229
+ %}
230
+ <script type="application/ld+json">
231
+ {
232
+ "@context": "https://schema.org",
233
+ "@type": "Person",
150
234
  {% if site.author.avatar %}
151
- "image": "{{ site.author.avatar | absolute_url }}",
235
+ "image": {% assign jsonld_value = site.author.avatar | absolute_url %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %},
152
236
  {% endif %}
153
237
  {% if site.author.location %}
154
- "homeLocation": {
155
- "@type": "Place",
156
- "name": "{{ site.author.location }}"
157
- },
238
+ "homeLocation": {
239
+ "@type": "Place",
240
+ "name": {% include snippets/jsonld-string.html value=site.author.location %}
241
+ },
158
242
  {% endif %}
159
- "description": "Publisher",
160
- "name" : "{{ site.author.name | default: site.github.owner_name }}",
161
- "url" : "{{ "/" | absolute_url }}"
162
- {% if sitelink %}
163
- , "sameAs" : [
243
+ {% capture publisher_settings %}{{ site.publisher.type }}{{ site.publisher.name }}{{ site.publisher.url }}{{ site.publisher.logo }}{{ site.publisher.image }}{% endcapture %}
244
+ "description": {% if publisher_settings != empty %}"Site author"{% else %}"Publisher"{% endif %},
245
+ "name": {% assign jsonld_value = site.author.name | default: site.github.owner_name %}{% include snippets/jsonld-string.html value=jsonld_value %},
246
+ "url": {% assign jsonld_value = "/" | absolute_url %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %}{% if sitelink %},
247
+ "sameAs": [
164
248
  {% for item in sitelink %}
165
- "{{ item.url }}"{%- if forloop.last %}{% else %},{% endif %}
249
+ {% include snippets/jsonld-string.html value=item.url decode_html=false %}{% if forloop.last %}{% else %},{% endif %}
166
250
  {% endfor %}
167
- ]
251
+ ]
168
252
  {% endif %}
169
- }
170
- </script>
253
+ }
254
+ </script>
171
255
  {% if page.author %}
172
- {%- assign pagelink = page.author.links |
256
+ {% assign pagelink = page.author.links |
173
257
  where_exp: "item", "item.url contains 'http'"
174
- -%}
175
- <script type="application/ld+json">
176
- {
177
- "@context" : "https://schema.org",
178
- "@type" : "Person",
258
+ %}
259
+ <script type="application/ld+json">
260
+ {
261
+ "@context": "https://schema.org",
262
+ "@type": "Person",
179
263
  {% if page.author.avatar %}
180
- "image": "{{ page.author.avatar | absolute_url }}",
264
+ "image": {% assign jsonld_value = page.author.avatar | absolute_url %}{% include snippets/jsonld-string.html value=jsonld_value decode_html=false %},
181
265
  {% endif %}
182
266
  {% if page.author.location %}
183
- "homeLocation": {
184
- "@type": "Place",
185
- "name": "{{ page.author.location }}"
186
- },
187
- {% endif %}
188
- "description": "Collaborator",
189
- "name" : "{{ page.author.name }}"
190
- {% if pagelink %}
191
- {% for item in pagelink %}
192
- {% if forloop.first %}
193
- , "url": "{{ item.url }}"
194
- {% else %}
195
- {% if forloop.index == 2 %}
196
- , "sameAs" : [
197
- {% endif %}
198
- "{{ item.url }}"
199
- {%- if forloop.last %}
200
- ]
201
- {% else %}
202
- ,
203
- {% endif %}
204
- {% endif %}
205
- {% endfor %}
267
+ "homeLocation": {
268
+ "@type": "Place",
269
+ "name": {% include snippets/jsonld-string.html value=page.author.location %}
270
+ },
206
271
  {% endif %}
207
- }
208
- </script>
272
+ "description": "Collaborator",
273
+ "name": {% include snippets/jsonld-string.html value=page.author.name %}{% if pagelink.size > 0 %},
274
+ "url": {% include snippets/jsonld-string.html value=pagelink.first.url decode_html=false %}{% if pagelink.size > 1 %},
275
+ "sameAs": [
276
+ {% for item in pagelink offset:1 %}
277
+ {% include snippets/jsonld-string.html value=item.url decode_html=false %}{% unless forloop.last %},{% endunless %}
278
+ {% endfor %}
279
+ ]{% endif %}{% endif %}
280
+ }
281
+ </script>
209
282
  {% endif %}
210
- <title>{{ metatitle | strip_html }}</title>
211
- <link rel="canonical" href="{{ canonical_url }}">
283
+ <title>{{ metatitle | escape_once }}</title>
284
+ <link rel="canonical" href="{{ canonical_url | escape }}">
212
285
  <!-- Atom feed -->
213
286
  <link href="{{ './atom.xml' | absolute_url }}" type="application/atom+xml" rel="alternate" title="Atom feed {{ site.title }}" >
214
287
  <!-- RSS 2.0 feed -->
215
288
  <link href="{{ './rss.xml' | absolute_url }}" type="application/rss+xml" rel="alternate" title="RSS 2.0 feed {{ site.title }}" >
216
289
  <!-- Meta tags -->
217
290
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
218
- <meta name="author" content="{{ page.author.name | default: site.author.name | default: site.github.owner_name }}" >
219
- <meta name="copyright" content="{{ site.author.name | default: site.github.owner_name }}" >
220
- <meta name="description" content="{{- ogdesc | truncate: 160 -}}">
221
- <meta name="thumbnail" content="{{ ogimage }}" >
222
- <meta name="robots" content="index, follow">
223
- {%- assign: keyword = site.github.public_repositories |
224
- where_exp:"item", "item.name == site.github.repository_name " |
225
- map: "topics" -%}
226
- {% if keyword -%}
227
- <meta name="keywords" content="{{- keyword - | join: ','}}">
228
- {%- endif %}
229
- {% if site.chulapa-skin.vars.primary -%}
291
+ <meta name="author" content="{{ page.author.name | default: site.author.name | default: site.github.owner_name | escape_once }}" >
292
+ <meta name="copyright" content="{{ site.author.name | default: site.github.owner_name | escape_once }}" >
293
+ <meta name="description" content="{{- ogdesc -}}">
294
+ {% if ogimage %}<meta name="thumbnail" content="{{ ogimage | escape_once }}" >{% endif %}
295
+ <meta name="robots" content="{{ page.robots | default: 'index, follow' | strip | default: 'index, follow' | escape }}">
296
+ {% if site.chulapa-skin.vars.primary %}
230
297
  <!-- Chrome, Firefox OS and Opera -->
231
- <meta name="theme-color" content="{{ site.chulapa-skin.vars.primary }}">
232
- {%- endif %}
298
+ <meta name="theme-color" data-chulapa-theme-color content="{{ site.chulapa-skin.vars.primary }}">
299
+ {% endif %}
233
300
  <!-- OpenGraph -->
234
- <meta property="og:title" content="{{ metatitle | strip_html }}" >
235
- <meta property="og:site_name" content="{{ sitename | strip_html }}" >
236
- <meta property="og:url" content="{{ canonical_url }}" >
237
- <meta property="og:type" content="website" >
238
- <meta property="og:description" content="{{ ogdesc | truncatewords: 20 }}" >
239
- <meta property="og:locale" content="{{- site.locale | default: 'en-US' -}}" >
240
- <meta property="og:image" content="{{- ogimage -}}" >
301
+ <meta property="og:title" content="{{ social_title | escape_once }}" >
302
+ <meta property="og:site_name" content="{{ sitename | strip_html | escape_once }}" >
303
+ <meta property="og:url" content="{{ canonical_url | escape }}" >
304
+ {% assign og_type = page.og_type | strip %}
305
+ {% if og_type == empty %}
306
+ {% if page.collection == 'posts' %}{% assign og_type = 'article' %}
307
+ {% else %}{% assign og_type = 'website' %}{% endif %}
308
+ {% endif %}
309
+ <meta property="og:type" content="{{ og_type | escape }}" >
310
+ {% if og_type == 'article' %}
311
+ {% if page.date %}
312
+ <meta property="article:published_time" content="{{ page.date | date_to_xmlschema | escape }}">
313
+ {% endif %}
314
+ {% if page.last_modified_at %}
315
+ <meta property="article:modified_time" content="{{ page.last_modified_at | date_to_xmlschema | escape }}">
316
+ {% endif %}
317
+ {% assign article_author = page.og_article_author | strip %}
318
+ {% if article_author == empty %}
319
+ {% if page.author %}{% assign article_author = page.author.url | strip %}
320
+ {% else %}{% assign article_author = site.author.url | strip %}{% endif %}
321
+ {% endif %}
322
+ {% if article_author != empty %}
323
+ <meta property="article:author" content="{{ article_author | absolute_url | escape }}">
324
+ {% endif %}
325
+ {% assign article_section = page.og_article_section | strip %}
326
+ {% if article_section == empty %}{% assign article_section = page.categories | first | strip %}{% endif %}
327
+ {% if article_section != empty %}
328
+ <meta property="article:section" content="{{ article_section | escape }}">
329
+ {% endif %}
330
+ {% for article_tag in page.tags %}
331
+ {% assign article_tag_text = article_tag | strip %}
332
+ {% if article_tag_text != empty %}
333
+ <meta property="article:tag" content="{{ article_tag_text | escape }}">
334
+ {% endif %}
335
+ {% endfor %}
336
+ {% endif %}
337
+ <meta property="og:description" content="{{ ogdesc }}" >
338
+ {% include snippets/page-language.html %}
339
+ {% assign og_locale_input = page.og_locale | strip %}
340
+ {% assign explicit_page_language = page.locale | strip %}
341
+ {% if og_locale_input == empty and explicit_page_language != empty %}{% assign og_locale_input = page_language %}{% endif %}
342
+ {% if og_locale_input == empty %}{% assign og_locale_input = site.og_locale | strip %}{% endif %}
343
+ {% if og_locale_input == empty %}{% assign og_locale_input = page_language %}{% endif %}
344
+ {% include snippets/og-locale.html locale=og_locale_input %}
345
+ {% assign primary_og_locale = normalized_og_locale %}
346
+ {% if primary_og_locale %}<meta property="og:locale" content="{{ primary_og_locale }}">{% endif %}
347
+ {% assign alternate_locales = site.og_locale_alternate %}
348
+ {% if page.og_locale_alternate != nil %}{% assign alternate_locales = page.og_locale_alternate %}{% endif %}
349
+ {% assign emitted_locales = ',' | append: primary_og_locale | append: ',' %}
350
+ {% for alternate_locale in alternate_locales %}
351
+ {% include snippets/og-locale.html locale=alternate_locale %}
352
+ {% assign locale_token = ',' | append: normalized_og_locale | append: ',' %}
353
+ {% if normalized_og_locale %}
354
+ {% unless emitted_locales contains locale_token %}
355
+ <meta property="og:locale:alternate" content="{{ normalized_og_locale }}">
356
+ {% assign emitted_locales = emitted_locales | append: locale_token %}
357
+ {% endunless %}
358
+ {% endif %}
359
+ {% endfor %}
360
+ {% if ogimage %}
361
+ <meta property="og:image" content="{{- ogimage | escape_once -}}" >
362
+ {% assign image_fields = 'alt,width,height,type' | split: ',' %}
363
+ {% for field in image_fields %}
364
+ {% assign field_key = 'og_image_' | append: field %}
365
+ {% assign image_value = page[field_key] | strip %}
366
+ {% if image_value == empty and page_image_source == empty and ogimage_source == site.og_image %}
367
+ {% assign image_value = site[field_key] | strip %}
368
+ {% endif %}
369
+ {% if image_value != empty %}
370
+ <meta property="og:image:{{ field }}" content="{{ image_value | escape_once }}" >
371
+ {% endif %}
372
+ {% endfor %}
373
+ {% endif %}
241
374
  <!-- Twitter/X Cards -->
242
375
  <meta name="twitter:card" content="summary_large_image">
243
- {%- if site.twitter_site %}
376
+ <meta name="twitter:description" content="{{ ogdesc }}">
377
+ {% if site.twitter_site %}
244
378
  <meta name="twitter:site" content="@{{- site.twitter_site -}}" >
245
- {% endif -%}
246
- {%- if twitterauthor %}
379
+ {% endif %}
380
+ {% if twitterauthor %}
247
381
  <meta name="twitter:creator" content="@{{- twitterauthor -}}" >
248
- {% endif -%}
382
+ {% endif %}
249
383
 
250
- {%- include custom/custom_head_before_css.html -%}
384
+ {% include custom/custom_head_before_css.html %}
251
385
 
252
386
  <!-- CSS -->
253
- {% if site.comments.provider == 'cactus' -%}
254
- <!-- Cactus comments -->
255
- <script src="https://latest.cactus.chat/cactus.js"></script>
256
- <link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">
257
- {%- endif %}
387
+ {% if site.comments.provider == 'cactus' and page.show_comments %}
388
+ <!-- Cactus comments -->
389
+ <script src="https://latest.cactus.chat/cactus.js"></script>
390
+ <link rel="stylesheet" href="https://latest.cactus.chat/style.css" type="text/css">
391
+ {% endif %}
258
392
  <!-- Preconnect with Google Fonts -->
259
393
  <link rel="preconnect" href="https://fonts.googleapis.com">
260
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
261
- {% for font in site.googlefonts -%}
262
- {% if font.url -%}
394
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
395
+ {% for font in site.googlefonts %}
396
+ {% if font.url %}
263
397
  <link href="{{ font.url }}" rel="stylesheet">
264
- {%- endif %}
265
- {%- endfor %}
398
+ {% endif %}
399
+ {% endfor %}
266
400
  <!-- Fontawesome-->
267
401
  <!-- v6 -->
268
- {% assign fakit = site.fa5_kit_code | default: fa_kit_code %}
269
- {% if fakit -%}
402
+ {% assign fakit = site.fa5_kit_code | default: site.fa_kit_code %}
403
+ {% if fakit %}
270
404
  <script src="https://kit.fontawesome.com/{{ fakit }}.js" crossorigin="anonymous"></script>
271
- {%- else -%}
405
+ {% else %}
272
406
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@{{ site.fa_version | default: 6 }}/css/all.min.css">
273
- {%- endif %}
274
- {% if site.fa_v4_support -%}
407
+ {% endif %}
408
+ {% if site.fa_v4_support %}
275
409
  <!-- Compatibility with FontAwesome 4 -->
276
410
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/v4-shims.min.css">
277
- {%- endif %}
278
- {%- if page.show_applause %}
279
- <link rel="stylesheet" href="https://unpkg.com/applause-button/dist/applause-button.css">
280
- <script src="https://unpkg.com/applause-button/dist/applause-button.js"></script>
281
- {% endif -%}
282
- <link rel="preload" href="https://cdn.jsdelivr.net/gh/dieghernan/chulapa@master/assets/js/chulapa_script.js" as="script" >
283
- <link rel="preload" href="https://cdn.jsdelivr.net/gh/dieghernan/chulapa@master/assets/fonts/Chulapa/Chulapa-Bold_vmod.otf" as="font" type="font/otf" crossorigin>
411
+ {% endif %}
412
+ {% if include.theme_script %}
413
+ <link rel="preload" href="{{ '/assets/js/chulapa_script.js' | relative_url }}" as="script" >
414
+ {% endif %}
415
+ <link rel="preload" href="{{ '/assets/fonts/Chulapa/Chulapa-Bold_vmod.otf' | relative_url }}" as="font" type="font/otf" crossorigin>
416
+ {%- include snippets/dark-skin-enabled.html -%}
417
+ {% if dark_skin_enabled %}
418
+ {% include theme-styles.html %}
419
+ {% else %}
284
420
  <!-- Theme css (Bootstrap included) -->
285
421
  <link rel="stylesheet" id="maincss" href="{{- "assets/css/main.css " | absolute_url -}}" >
286
422
  <!-- Highlighter -->
287
423
  <link id="csshigh" rel="stylesheet" href="{{- "assets/css/highlighter.css " | absolute_url -}}" >
424
+ {% endif %}
288
425
  <!-- Custom css -->
289
426
  <link rel="stylesheet" href="{{- "assets/css/custom.css " | absolute_url -}}" >
290
- {% if page.mathjax -%}
427
+ {% if page.mathjax %}
291
428
  <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.min.js"></script>
292
- {%- endif %}
429
+ {% endif %}
293
430
 
294
- {%- if site.gtag_id %}
295
- <!-- Global site tag (gtag.js) - Google Analytics -->
296
- <script async src="https://www.googletagmanager.com/gtag/js?id={{- site.gtag_id -}}"></script>
297
- <script>
298
- window.dataLayer = window.dataLayer || [];
299
- function gtag(){dataLayer.push(arguments);}
300
- gtag('js', new Date());
431
+ {% if site.gtag_id %}
432
+ <!-- Global site tag (gtag.js) - Google Analytics -->
433
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{- site.gtag_id -}}"></script>
434
+ <script>
435
+ window.dataLayer = window.dataLayer || [];
436
+ function gtag(){dataLayer.push(arguments);}
437
+ gtag('js', new Date());
301
438
 
302
- gtag('config', '{{- site.gtag_id -}}');
303
- </script>
304
- {% endif -%}
305
- {%- if site.analytics_id %}
306
- <!-- Google Analytics -->
307
- <script>
308
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
309
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
310
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
311
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
439
+ gtag('config', '{{- site.gtag_id -}}');
440
+ </script>
441
+ {% endif %}
442
+ {% if site.analytics_id %}
443
+ <!-- Google Analytics -->
444
+ <script>
445
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
446
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
447
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
448
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
312
449
 
313
- ga('create', '{{- site.analytics_id -}}', 'auto');
314
- ga('send', 'pageview');
315
- </script>
316
- <!-- End Google Analytics -->
317
- {% endif -%}
318
- {%- include custom/custom_head.html -%}
450
+ ga('create', '{{- site.analytics_id -}}', 'auto');
451
+ ga('send', 'pageview');
452
+ </script>
453
+ <!-- End Google Analytics -->
454
+ {% endif %}
455
+ {%- assign goatcounter_endpoint = site.goatcounter | default: '' | strip -%}
456
+ {%- assign goatcounter_scheme = goatcounter_endpoint | slice: 0, 8 -%}
457
+ {%- assign goatcounter_parts = goatcounter_endpoint | split: '/' -%}
458
+ {%- assign goatcounter_host = goatcounter_parts[2] | default: '' | strip -%}
459
+ {% if jekyll.environment == 'production' and goatcounter_scheme == 'https://' and goatcounter_host != '' %}
460
+ <script data-goatcounter="{{ goatcounter_endpoint | escape }}" async src="https://gc.zgo.at/count.js"></script>
461
+ {% endif %}
462
+ {% include custom/custom_head.html %}
463
+ {% if site.navbar.style == 'fab' or site.navbar.style == 'dual' %}
464
+ <noscript><style>#navi-toggle { display: none !important; }</style></noscript>
465
+ {% endif %}
319
466
  </head>