chulapa-jekyll 1.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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +27 -0
- data/LICENSE +21 -0
- data/README.md +126 -0
- data/_includes/components/author.html +40 -0
- data/_includes/components/breadcrumbdatesocial.html +63 -0
- data/_includes/components/categories.html +15 -0
- data/_includes/components/disqus.html +24 -0
- data/_includes/components/headers.html +124 -0
- data/_includes/components/indexcards.html +48 -0
- data/_includes/components/navbeforeafter.html +22 -0
- data/_includes/components/tags.html +15 -0
- data/_includes/components/toc.html +112 -0
- data/_includes/custom/custom_bottomscripts.html +5 -0
- data/_includes/custom/custom_head.html +8 -0
- data/_includes/custom/custom_head_before_css.html +5 -0
- data/_includes/custom/giscus.html +1 -0
- data/_includes/footer.html +129 -0
- data/_includes/head.html +309 -0
- data/_includes/navbar.html +205 -0
- data/_includes/search/algolia.html +3 -0
- data/_includes/search/google.html +11 -0
- data/_includes/search/lunr.html +7 -0
- data/_includes/snippets/bootstrapdemo.html +1390 -0
- data/_includes/snippets/carousel.html +61 -0
- data/_includes/snippets/datetranslate.html +48 -0
- data/_includes/snippets/masonry.html +23 -0
- data/_includes/snippets/video.html +26 -0
- data/_includes/snippets/youtube.html +6 -0
- data/_layouts/archive.html +82 -0
- data/_layouts/cloudcategory.html +89 -0
- data/_layouts/cloudtag.html +86 -0
- data/_layouts/compress.html +10 -0
- data/_layouts/default.html +39 -0
- data/_layouts/indexcategory.html +36 -0
- data/_layouts/landingpage.html +51 -0
- data/_layouts/minimal.html +21 -0
- data/_layouts/search.html +59 -0
- data/_sass/bootstrap/_alert.scss +51 -0
- data/_sass/bootstrap/_badge.scss +54 -0
- data/_sass/bootstrap/_breadcrumb.scss +44 -0
- data/_sass/bootstrap/_button-group.scss +163 -0
- data/_sass/bootstrap/_buttons.scss +142 -0
- data/_sass/bootstrap/_card.scss +282 -0
- data/_sass/bootstrap/_carousel.scss +197 -0
- data/_sass/bootstrap/_close.scss +40 -0
- data/_sass/bootstrap/_code.scss +48 -0
- data/_sass/bootstrap/_custom-forms.scss +522 -0
- data/_sass/bootstrap/_dropdown.scss +192 -0
- data/_sass/bootstrap/_forms.scss +347 -0
- data/_sass/bootstrap/_functions.scss +141 -0
- data/_sass/bootstrap/_grid.scss +77 -0
- data/_sass/bootstrap/_images.scss +42 -0
- data/_sass/bootstrap/_input-group.scss +192 -0
- data/_sass/bootstrap/_jumbotron.scss +17 -0
- data/_sass/bootstrap/_list-group.scss +154 -0
- data/_sass/bootstrap/_media.scss +8 -0
- data/_sass/bootstrap/_mixins.scss +47 -0
- data/_sass/bootstrap/_modal.scss +241 -0
- data/_sass/bootstrap/_nav.scss +121 -0
- data/_sass/bootstrap/_navbar.scss +324 -0
- data/_sass/bootstrap/_pagination.scss +74 -0
- data/_sass/bootstrap/_popover.scss +170 -0
- data/_sass/bootstrap/_print.scss +141 -0
- data/_sass/bootstrap/_progress.scss +47 -0
- data/_sass/bootstrap/_reboot.scss +480 -0
- data/_sass/bootstrap/_root.scss +20 -0
- data/_sass/bootstrap/_spinners.scss +56 -0
- data/_sass/bootstrap/_tables.scss +185 -0
- data/_sass/bootstrap/_toasts.scss +44 -0
- data/_sass/bootstrap/_tooltip.scss +115 -0
- data/_sass/bootstrap/_transitions.scss +20 -0
- data/_sass/bootstrap/_type.scss +125 -0
- data/_sass/bootstrap/_utilities.scss +18 -0
- data/_sass/bootstrap/_variables.scss +1147 -0
- data/_sass/bootstrap/bootstrap-grid.scss +29 -0
- data/_sass/bootstrap/bootstrap-reboot.scss +12 -0
- data/_sass/bootstrap/bootstrap.scss +44 -0
- data/_sass/bootstrap/mixins/_alert.scss +13 -0
- data/_sass/bootstrap/mixins/_background-variant.scss +23 -0
- data/_sass/bootstrap/mixins/_badge.scss +17 -0
- data/_sass/bootstrap/mixins/_border-radius.scss +76 -0
- data/_sass/bootstrap/mixins/_box-shadow.scss +20 -0
- data/_sass/bootstrap/mixins/_breakpoints.scss +123 -0
- data/_sass/bootstrap/mixins/_buttons.scss +110 -0
- data/_sass/bootstrap/mixins/_caret.scss +62 -0
- data/_sass/bootstrap/mixins/_clearfix.scss +7 -0
- data/_sass/bootstrap/mixins/_deprecate.scss +10 -0
- data/_sass/bootstrap/mixins/_float.scss +14 -0
- data/_sass/bootstrap/mixins/_forms.scss +177 -0
- data/_sass/bootstrap/mixins/_gradients.scss +45 -0
- data/_sass/bootstrap/mixins/_grid-framework.scss +81 -0
- data/_sass/bootstrap/mixins/_grid.scss +69 -0
- data/_sass/bootstrap/mixins/_hover.scss +37 -0
- data/_sass/bootstrap/mixins/_image.scss +36 -0
- data/_sass/bootstrap/mixins/_list-group.scss +21 -0
- data/_sass/bootstrap/mixins/_lists.scss +7 -0
- data/_sass/bootstrap/mixins/_nav-divider.scss +11 -0
- data/_sass/bootstrap/mixins/_pagination.scss +22 -0
- data/_sass/bootstrap/mixins/_reset-text.scss +17 -0
- data/_sass/bootstrap/mixins/_resize.scss +6 -0
- data/_sass/bootstrap/mixins/_screen-reader.scss +34 -0
- data/_sass/bootstrap/mixins/_size.scss +7 -0
- data/_sass/bootstrap/mixins/_table-row.scss +39 -0
- data/_sass/bootstrap/mixins/_text-emphasis.scss +17 -0
- data/_sass/bootstrap/mixins/_text-hide.scss +11 -0
- data/_sass/bootstrap/mixins/_text-truncate.scss +8 -0
- data/_sass/bootstrap/mixins/_transition.scss +26 -0
- data/_sass/bootstrap/mixins/_visibility.scss +8 -0
- data/_sass/bootstrap/utilities/_align.scss +8 -0
- data/_sass/bootstrap/utilities/_background.scss +19 -0
- data/_sass/bootstrap/utilities/_borders.scss +75 -0
- data/_sass/bootstrap/utilities/_clearfix.scss +3 -0
- data/_sass/bootstrap/utilities/_display.scss +26 -0
- data/_sass/bootstrap/utilities/_embed.scss +39 -0
- data/_sass/bootstrap/utilities/_flex.scss +51 -0
- data/_sass/bootstrap/utilities/_float.scss +11 -0
- data/_sass/bootstrap/utilities/_interactions.scss +5 -0
- data/_sass/bootstrap/utilities/_overflow.scss +5 -0
- data/_sass/bootstrap/utilities/_position.scss +32 -0
- data/_sass/bootstrap/utilities/_screenreaders.scss +11 -0
- data/_sass/bootstrap/utilities/_shadows.scss +6 -0
- data/_sass/bootstrap/utilities/_sizing.scss +20 -0
- data/_sass/bootstrap/utilities/_spacing.scss +73 -0
- data/_sass/bootstrap/utilities/_stretched-link.scss +19 -0
- data/_sass/bootstrap/utilities/_text.scss +71 -0
- data/_sass/bootstrap/utilities/_visibility.scss +13 -0
- data/_sass/bootstrap/vendor/_rfs.scss +204 -0
- data/_sass/bootstrapv5-migration.scss +79 -0
- data/_sass/chulapa-classes.scss +844 -0
- data/_sass/chulapa-master.scss +11 -0
- data/_sass/chulapa-misc.scss +105 -0
- data/_sass/chulapa-mixins.scss +77 -0
- data/_sass/chulapa-vars.scss +48 -0
- data/_sass/highlight/README.md +23 -0
- data/_sass/highlight/UNLICENSE.txt +24 -0
- data/_sass/highlight/autumn.scss +58 -0
- data/_sass/highlight/borland.scss +46 -0
- data/_sass/highlight/bw.scss +34 -0
- data/_sass/highlight/colorful.scss +61 -0
- data/_sass/highlight/cran.scss +169 -0
- data/_sass/highlight/default.scss +61 -0
- data/_sass/highlight/dracula.scss +169 -0
- data/_sass/highlight/emacs.scss +61 -0
- data/_sass/highlight/friendly.scss +61 -0
- data/_sass/highlight/fruity.scss +70 -0
- data/_sass/highlight/github.scss +61 -0
- data/_sass/highlight/gruvbox.light.scss +84 -0
- data/_sass/highlight/manni.scss +61 -0
- data/_sass/highlight/monokai.scss +65 -0
- data/_sass/highlight/murphy.scss +61 -0
- data/_sass/highlight/native.scss +70 -0
- data/_sass/highlight/pastie.scss +60 -0
- data/_sass/highlight/perldoc.scss +58 -0
- data/_sass/highlight/skeletor.scss +140 -0
- data/_sass/highlight/tango.scss +69 -0
- data/_sass/highlight/thankful_eyes.scss +173 -0
- data/_sass/highlight/trac.scss +59 -0
- data/_sass/highlight/vim.scss +70 -0
- data/_sass/highlight/vs.scss +33 -0
- data/_sass/highlight/zenburn.scss +136 -0
- data/_sass/reset-algolia.scss +24 -0
- data/_sass/skins/academia.scss +26 -0
- data/_sass/skins/auto.scss +26 -0
- data/_sass/skins/chulapa.scss +52 -0
- data/_sass/skins/deeply.scss +89 -0
- data/_sass/skins/graymor.scss +26 -0
- data/_sass/skins/hootstrap.scss +17 -0
- data/_sass/skins/journal.scss +142 -0
- data/_sass/skins/lux.scss +377 -0
- data/_sass/skins/lymcha.scss +14 -0
- data/_sass/skins/minty.scss +165 -0
- data/_sass/skins/none.scss +2 -0
- data/_sass/skins/pear.scss +21 -0
- data/_sass/skins/preptor.scss +19 -0
- data/_sass/skins/sketchy.scss +745 -0
- data/_sass/skins/sunset.scss +14 -0
- data/_sass/skins/twitter-dim.scss +30 -0
- data/_sass/skins/twitter-lights-out.scss +31 -0
- data/_sass/skins/twitter.scss +30 -0
- data/_sass/skins/universal.scss +24 -0
- data/_sass/skins/wandoo.scss +15 -0
- data/assets/atom.xml +72 -0
- data/assets/css/custom.scss +4 -0
- data/assets/css/highlighter.scss +5 -0
- data/assets/css/main.scss +35 -0
- 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-Bold_vmod.otf +0 -0
- data/assets/fonts/Chulapa/Chulapa-Light.otf +0 -0
- data/assets/fonts/Chulapa/Chulapa-Regular.otf +0 -0
- data/assets/fonts/Chulapa/LICENCIA DE USO.txt +2 -0
- data/assets/fonts/Ferpal/Ferpal-Regular.otf +0 -0
- data/assets/js/algolia/algolia-search.js +148 -0
- data/assets/js/ch_ytdefer/ch_ytdefer.js +81 -0
- data/assets/js/ch_ytdefer/ch_ytdefer.min.js +1 -0
- data/assets/js/clipboardrouge.js +95 -0
- data/assets/js/google/google-search.js +24 -0
- data/assets/js/lunr/lunr-search.js +122 -0
- data/assets/js/lunr/lunr-store.js +35 -0
- data/assets/rss.xml +65 -0
- metadata +356 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 01b74df06b414b3f7a91a57e4752f465d015d49de4eb381b4935e1378606bfec
|
4
|
+
data.tar.gz: 12fd46079fe2cbcdfe04a57841324dca42590b1a1f4464bf357ad5bea1dbb6be
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 57392015f7ddf716eaeaaac862f8725b95273051b76ee38393d659a54a7ae88be170329cf0f3c342e18b219437f8fb0b71f6ae18ba0b90ca365d14f473dce422
|
7
|
+
data.tar.gz: d781dac4d4298b96244f9712e118d4e085a9c4ef882be1925ec7f66d5adc3ca019c259f2a09eea191776dcf248757ea13fc4abc54aed511dbc1be6d5180a4dc9
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
## v1.0.0 - 2022-11-24
|
2
|
+
|
3
|
+
- [x] Bump version on `head`
|
4
|
+
- [ ] Bump version on docs
|
5
|
+
- [ ] Bump version on `chulapa-101` remote theme
|
6
|
+
|
7
|
+
## v1.0.0-beta.1 - 2020-07-28
|
8
|
+
|
9
|
+
Pre-release - first stable beta of the software
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- First stable beta - Software is public
|
14
|
+
|
15
|
+
### Changed
|
16
|
+
|
17
|
+
-
|
18
|
+
|
19
|
+
### Removed
|
20
|
+
|
21
|
+
-
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
|
25
|
+
-
|
26
|
+
|
27
|
+
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2020 dieghernan
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
[![Chulapa live preview][2]][1]
|
2
|
+
|
3
|
+
[1]: https://dieghernan.github.io/chulapa/
|
4
|
+
[2]: https://dieghernan.github.io/chulapa/assets/img/site/banner.png (live preview)
|
5
|
+
|
6
|
+

|
7
|
+

|
8
|
+

|
9
|
+

|
10
|
+

|
11
|
+

|
12
|
+

|
13
|
+

|
14
|
+

|
15
|
+

|
16
|
+

|
17
|
+

|
18
|
+

|
19
|
+

|
20
|
+
[](https://ko-fi.com/dieghernan)
|
21
|
+
|
22
|
+
# [Chulapa](https://dieghernan.github.io/chulapa/)
|
23
|
+
|
24
|
+
### A full flexible Jekyll theme for Github Pages
|
25
|
+
|
26
|
+
## Notable features
|
27
|
+
|
28
|
+
- **Bootstrap 4** - Fully responsive
|
29
|
+
- **Fontawesome 6** - v5 also supported. v4 is supported via shims but would be deprecated at some point
|
30
|
+
- **3 different navbar styles**
|
31
|
+
- **Atom and RSS 2.0** feed
|
32
|
+
- **Internal search** by Algolia, Lunr or Google Custom Search
|
33
|
+
- **Comments** by Disqus and Giscus
|
34
|
+
- **Masonry gallery**
|
35
|
+
- **Video support** - self-hosted or from core providers: Youtube, Vimeo, DailyMotion...
|
36
|
+
- **Structured data** for better SEO
|
37
|
+
- **Code highlight** - +20 Pygment styles
|
38
|
+
- **Mathjax** inside
|
39
|
+
- **Google Analytics**
|
40
|
+
- **Twitter Cards** and **Open Graph** data valid for Facebook, LinkedIn and WhatsApp
|
41
|
+
- **14+ preinstalled skins**
|
42
|
+
- **Powerful look-and-feel customization** with a dedicated sandbox
|
43
|
+
- **Archive, cloud tag and index special layouts**
|
44
|
+
- **Do you like breadcrumbs?** We have it.
|
45
|
+
- **Multiple authors** with location, picture and social links. Travel blogs and colaborative sites welcome!
|
46
|
+
|
47
|
+
A great alternative for blogs, news, portfolios and personal sites. Want to know more? [Go to Docs](https://dieghernan.github.io/chulapa/docs/01-install).
|
48
|
+
|
49
|
+
## Installation
|
50
|
+
### A. Remote theme method
|
51
|
+
|
52
|
+
By using `jekyll-remote-theme` your repo would have remote access to the content of these folders:
|
53
|
+
|
54
|
+
- `assets`
|
55
|
+
- `_layouts`
|
56
|
+
- `_includes`
|
57
|
+
- `_sass`
|
58
|
+
|
59
|
+
This method allows you to get updates easily
|
60
|
+
|
61
|
+
#### Fresh start
|
62
|
+
|
63
|
+
Create a Github account, go to [chulapa-101 repo](https://github.com/dieghernan/chulapa-101), fork it and quickstart your site!
|
64
|
+
|
65
|
+
#### Migrate
|
66
|
+
|
67
|
+
You can migrate an existing page adding this line to your `_config.yml` and make sure to remove any previous theme or remote theme parameter:
|
68
|
+
|
69
|
+
```yaml
|
70
|
+
remote_theme: dieghernan/chulapa
|
71
|
+
|
72
|
+
... more config options
|
73
|
+
```
|
74
|
+
|
75
|
+
|
76
|
+
### B. Fork the base repository [Advance users only]
|
77
|
+
|
78
|
+
You can fork [the base repo](https://github.com/dieghernan/chulapa/generate) and modify it. However, the site would be frozen at the moment of forking and it would make harder for you to get potential new features and upgrades.
|
79
|
+
|
80
|
+
The minimal files and folders you need are:
|
81
|
+
|
82
|
+
- `assets`
|
83
|
+
- `_layouts`
|
84
|
+
- `_includes`
|
85
|
+
- `_sass`
|
86
|
+
- `Gemfile`
|
87
|
+
- `_config.yml`
|
88
|
+
|
89
|
+
Sample `_config` file [here](https://github.com/dieghernan/chulapa/blob/master/_config.yml).
|
90
|
+
|
91
|
+
## Configuration and Layouts
|
92
|
+
|
93
|
+
You have available an extensive documentation [here](https://dieghernan.github.io/chulapa/docs/01-install)
|
94
|
+
|
95
|
+
## License
|
96
|
+
|
97
|
+
[The MIT License](https://dieghernan.github.io/chulapa/license)
|
98
|
+
|
99
|
+
## Attributions
|
100
|
+
|
101
|
+
**Chulapa** is a font owned by the City Council of Madrid designed and produced by Joancarles Casasín y Pablo Gámez on a previous design of Silvia Fernández Palomar licensed under [Creative Commons CC BY, Versión 4.0](https://creativecommons.org/licenses/by/4.0/). This theme incorporates a modification of this work in order to provide support to the english language.
|
102
|
+
|
103
|
+
Bootstrap v.4.5 is released under the [MIT license](https://github.com/twbs/bootstrap/blob/v4.5.0/LICENSE) and is copyright 2020 Twitter.
|
104
|
+
|
105
|
+
Fontawesome 6.x is free, open source, and GPL friendly - [License](https://fontawesome.com/license/free) (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License).
|
106
|
+
|
107
|
+
This theme incorporates some pieces of code from [Minimal Mistakes](https://mmistakes.github.io/minimal-mistakes/), Copyright (c) 2013-2020 [Michael Rose](https://mademistakes.com/) and contributors distributed under the terms of the [MIT license](https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE).
|
108
|
+
|
109
|
+
This theme incorporates [Pygments CSS Themes](http://jwarby.github.io/jekyll-pygments-themes/languages/javascript.html), developed by [jwarby](https://github.com/jwarby/) distributed under the terms of [The Unlicense](https://github.com/jwarby/jekyll-pygments-themes/blob/master/UNLICENSE.txt).
|
110
|
+
|
111
|
+
This theme incorporates [Ferpal Sans](https://www.silviaferpal.com/portfolio-1/ferpalsans) developed by Silvia Ferpal and it's free for personal use.
|
112
|
+
|
113
|
+
This theme incorporates [Jekyll Pure Liquid Table of Contents](https://github.com/allejo/jekyll-toc), Copyright © 2017 [Vladimir "allejo" Jimenez](https://github.com/allejo) distributed under the terms of the [MIT license](https://github.com/allejo/jekyll-toc/blob/master/LICENSE.MIT.md).
|
114
|
+
|
115
|
+
This theme incorporates [Compress HTML in Jekyll](http://jch.penibelst.de/), Copyright (c) 2014 [Anatol Broder](https://github.com/penibelst) distributed under the terms of the [MIT license](https://github.com/penibelst/jekyll-compress-html/blob/master/LICENSE).
|
116
|
+
|
117
|
+
This theme incorporates [Lunr](http://lunrjs.com),
|
118
|
+
Copyright (c) 2013 Oliver Nightingale.
|
119
|
+
Lunr is distributed under the terms of the [MIT License](https://github.com/olivernn/lunr.js/blob/master/LICENSE).
|
120
|
+
|
121
|
+
This theme uses graphic resources from [Unplash](https://unsplash.com/@dieghernan/collections).
|
122
|
+
|
123
|
+
This theme uses graphic resources from [Pexels](https://www.pexels.com/@dieghernan-3081919/collections/).
|
124
|
+
|
125
|
+
This theme uses graphic resources from [Lorem Picsum](https://picsum.photos/).
|
126
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
{%- if page.author -%}
|
2
|
+
{%- assign avatar = page.author.avatar -%}
|
3
|
+
{%- assign name = page.author.name -%}
|
4
|
+
{%- assign location = page.author.location -%}
|
5
|
+
{%- assign links = page.author.links -%}
|
6
|
+
{%- else -%}
|
7
|
+
{%- assign avatar = site.author.avatar -%}
|
8
|
+
{%- assign name = site.author.name | default: site.github.owner_name -%}
|
9
|
+
{%- assign location = site.author.location -%}
|
10
|
+
{%- assign links = site.author.links -%}
|
11
|
+
{%- endif -%}
|
12
|
+
<div class="row d-flex align-items-center mb-2">
|
13
|
+
{%- if avatar -%}
|
14
|
+
<img src="{{ avatar | absolute_url }}" alt="{{ name }}" class="ml-3 mr-0 mx-lg-auto mb-lg-1 chulapa-avatar-size">
|
15
|
+
{%- endif -%}
|
16
|
+
<div class="col-9 col-lg-12 text-lg-center">
|
17
|
+
{{ name }}
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
<div class="row mb-2 mb-lg-0">
|
21
|
+
<div class="col text-lg-center">
|
22
|
+
{%- if location -%}
|
23
|
+
<address class="d-inline d-lg-block mr-2 mx-lg-auto mb-lg-2 small chulapa-links-hover-only">
|
24
|
+
<a class="pr-lg-0" href="https://www.google.com/maps/search/?api=1&query={{- location | url_encode | replace: '%20', '+' -}}">
|
25
|
+
<i class="fas fa-map-marker-alt fa-lg mr-1" aria-hidden="true"></i>{{ location }}</a>
|
26
|
+
</address>
|
27
|
+
{%- endif -%}
|
28
|
+
{%- if links -%}
|
29
|
+
<div class="d-inline my-1 mx-lg-0 chulapa-links-hover-only">
|
30
|
+
{%- for item in links -%}
|
31
|
+
{%- if item.url contains "@" -%}
|
32
|
+
<a class="mr-2 mx-lg-1" href="mailto:{{ item.url }}?subject={{ site.title | append: ' web - ' | append: page.title | strip_html | uri_escape }}"><i class="{{ item.icon }} fa-lg"></i></a>
|
33
|
+
{%- else -%}
|
34
|
+
<a class="mr-2 mx-lg-1" href="{{ item.url }}"><i class="{{ item.icon }} fa-lg"></i></a>
|
35
|
+
{%- endif -%}
|
36
|
+
{%- endfor -%}
|
37
|
+
</div>
|
38
|
+
{%- endif -%}
|
39
|
+
</div>
|
40
|
+
</div>
|
@@ -0,0 +1,63 @@
|
|
1
|
+
{%- assign canonical_url = page.url | replace: "index.html", "" | absolute_url | uri_escape -%}
|
2
|
+
{%- assign sharetitle = page.title | default: site.title | default: site.github.repository_name | strip_html -%}
|
3
|
+
{% assign tagsize = page.tags | size %}
|
4
|
+
<div class="row my-1">
|
5
|
+
<div class="col-lg-6 offset-lg-2 col small">
|
6
|
+
{% if page.show_breadcrumb %}
|
7
|
+
<nav aria-label="breadcrumb">
|
8
|
+
<ol class="breadcrumb my-0 py-0 chulapa-bg-transparent pl-0" itemscope itemtype="https://schema.org/BreadcrumbList">
|
9
|
+
{% if page.breadcrumb_list %}
|
10
|
+
{% for item in page.breadcrumb_list %}
|
11
|
+
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
|
12
|
+
itemtype="https://schema.org/ListItem"><a href="{{ item.url | absolute_url }}" itemprop="item"><span itemprop="name">{{ item.label }}</span></a>
|
13
|
+
<meta itemprop="position" content="{{ forloop.index }}" /></li>
|
14
|
+
{% if forloop.last %}
|
15
|
+
{% assign loopplus1 = forloop.index | plus: 1 %}
|
16
|
+
{% endif %}
|
17
|
+
{% endfor %}
|
18
|
+
<li class="breadcrumb-item active" aria-current="page" itemprop="itemListElement" itemscope
|
19
|
+
itemtype="https://schema.org/ListItem">
|
20
|
+
<span itemprop="name">{{ page.title }}</span>
|
21
|
+
<meta itemprop="position" content="{{ loopplus1 }}" />
|
22
|
+
</li>
|
23
|
+
{% else %}
|
24
|
+
<li class="breadcrumb-item" itemprop="itemListElement" itemscope
|
25
|
+
itemtype="https://schema.org/ListItem"><a href="{{ "/" | absolute_url }}" itemprop="item"><span itemprop="name">{{ site.navbar.brand.title | default: site.title | default: site.github.repository_name }}</span></a>
|
26
|
+
<meta itemprop="position" content="1" /></li>
|
27
|
+
<li class="breadcrumb-item active" aria-current="page" itemprop="itemListElement" itemscope
|
28
|
+
itemtype="https://schema.org/ListItem">
|
29
|
+
<span itemprop="name">{{ page.title }}</span>
|
30
|
+
<meta itemprop="position" content="2" />
|
31
|
+
</li>
|
32
|
+
{% endif %}
|
33
|
+
</ol>
|
34
|
+
</nav>
|
35
|
+
{% endif %}
|
36
|
+
{%- if page.date and page.show_date -%}
|
37
|
+
<div class="chulapaDateSocial">
|
38
|
+
{% if page.last_modified_at %}
|
39
|
+
{%- assign dateformat1 = page.last_modified_at | date_to_string -%}
|
40
|
+
{%- assign dateformat2 = page.date | date_to_string -%}
|
41
|
+
<time datetime="{{ page.last_modified_at | date_to_xmlschema }}">{% include_cached snippets/datetranslate.html date=dateformat1 %}</time>
|
42
|
+
<i class="fa fa-redo fa-xs" aria-hidden="true"></i>
|
43
|
+
<br>
|
44
|
+
<span class="font-weight-light chulapa-text-line-through">{% include_cached snippets/datetranslate.html date=dateformat2 %}</span>
|
45
|
+
{% else %}
|
46
|
+
{%- assign dateformat = page.date | date_to_string -%}
|
47
|
+
<time datetime="{{ page.date | date_to_xmlschema }}">{% include_cached snippets/datetranslate.html date=dateformat %}</time>
|
48
|
+
{% endif %}
|
49
|
+
</div>
|
50
|
+
{%- endif -%}
|
51
|
+
|
52
|
+
</div>
|
53
|
+
{%- if page.show_sociallinks -%}
|
54
|
+
<div class="col-lg-2 col-3 text-right lead chulapaDateSocial">
|
55
|
+
<a href="https://twitter.com/intent/tweet?url={{ canonical_url }}&text={{ sharetitle | url_encode }}{%- if site.twitter_site -%}&via={{- site.twitter_site -}}{%- endif -%}{%- if tagsize > 0 -%}&hashtags={{- page.tags | join: "," | replace: " ", "-" | replace: "-", "" -}}{%- endif -%}" title="Share on Twitter"><i class="fab fa-twitter-square fa-lg" aria-hidden="true"></i></a>
|
56
|
+
<a class="d-none d-sm-inline" href="https://www.facebook.com/sharer.php?u={{ canonical_url }}" title="Share on Facebook"><i class="fab fa-facebook-square fa-lg" aria-hidden="true"></i></a>
|
57
|
+
|
58
|
+
<a href="https://api.whatsapp.com/send?&text={{ sharetitle | url_encode }}%20{{ canonical_url }}" title="Share on Whatsapp"><i class="fab fa-whatsapp-square fa-lg" aria-hidden="true"></i></a>
|
59
|
+
<a class="d-none d-sm-inline" href="https://www.linkedin.com/shareArticle?url={{ canonical_url }}&title={{ sharetitle | url_encode }}" title="Share on LinkedIn"><i class="fab fa-linkedin fa-lg" aria-hidden="true"></i></a>
|
60
|
+
|
61
|
+
</div>
|
62
|
+
{%- endif -%}
|
63
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{% assign size = page.categories | size %}
|
2
|
+
{% if size > 0 %}
|
3
|
+
<div class="container-lg my-1">
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-lg-8 offset-lg-2 col">
|
6
|
+
<i class="far fa-folder-open fa-xs" aria-hidden="true"></i>
|
7
|
+
{%- for category in page.categories %}
|
8
|
+
<a href="{{- category | replace: " ", "-" | prepend: "#" |
|
9
|
+
prepend: page.cloudcategory_url |
|
10
|
+
absolute_url | uri_escape -}}" class="badge chulapa-pill-bg-secondary">{{- category -}}</a>
|
11
|
+
{% endfor -%}
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
{% endif %}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
{% if site.comments.disqus_shortname %}
|
2
|
+
<div class="container-lg">
|
3
|
+
<div class="row">
|
4
|
+
<div id="disqus_thread" class="col-lg-8 offset-lg-2"></div>
|
5
|
+
<script>
|
6
|
+
var disqus_config = function () {
|
7
|
+
this.page.url = "{{ include.pageurl | absolute_url }}"; // Replace PAGE_URL with your page's canonical URL variable
|
8
|
+
this.page.identifier = "{{ include.pageid }}"; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
|
9
|
+
};
|
10
|
+
|
11
|
+
(function() { // DON'T EDIT BELOW THIS LINE
|
12
|
+
var d = document, s = d.createElement('script');
|
13
|
+
s.src = 'https://{{ site.comments.disqus_shortname }}.disqus.com/embed.js';
|
14
|
+
s.setAttribute('data-timestamp', +new Date());
|
15
|
+
(d.head || d.body).appendChild(s);
|
16
|
+
})();
|
17
|
+
</script>
|
18
|
+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
{% endif %}
|
@@ -0,0 +1,124 @@
|
|
1
|
+
{%- if include.headertype =="splash" -%}
|
2
|
+
{%- if include.imghero -%}
|
3
|
+
<header class="d-flex align-items-center splash-chulapa-image" style="background-image: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.7)), url('{{ include.imghero | absolute_url }}')">
|
4
|
+
{%- else -%}
|
5
|
+
<header class="d-flex align-items-center splash-chulapa">
|
6
|
+
{%- endif -%}
|
7
|
+
<div class="container-lg">
|
8
|
+
<h1>{{- page.title | default: "Where's your title?" -}}</h1>
|
9
|
+
{%- if page.subtitle -%}
|
10
|
+
<hr class="my-3">
|
11
|
+
<p class="chulapa-subtitle">{{- page.subtitle -}}</p>
|
12
|
+
{%- endif -%}
|
13
|
+
{% if include.projects %}
|
14
|
+
<div class="btn-group-vertical btn-group-lg mt-5 text-center" role="group">
|
15
|
+
{% for project in include.projects %}
|
16
|
+
<a href="{{ project.url | absolute_url }}" class="btn chulapa-btn-project" role="button" aria-disabled="true">
|
17
|
+
{% if project.icon %}<i class="{{ project.icon }} fa-lg mr-2"></i>{% endif %}{{ project.label }}</a>
|
18
|
+
{% endfor %}
|
19
|
+
</div>
|
20
|
+
{% endif %}
|
21
|
+
</div>
|
22
|
+
</header>
|
23
|
+
{%- elsif include.headertype == "hero" -%}
|
24
|
+
{%- if include.imghero -%}
|
25
|
+
<header class="d-flex align-items-center hero-chulapa-image" style="background-image: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.7)), url('{{ include.imghero | absolute_url }}')">
|
26
|
+
{%- else -%}
|
27
|
+
<header class="d-flex align-items-center hero-chulapa">
|
28
|
+
{%- endif -%}
|
29
|
+
<div class="container-lg py-4">
|
30
|
+
<h1>{{- page.title | default: "Where's your title?" -}}</h1>
|
31
|
+
{%- if page.subtitle -%}
|
32
|
+
<hr class="my-3">
|
33
|
+
<p class="chulapa-subtitle">{{- page.subtitle -}}</p>
|
34
|
+
{%- endif -%}
|
35
|
+
{% if include.projects %}
|
36
|
+
<div class="btn-group-vertical btn-group-lg mt-2 text-center" role="group">
|
37
|
+
{% for project in include.projects %}
|
38
|
+
<a href="{{ project.url | absolute_url }}" class="btn chulapa-btn-project" role="button" aria-disabled="true">
|
39
|
+
{% if project.icon %}<i class="{{ project.icon }} fa-lg mr-2"></i>{% endif %}{{ project.label }}</a>
|
40
|
+
{% endfor %}
|
41
|
+
</div>
|
42
|
+
{% endif %}
|
43
|
+
</div>
|
44
|
+
</header>
|
45
|
+
{%- elsif include.headertype == "base" -%}
|
46
|
+
<header class="text-center header-chulapa">
|
47
|
+
{%- if include.imghero -%}
|
48
|
+
<div class="container-fluid header-chulapa-img" style="background-image: url('{{ include.imghero | absolute_url }}')">
|
49
|
+
</div>
|
50
|
+
{%- endif -%}
|
51
|
+
<div class="container-lg mt-2">
|
52
|
+
<div class="row">
|
53
|
+
<div class="col-lg-8 offset-lg-2">
|
54
|
+
<h1>{{- page.title | default: "Where's your title?" -}}</h1>
|
55
|
+
{%- if page.subtitle -%}
|
56
|
+
<p class="lead chulapa-subtitle">{{- page.subtitle -}}</p>
|
57
|
+
{%- endif -%}
|
58
|
+
{% if include.projects %}
|
59
|
+
<div class="btn-group btn-group-sm my-1 text-center" role="group">
|
60
|
+
{% for project in include.projects %}
|
61
|
+
<a href="{{ project.url | absolute_url }}" class="btn btn-primary py-1" role="button" aria-disabled="true">{% if project.icon %}<i class="{{ project.icon }} fa-lg mr-2"></i>{% endif %}{{ project.label }}</a>
|
62
|
+
{% endfor %}
|
63
|
+
</div>
|
64
|
+
{% endif %}
|
65
|
+
<hr class="mb-0">
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
</header>
|
70
|
+
{%- elsif include.headertype == "image" -%}
|
71
|
+
<header class="text-center header-chulapa">
|
72
|
+
{%- if include.imghero -%}
|
73
|
+
<div class="container-fluid">
|
74
|
+
<img src="{{ include.imghero | absolute_url }}" alt="banner {{ page.title }}" class="chulapa-header-image mw-100">
|
75
|
+
</div>
|
76
|
+
{%- endif -%}
|
77
|
+
<div class="container-lg mt-2">
|
78
|
+
<div class="row">
|
79
|
+
<div class="col-lg-8 offset-lg-2">
|
80
|
+
<h1>{{- page.title | default: "Where's your title?" -}}</h1>
|
81
|
+
{%- if page.subtitle -%}
|
82
|
+
<p class="lead chulapa-subtitle">{{- page.subtitle -}}</p>
|
83
|
+
{%- endif -%}
|
84
|
+
{% if include.projects %}
|
85
|
+
<div class="btn-group btn-group-sm my-1 text-center" role="group">
|
86
|
+
{% for project in include.projects %}
|
87
|
+
<a href="{{ project.url | absolute_url }}" class="btn btn-primary py-1" role="button" aria-disabled="true">{% if project.icon %}<i class="{{ project.icon }} fa-lg mr-2"></i>{% endif %}{{ project.label }}</a>
|
88
|
+
{% endfor %}
|
89
|
+
</div>
|
90
|
+
{% endif %}
|
91
|
+
<hr class="mb-0">
|
92
|
+
</div>
|
93
|
+
</div>
|
94
|
+
</div>
|
95
|
+
</header>
|
96
|
+
{%- elsif include.headertype == "post" -%}
|
97
|
+
<header class="header-chulapa">
|
98
|
+
{%- if include.imghero -%}
|
99
|
+
<div class="container-fluid header-chulapa-img w-100" style="background-image: url('{{ include.imghero | absolute_url }}')">
|
100
|
+
</div>
|
101
|
+
{%- endif -%}
|
102
|
+
<div class="container-lg mt-2">
|
103
|
+
<div class="row">
|
104
|
+
<div class="col-lg-8 offset-lg-2">
|
105
|
+
<h1>{{- page.title | default: "Where's your title?" -}}</h1>
|
106
|
+
{%- if page.subtitle -%}
|
107
|
+
<p class="lead chulapa-subtitle">{{- page.subtitle -}}</p>
|
108
|
+
{%- endif -%}
|
109
|
+
{% if include.projects %}
|
110
|
+
<div class="btn-group btn-group-sm my-1 text-center" role="group">
|
111
|
+
{% for project in include.projects %}
|
112
|
+
<a href="{{ project.url | absolute_url }}" class="btn btn-primary py-1" role="button" aria-disabled="true">{% if project.icon %}<i class="{{ project.icon }} fa-lg mr-2"></i>{% endif %}{{ project.label }}</a>
|
113
|
+
{% endfor %}
|
114
|
+
</div>
|
115
|
+
{% endif %}
|
116
|
+
|
117
|
+
<hr class="mb-0">
|
118
|
+
</div>
|
119
|
+
</div>
|
120
|
+
</div>
|
121
|
+
</header>
|
122
|
+
{% else %}
|
123
|
+
<!-- No header -->
|
124
|
+
{%- endif -%}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
{%- assign alldocs = include.cacheddocs -%}
|
2
|
+
{% for post in alldocs limit: include.cachedlimit %}
|
3
|
+
<div class="col-12 mb-2">
|
4
|
+
<div class="card border-primary ">
|
5
|
+
<div class="row g-0">
|
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
|
+
{% if post.header_img or post.og_image -%} style="background-image: url('{{- post.og_image | default: post.header_img | absolute_url -}}')"{%-endif-%}>
|
8
|
+
</a>
|
9
|
+
<div class="col-sm">
|
10
|
+
<article class="card-body chulapa-links-hover-only">
|
11
|
+
<a href="{{- post.url | absolute_url -}}"><h5 class="card-title">{{- post.title | default: "---" -}}</h5></a>
|
12
|
+
{% if post.subtitle -%}<h6 class="card-subtitle mb-2 text-muted">{{- post.subtitle -}}</h6>{%- endif %}
|
13
|
+
|
14
|
+
{%- assign fallbackdesc = post.content |
|
15
|
+
markdownify | newline_to_br |
|
16
|
+
replace:"<br />", ",.," |
|
17
|
+
replace:"{{", ",.," |
|
18
|
+
replace:"{%", ",.," |
|
19
|
+
split: ",.," | first -%}
|
20
|
+
<div class="card-text">{{- post.excerpt | default: fallbackdesc | strip_html |
|
21
|
+
escape_once -}}
|
22
|
+
</div>
|
23
|
+
</article>
|
24
|
+
{% if post.date or post.show_tags or post.show_categories %}
|
25
|
+
<div class="border-top-0 card-footer border-primary chulapa-bg-transparent">
|
26
|
+
{% if post.date -%}<p class="small text-right font-italic mb-1">
|
27
|
+
{% if post.last_modified_at %}
|
28
|
+
<i class="fa fa-redo fa-xs" aria-hidden="true"></i> {% endif %}
|
29
|
+
<time datetime="{{- post.date | date_to_xmlschema -}}">{{- post.date | date: "%d/%m/%Y" -}}</time></p>{%- endif %}
|
30
|
+
{%- for category in post.categories -%}
|
31
|
+
<a href="{{- category | replace: " ", "-" | prepend: "#" |
|
32
|
+
prepend: post.cloudcategory_url |
|
33
|
+
absolute_url | uri_escape -}}" class="badge chulapa-pill-bg-secondary mx-1">{{- category -}}
|
34
|
+
</a>
|
35
|
+
{%- endfor -%}
|
36
|
+
{%- for tag in post.tags -%}
|
37
|
+
<a href="{{- tag | replace: " ", "-" | prepend: "#" |
|
38
|
+
prepend: post.cloudtag_url |
|
39
|
+
absolute_url | uri_escape -}}" class="badge chulapa-pill-bg-primary mx-1">{{- tag -}}
|
40
|
+
</a>
|
41
|
+
{%- endfor -%}
|
42
|
+
</div>
|
43
|
+
{% endif %}
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
{% endfor %}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{%- assign classitemnext = "invisible" -%}
|
2
|
+
{%- if page.next.url -%}
|
3
|
+
{%- assign classitemnext = "" -%}
|
4
|
+
{%- endif -%}
|
5
|
+
{%- assign classitemprevious = "invisible" -%}
|
6
|
+
{%- if page.previous.url -%}
|
7
|
+
{%- assign classitemprevious = "" -%}
|
8
|
+
{%- endif -%}
|
9
|
+
|
10
|
+
<nav aria-label="Navigation" class="container-lg chulapa-pagination ">
|
11
|
+
<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">
|
14
|
+
<i class="fa fa-chevron-left" aria-hidden="true"></i><span class="sr-only">Previous</span>
|
15
|
+
</a>
|
16
|
+
</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 }}">
|
19
|
+
<i class="fa fa-chevron-right" aria-hidden="true"></i><span class="sr-only">Next</span></a>
|
20
|
+
</li>
|
21
|
+
</ul>
|
22
|
+
</nav>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{% assign size = page.tags | size %}
|
2
|
+
{% if size > 0 %}
|
3
|
+
<div class="container-lg my-1">
|
4
|
+
<div class="row">
|
5
|
+
<div class="col-lg-8 offset-lg-2 col">
|
6
|
+
<i class="fas fa-tag mr-1 fa-xs" aria-hidden="true"></i>
|
7
|
+
{%- for tag in page.tags %}
|
8
|
+
<a href="{{- tag | replace: " ", "-" | prepend: "#" |
|
9
|
+
prepend: page.cloudtag_url |
|
10
|
+
absolute_url | uri_escape -}}" class="badge chulapa-pill-bg-primary">{{- tag -}}</a>
|
11
|
+
{% endfor -%}
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
{% endif %}
|
@@ -0,0 +1,112 @@
|
|
1
|
+
{% capture tocWorkspace %}
|
2
|
+
{% comment %}
|
3
|
+
Version 1.0.12
|
4
|
+
https://github.com/allejo/jekyll-toc
|
5
|
+
|
6
|
+
"...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
|
7
|
+
|
8
|
+
Usage:
|
9
|
+
{% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
|
10
|
+
|
11
|
+
Parameters:
|
12
|
+
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
|
13
|
+
|
14
|
+
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
|
25
|
+
|
26
|
+
Output:
|
27
|
+
An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
|
28
|
+
generate the table of contents and will NOT output the markdown given to it
|
29
|
+
{% endcomment %}
|
30
|
+
|
31
|
+
{% capture my_toc %}{% endcapture %}
|
32
|
+
{% assign orderedList = include.ordered | default: false %}
|
33
|
+
{% assign skipNoIDs = include.skipNoIDs | default: false %}
|
34
|
+
{% assign minHeader = include.h_min | default: 1 %}
|
35
|
+
{% assign maxHeader = include.h_max | default: 6 %}
|
36
|
+
{% assign nodes = include.html | split: '<h' %}
|
37
|
+
{% assign firstHeader = true %}
|
38
|
+
|
39
|
+
{% capture listModifier %}{% if orderedList %}1.{% else %}-{% endif %}{% endcapture %}
|
40
|
+
|
41
|
+
{% for node in nodes %}
|
42
|
+
{% if node == "" %}
|
43
|
+
{% continue %}
|
44
|
+
{% endif %}
|
45
|
+
|
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 %}
|
53
|
+
|
54
|
+
{% if headerLevel < minHeader or headerLevel > maxHeader %}
|
55
|
+
{% continue %}
|
56
|
+
{% endif %}
|
57
|
+
|
58
|
+
{% assign _workspace = node | split: '</h' %}
|
59
|
+
|
60
|
+
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
|
61
|
+
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
|
62
|
+
{% assign html_id = _idWorkspace[0] %}
|
63
|
+
|
64
|
+
{% assign _classWorkspace = _workspace[0] | split: 'class="' %}
|
65
|
+
{% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
|
66
|
+
{% assign html_class = _classWorkspace[0] %}
|
67
|
+
|
68
|
+
{% if html_class contains "no_toc" %}
|
69
|
+
{% continue %}
|
70
|
+
{% endif %}
|
71
|
+
|
72
|
+
{% if firstHeader %}
|
73
|
+
{% assign firstHeader = false %}
|
74
|
+
{% assign minHeader = headerLevel %}
|
75
|
+
{% endif %}
|
76
|
+
|
77
|
+
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
|
78
|
+
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
|
79
|
+
|
80
|
+
{% assign indentAmount = headerLevel | minus: minHeader %}
|
81
|
+
{% assign space = '' %}
|
82
|
+
{% for i in (1..indentAmount) %}
|
83
|
+
{% assign space = space | prepend: ' ' %}
|
84
|
+
{% endfor %}
|
85
|
+
|
86
|
+
{% if include.item_class and include.item_class != blank %}
|
87
|
+
{% capture listItemClass %}{:.{{ include.item_class | replace: '%level%', headerLevel }}}{% endcapture %}
|
88
|
+
{% endif %}
|
89
|
+
|
90
|
+
{% capture anchor_body %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
|
91
|
+
{% capture anchor_body %}{{ anchor_body | replace: "|", "\|" }}{% endcapture %}
|
92
|
+
|
93
|
+
{% if html_id %}
|
94
|
+
{% capture list_item %}[{{ anchor_body }}]({% if include.baseurl %}{{ include.baseurl }}{% endif %}#{{ html_id }}){% endcapture %}
|
95
|
+
{% else %}
|
96
|
+
{% capture list_item %}{{ anchor_body }}{% endcapture %}
|
97
|
+
{% endif %}
|
98
|
+
|
99
|
+
{% capture my_toc %}{{ my_toc }}
|
100
|
+
{{ space }}{{ listModifier }} {{ listItemClass }} {{ list_item }}{% if include.anchor_class %}{:.{{ include.anchor_class }}}{% endif %}{% endcapture %}
|
101
|
+
{% endfor %}
|
102
|
+
|
103
|
+
{% if include.class and include.class != blank %}
|
104
|
+
{% capture my_toc %}{:.{{ include.class }}}
|
105
|
+
{{ my_toc | lstrip }}{% endcapture %}
|
106
|
+
{% endif %}
|
107
|
+
|
108
|
+
{% if include.id %}
|
109
|
+
{% capture my_toc %}{: #{{ include.id }}}
|
110
|
+
{{ my_toc | lstrip }}{% endcapture %}
|
111
|
+
{% endif %}
|
112
|
+
{% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }}
|