dendron-jekyll 0.3.2
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/LICENSE.txt +21 -0
- data/README.md +68 -0
- data/Rakefile +1 -0
- data/_includes/active.html +8 -0
- data/_includes/archive-single.html +33 -0
- data/_includes/crumbs.html +15 -0
- data/_includes/css/custom.scss.liquid +1 -0
- data/_includes/css/just-the-docs.scss.liquid +7 -0
- data/_includes/documents-collection.html +25 -0
- data/_includes/figure +9 -0
- data/_includes/head.html +40 -0
- data/_includes/head_custom.html +0 -0
- data/_includes/js/custom.js +0 -0
- data/_includes/nav.html +37 -0
- data/_includes/sidebar.html +19 -0
- data/_includes/title.html +5 -0
- data/_includes/toc +7 -0
- data/_includes/toc-mm.html +96 -0
- data/_includes/toc.html +16 -0
- data/_includes/vendor/anchor_headings.html +100 -0
- data/_layouts/about.html +5 -0
- data/_layouts/archive.html +30 -0
- data/_layouts/default.html +160 -0
- data/_layouts/home.html +5 -0
- data/_layouts/page.html +5 -0
- data/_layouts/post.html +5 -0
- data/_layouts/single.html +97 -0
- data/_layouts/table_wrappers.html +7 -0
- data/_layouts/vendor/compress.html +10 -0
- data/_sass/base.scss +108 -0
- data/_sass/buttons.scss +118 -0
- data/_sass/code.scss +261 -0
- data/_sass/color_schemes/dark.scss +17 -0
- data/_sass/color_schemes/light.scss +0 -0
- data/_sass/content.scss +196 -0
- data/_sass/custom/custom.scss +0 -0
- data/_sass/labels.scss +37 -0
- data/_sass/layout.scss +205 -0
- data/_sass/minimal-mistakes/_animations.scss +21 -0
- data/_sass/minimal-mistakes/_archive.scss +455 -0
- data/_sass/minimal-mistakes/_base.scss +357 -0
- data/_sass/minimal-mistakes/_buttons.scss +97 -0
- data/_sass/minimal-mistakes/_footer.scss +86 -0
- data/_sass/minimal-mistakes/_forms.scss +393 -0
- data/_sass/minimal-mistakes/_masthead.scss +93 -0
- data/_sass/minimal-mistakes/_mixins.scss +92 -0
- data/_sass/minimal-mistakes/_navigation.scss +566 -0
- data/_sass/minimal-mistakes/_notices.scss +105 -0
- data/_sass/minimal-mistakes/_page.scss +553 -0
- data/_sass/minimal-mistakes/_print.scss +252 -0
- data/_sass/minimal-mistakes/_reset.scss +187 -0
- data/_sass/minimal-mistakes/_search.scss +132 -0
- data/_sass/minimal-mistakes/_sidebar.scss +347 -0
- data/_sass/minimal-mistakes/_syntax.scss +324 -0
- data/_sass/minimal-mistakes/_tables.scss +39 -0
- data/_sass/minimal-mistakes/_utilities.scss +593 -0
- data/_sass/minimal-mistakes/_variables.scss +169 -0
- data/_sass/minimal-mistakes/skins/_air.scss +23 -0
- data/_sass/minimal-mistakes/skins/_aqua.scss +30 -0
- data/_sass/minimal-mistakes/skins/_contrast.scss +51 -0
- data/_sass/minimal-mistakes/skins/_dark.scss +28 -0
- data/_sass/minimal-mistakes/skins/_default.scss +5 -0
- data/_sass/minimal-mistakes/skins/_dirt.scss +33 -0
- data/_sass/minimal-mistakes/skins/_mint.scss +23 -0
- data/_sass/minimal-mistakes/skins/_neon.scss +57 -0
- data/_sass/minimal-mistakes/skins/_plum.scss +64 -0
- data/_sass/minimal-mistakes/skins/_sunrise.scss +44 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_breakpoint.scss +114 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_context.scss +95 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_helpers.scss +151 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_legacy-settings.scss +50 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_no-query.scss +15 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_parsers.scss +215 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_respond-to.scss +82 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_settings.scss +71 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_double.scss +33 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_query.scss +82 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_resolution.scss +31 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_single.scss +26 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_triple.scss +36 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default-pair.scss +21 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default.scss +22 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_double-string.scss +22 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution/_resolution.scss +60 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/single/_default.scss +13 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/triple/_default.scss +18 -0
- data/_sass/minimal-mistakes/vendor/magnific-popup/_magnific-popup.scss +649 -0
- data/_sass/minimal-mistakes/vendor/magnific-popup/_settings.scss +46 -0
- data/_sass/minimal-mistakes/vendor/susy/_su.scss +4 -0
- data/_sass/minimal-mistakes/vendor/susy/_susy-prefix.scss +13 -0
- data/_sass/minimal-mistakes/vendor/susy/_susy.scss +5 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/_svg-grid.scss +5 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_prefix.scss +7 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-api.scss +114 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-grid-math.scss +67 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-settings.scss +14 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-unprefix.scss +18 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-utilities.scss +133 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_api.scss +318 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_normalize.scss +261 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_parse.scss +163 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_settings.scss +329 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_su-math.scss +441 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_su-validate.scss +213 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_syntax-helpers.scss +191 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_unprefix.scss +56 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_utilities.scss +167 -0
- data/_sass/modules.scss +25 -0
- data/_sass/navigation.scss +196 -0
- data/_sass/print.scss +40 -0
- data/_sass/search.scss +323 -0
- data/_sass/support/_functions.scss +9 -0
- data/_sass/support/_variables.scss +135 -0
- data/_sass/support/mixins/_buttons.scss +27 -0
- data/_sass/support/mixins/_layout.scss +34 -0
- data/_sass/support/mixins/_typography.scss +86 -0
- data/_sass/support/mixins/mixins.scss +3 -0
- data/_sass/support/support.scss +3 -0
- data/_sass/tables.scss +58 -0
- data/_sass/typography.scss +60 -0
- data/_sass/utilities/_colors.scss +239 -0
- data/_sass/utilities/_layout.scss +95 -0
- data/_sass/utilities/_lists.scss +17 -0
- data/_sass/utilities/_spacing.scss +165 -0
- data/_sass/utilities/_typography.scss +91 -0
- data/_sass/utilities/utilities.scss +5 -0
- data/_sass/vendor/normalize.scss/README.md +78 -0
- data/_sass/vendor/normalize.scss/normalize.scss +427 -0
- data/_sass/vendor/normalize.scss/package.json +70 -0
- data/assets/css/just-the-docs-dark.scss +3 -0
- data/assets/css/just-the-docs-default.scss +8 -0
- data/assets/css/just-the-docs-light.scss +3 -0
- data/assets/images/just-the-docs.png +0 -0
- data/assets/images/search.svg +1 -0
- data/assets/js/just-the-docs.js +473 -0
- data/assets/js/vendor/lunr.min.js +6 -0
- data/assets/js/zzzz-search-data.json +60 -0
- data/bin/just-the-docs +16 -0
- data/lib/tasks/search.rake +74 -0
- metadata +245 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 95bc4ff3c20422b2d1447d13603aa10db06551aa9bd7a7a4f089636c745536a0
|
4
|
+
data.tar.gz: acad865bfc5b3a2b76601cecc7b85c725f0db97b90ebfdaf4f3fb3814363c9db
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 15d5c378447f9d9b6f77f1e2d0ee71a67e28aee414e9f458ccbc57f8f4cd598a79b955fc584fa11515d53cb484515ac5db8bcf37fc0c0db20b15681dbe3df3de
|
7
|
+
data.tar.gz: 8162d57b4c2f2d683507e6a5189c0b4dd7ef5d6f5772c95f7590b520a0dbd89522c262d03ee35824f625d8aac825622a46b86eb2a128556d804b96ab57a60810
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Patrick Marsceill
|
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
|
13
|
+
all 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
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
<p align="right">
|
2
|
+
<a href="https://badge.fury.io/rb/just-the-docs"><img src="https://badge.fury.io/rb/just-the-docs.svg" alt="Gem version"></a> <a href="https://github.com/pmarsceill/just-the-docs/actions?query=workflow%3A%22Master+branch+CI%22"><img src="https://github.com/pmarsceill/just-the-docs/workflows/Master%20branch%20CI/badge.svg" alt="Build status"></a>
|
3
|
+
</p>
|
4
|
+
<br><br>
|
5
|
+
<p align="center">
|
6
|
+
<h1 align="center">Just the Docs</h1>
|
7
|
+
<p align="center">A modern, highly customizable, and responsive Jekyll theme for documentation with built-in search.<br>Easily hosted on GitHub Pages with few dependencies.</p>
|
8
|
+
<p align="center"><strong><a href="https://pmarsceill.github.io/just-the-docs/">See it in action!</a></strong></p>
|
9
|
+
<br><br><br>
|
10
|
+
</p>
|
11
|
+
|
12
|
+

|
13
|
+
|
14
|
+
## Installation
|
15
|
+
|
16
|
+
Add this line to your Jekyll site's Gemfile:
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
gem "just-the-docs"
|
20
|
+
```
|
21
|
+
|
22
|
+
And add this line to your Jekyll site's `_config.yml`:
|
23
|
+
|
24
|
+
```yaml
|
25
|
+
theme: just-the-docs
|
26
|
+
```
|
27
|
+
|
28
|
+
And then execute:
|
29
|
+
|
30
|
+
$ bundle
|
31
|
+
|
32
|
+
Or install it yourself as:
|
33
|
+
|
34
|
+
$ gem install just-the-docs
|
35
|
+
|
36
|
+
## Usage
|
37
|
+
|
38
|
+
[View the documentation](https://pmarsceill.github.io/just-the-docs/) for usage information.
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/pmarsceill/just-the-docs. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
43
|
+
|
44
|
+
### Submitting code changes:
|
45
|
+
|
46
|
+
- Open a [Pull Request](https://github.com/pmarsceill/just-the-docs/pulls)
|
47
|
+
- Ensure all CI tests pass
|
48
|
+
- Await code review
|
49
|
+
- Bump the version number in `just-the-docs.gemspec` and `package.json` according to [semantic versioning](https://semver.org/).
|
50
|
+
|
51
|
+
### Design and development principles of this theme:
|
52
|
+
|
53
|
+
1. As few dependencies as possible
|
54
|
+
2. No build script needed
|
55
|
+
3. First class mobile experience
|
56
|
+
4. Make the content shine
|
57
|
+
|
58
|
+
## Development
|
59
|
+
|
60
|
+
To set up your environment to develop this theme, run `bundle install`.
|
61
|
+
|
62
|
+
Your theme is set up just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
|
63
|
+
|
64
|
+
When the theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
|
65
|
+
|
66
|
+
## License
|
67
|
+
|
68
|
+
The theme is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Dir.glob('lib/tasks/*.rake').each {|r| import r}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{%- if page.url == include.node.url -%}
|
2
|
+
{%- assign active = true -%}
|
3
|
+
{%- else -%}
|
4
|
+
{%- assign activityChildren = hierarchy | where_exp:"item", "item.name == include.node.id" | map: "items" | first -%}
|
5
|
+
{%- for activityNode in activityChildren -%}
|
6
|
+
{%- include active.html node=activityNode -%}
|
7
|
+
{%- endfor -%}
|
8
|
+
{%- endif -%}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
{% if post.header.teaser %}
|
2
|
+
{% capture teaser %}{{ post.header.teaser }}{% endcapture %}
|
3
|
+
{% else %}
|
4
|
+
{% assign teaser = site.teaser %}
|
5
|
+
{% endif %}
|
6
|
+
|
7
|
+
{% if post.id %}
|
8
|
+
{% assign title = post.title | markdownify | remove: "<p>" | remove: "</p>" %}
|
9
|
+
{% else %}
|
10
|
+
{% assign title = post.title %}
|
11
|
+
{% endif %}
|
12
|
+
|
13
|
+
<div class="{{ include.type | default: "list" }}__item">
|
14
|
+
<article class="archive__item" itemscope itemtype="https://schema.org/CreativeWork">
|
15
|
+
{% if include.type == "grid" and teaser %}
|
16
|
+
<div class="archive__item-teaser">
|
17
|
+
<img src="{{ teaser | relative_url }}" alt="">
|
18
|
+
</div>
|
19
|
+
{% endif %}
|
20
|
+
<h2 class="archive__item-title no_toc" itemprop="headline">
|
21
|
+
{% if post.link %}
|
22
|
+
<a href="{{ post.link }}">{{ title }}</a> <a href="{{ post.url | relative_url }}" rel="permalink"><i class="fas fa-link" aria-hidden="true" title="permalink"></i><span class="sr-only">Permalink</span></a>
|
23
|
+
{% else %}
|
24
|
+
<a href="{{ post.url | relative_url }}" rel="permalink">{{ title }}</a>
|
25
|
+
{% endif %}
|
26
|
+
</h2>
|
27
|
+
<p class="page__meta"><i class="far fa-clock" aria-hidden="true"></i> {{post.date | date_to_string }}</p>
|
28
|
+
{% if post.read_time %}
|
29
|
+
<p class="page__meta"><i class="far fa-clock" aria-hidden="true"></i> {% include read-time.html %}</p>
|
30
|
+
{% endif %}
|
31
|
+
{% if post.excerpt %}<p class="archive__item-excerpt" itemprop="description">{{ post.excerpt | markdownify | strip_html | truncate: 160 }}</p>{% endif %}
|
32
|
+
</article>
|
33
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
{%- for crumbsNode in include.nodes -%}
|
2
|
+
{%- include active.html node=crumbsNode -%}
|
3
|
+
{%- if active -%}
|
4
|
+
{%- assign active = false -%}
|
5
|
+
<li class="breadcrumb-nav-list-item">
|
6
|
+
{%- if crumbsNode.id == page.id -%}
|
7
|
+
{{ crumbsNode.title }}
|
8
|
+
{%- else -%}
|
9
|
+
<a href="{{ crumbsNode.url | absolute_url }}">{{ crumbsNode.title }}</a>
|
10
|
+
{%- endif -%}
|
11
|
+
</li>
|
12
|
+
{%- assign crumbsChildren = hierarchy | where_exp:"item", "item.name == crumbsNode.id" | map: "items" | first -%}
|
13
|
+
{%- include crumbs.html nodes=crumbsChildren -%}
|
14
|
+
{%- endif -%}
|
15
|
+
{%- endfor -%}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "./custom/custom";
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{% comment %}
|
2
|
+
{% assign entries = site[include.collection] %}
|
3
|
+
{% endcomment %}
|
4
|
+
|
5
|
+
{%- assign entries = hierarchy | where_exp:"item", "item.name == page.id" | map: "items" | first -%}
|
6
|
+
|
7
|
+
{% if include.sort_by == 'title' %}
|
8
|
+
{% if include.sort_order == 'reverse' %}
|
9
|
+
{% assign entries = entries | sort: 'title' | reverse %}
|
10
|
+
{% else %}
|
11
|
+
{% assign entries = entries | sort: 'title' %}
|
12
|
+
{% endif %}
|
13
|
+
{% elsif include.sort_by == 'date' %}
|
14
|
+
{% if include.sort_order == 'reverse' %}
|
15
|
+
{% assign entries = entries | sort: 'date' | reverse %}
|
16
|
+
{% else %}
|
17
|
+
{% assign entries = entries | sort: 'date' %}
|
18
|
+
{% endif %}
|
19
|
+
{% endif %}
|
20
|
+
|
21
|
+
{%- for post in entries -%}
|
22
|
+
{%- unless post.hidden -%}
|
23
|
+
{% include archive-single.html %}
|
24
|
+
{%- endunless -%}
|
25
|
+
{%- endfor -%}
|
data/_includes/figure
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
<figure class="{{ include.class }}">
|
2
|
+
<img src="{{ include.image_path | relative_url }}"
|
3
|
+
alt="{% if include.alt %}{{ include.alt }}{% endif %}">
|
4
|
+
{% if include.caption %}
|
5
|
+
<figcaption>
|
6
|
+
{{ include.caption | markdownify | remove: "<p>" | remove: "</p>" }}
|
7
|
+
</figcaption>
|
8
|
+
{% endif %}
|
9
|
+
</figure>
|
data/_includes/head.html
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
<head>
|
2
|
+
<meta charset="UTF-8">
|
3
|
+
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
4
|
+
|
5
|
+
{% unless site.plugins contains "jekyll-seo-tag" %}
|
6
|
+
<title>{{ page.title }} - {{ site.title }}</title>
|
7
|
+
|
8
|
+
{% if page.description %}
|
9
|
+
<meta name="Description" content="{{ page.description }}">
|
10
|
+
{% endif %}
|
11
|
+
{% endunless %}
|
12
|
+
|
13
|
+
<link rel="shortcut icon" href="{{ 'favicon.ico' | absolute_url }}" type="image/x-icon">
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="{{ '/assets/css/just-the-docs-default.css' | absolute_url }}">
|
16
|
+
|
17
|
+
{% if site.ga_tracking != nil %}
|
18
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_tracking }}"></script>
|
19
|
+
<script>
|
20
|
+
window.dataLayer = window.dataLayer || [];
|
21
|
+
function gtag(){dataLayer.push(arguments);}
|
22
|
+
gtag('js', new Date());
|
23
|
+
|
24
|
+
gtag('config', '{{ site.ga_tracking }}'{% unless site.ga_tracking_anonymize_ip == nil %}, { 'anonymize_ip': true }{% endunless %});
|
25
|
+
</script>
|
26
|
+
|
27
|
+
{% endif %}
|
28
|
+
|
29
|
+
{% if site.search_enabled != false %}
|
30
|
+
<script type="text/javascript" src="{{ '/assets/js/vendor/lunr.min.js' | absolute_url }}"></script>
|
31
|
+
{% endif %}
|
32
|
+
<script type="text/javascript" src="{{ '/assets/js/just-the-docs.js' | absolute_url }}"></script>
|
33
|
+
|
34
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
35
|
+
|
36
|
+
{% seo %}
|
37
|
+
|
38
|
+
{% include head_custom.html %}
|
39
|
+
|
40
|
+
</head>
|
File without changes
|
File without changes
|
data/_includes/nav.html
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
{%- assign groups = include.nodes | group_by:"category" | sort:"name" -%}
|
2
|
+
|
3
|
+
{%- if groups.size > 0 -%}
|
4
|
+
<ul class="nav-list">
|
5
|
+
{%- for group in groups -%}
|
6
|
+
{%- assign ordered_pages_list = group.items | where_exp:"item", "item.nav_order != nil" -%}
|
7
|
+
{%- assign unordered_pages_list = group.items| where_exp:"item", "item.nav_order == nil" -%}
|
8
|
+
{%- if site.nav_sort == 'case_insensitive' -%}
|
9
|
+
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort_natural:"nav_order" -%}
|
10
|
+
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort_natural:"title" -%}
|
11
|
+
{%- else -%}
|
12
|
+
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort:"nav_order" -%}
|
13
|
+
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort:"title" -%}
|
14
|
+
{%- endif -%}
|
15
|
+
{%- assign pages_list = sorted_ordered_pages_list | concat: sorted_unordered_pages_list -%}
|
16
|
+
|
17
|
+
{%- for node in pages_list -%}
|
18
|
+
{%- include active.html node=node -%}
|
19
|
+
<li class="nav-list-item{% if active %} active{% endif %}">
|
20
|
+
<a href="{{ node.url | absolute_url }}" class="nav-list-link{% if active %} active{% endif %}">{{ node.title }}</a>
|
21
|
+
|
22
|
+
{%- if active -%}
|
23
|
+
{%- assign active = false -%}
|
24
|
+
{%- assign children = hierarchy | where_exp:"item", "item.name == node.id" | map: "items" | first -%}
|
25
|
+
{%- if children -%}
|
26
|
+
{%- if node.has_collection -%}
|
27
|
+
{%- else -%}
|
28
|
+
{%- include nav.html nodes=children -%}
|
29
|
+
{%- endif -%}
|
30
|
+
{%- endif -%}
|
31
|
+
{%- endif -%}
|
32
|
+
</li>
|
33
|
+
{%- endfor -%}
|
34
|
+
|
35
|
+
{%- endfor -%}
|
36
|
+
</ul>
|
37
|
+
{%- endif -%}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{% if page.author_profile or layout.author_profile or page.sidebar %}
|
2
|
+
<div class="sidebar sticky">
|
3
|
+
{% if page.author_profile or layout.author_profile %}{% include author-profile.html %}{% endif %}
|
4
|
+
{% if page.sidebar %}
|
5
|
+
{% for s in page.sidebar %}
|
6
|
+
{% if s.image %}
|
7
|
+
<img src="{{ s.image | relative_url }}"
|
8
|
+
alt="{% if s.image_alt %}{{ s.image_alt }}{% endif %}">
|
9
|
+
{% endif %}
|
10
|
+
{% if s.title %}<h3>{{ s.title }}</h3>{% endif %}
|
11
|
+
{% if s.text %}{{ s.text | markdownify }}{% endif %}
|
12
|
+
{% if s.nav %}{% include nav_list nav=s.nav %}{% endif %}
|
13
|
+
{% endfor %}
|
14
|
+
{% if page.sidebar.nav %}
|
15
|
+
{% include nav_list nav=page.sidebar.nav %}
|
16
|
+
{% endif %}
|
17
|
+
{% endif %}
|
18
|
+
</div>
|
19
|
+
{% endif %}
|
data/_includes/toc
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
<aside class="sidebar__right">
|
2
|
+
<nav class="toc" markdown="1">
|
3
|
+
<header><h4 class="nav__title"><i class="fas fa-{{ include.icon | default: 'file-alt' }}"></i> {{ include.title | default: site.data.ui-text[site.locale].toc_label }}</h4></header>
|
4
|
+
* Auto generated table of contents
|
5
|
+
{:toc .toc__menu}
|
6
|
+
</nav>
|
7
|
+
</aside>
|
@@ -0,0 +1,96 @@
|
|
1
|
+
{% capture tocWorkspace %}
|
2
|
+
{% comment %}
|
3
|
+
Version 1.0.8
|
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
|
+
|
25
|
+
Output:
|
26
|
+
An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
|
27
|
+
generate the table of contents and will NOT output the markdown given to it
|
28
|
+
{% endcomment %}
|
29
|
+
|
30
|
+
{% capture my_toc %}{% endcapture %}
|
31
|
+
{% assign orderedList = include.ordered | default: false %}
|
32
|
+
{% assign minHeader = include.h_min | default: 1 %}
|
33
|
+
{% assign maxHeader = include.h_max | default: 6 %}
|
34
|
+
{% assign nodes = include.html | split: '<h' %}
|
35
|
+
{% assign firstHeader = true %}
|
36
|
+
|
37
|
+
{% capture listModifier %}{% if orderedList %}1.{% else %}-{% endif %}{% endcapture %}
|
38
|
+
|
39
|
+
{% for node in nodes %}
|
40
|
+
{% if node == "" %}
|
41
|
+
{% continue %}
|
42
|
+
{% endif %}
|
43
|
+
|
44
|
+
{% assign headerLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
|
45
|
+
|
46
|
+
{% if headerLevel < minHeader or headerLevel > maxHeader %}
|
47
|
+
{% continue %}
|
48
|
+
{% endif %}
|
49
|
+
|
50
|
+
{% if firstHeader %}
|
51
|
+
{% assign firstHeader = false %}
|
52
|
+
{% assign minHeader = headerLevel %}
|
53
|
+
{% endif %}
|
54
|
+
|
55
|
+
{% assign indentAmount = headerLevel | minus: minHeader %}
|
56
|
+
{% assign _workspace = node | split: '</h' %}
|
57
|
+
|
58
|
+
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
|
59
|
+
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
|
60
|
+
{% assign html_id = _idWorkspace[0] %}
|
61
|
+
|
62
|
+
{% assign _classWorkspace = _workspace[0] | split: 'class="' %}
|
63
|
+
{% assign _classWorkspace = _classWorkspace[1] | split: '"' %}
|
64
|
+
{% assign html_class = _classWorkspace[0] %}
|
65
|
+
|
66
|
+
{% if html_class contains "no_toc" %}
|
67
|
+
{% continue %}
|
68
|
+
{% endif %}
|
69
|
+
|
70
|
+
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
|
71
|
+
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
|
72
|
+
|
73
|
+
{% assign space = '' %}
|
74
|
+
{% for i in (1..indentAmount) %}
|
75
|
+
{% assign space = space | prepend: ' ' %}
|
76
|
+
{% endfor %}
|
77
|
+
|
78
|
+
{% unless include.item_class == blank %}
|
79
|
+
{% capture listItemClass %}{:.{{ include.item_class | replace: '%level%', headerLevel }}}{% endcapture %}
|
80
|
+
{% endunless %}
|
81
|
+
|
82
|
+
{% capture heading_body %}{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}{% endcapture %}
|
83
|
+
{% capture my_toc %}{{ my_toc }}
|
84
|
+
{{ space }}{{ listModifier }} {{ listItemClass }} [{{ heading_body | replace: "|", "\|" }}]({% if include.baseurl %}{{ include.baseurl }}{% endif %}#{{ html_id }}){% if include.anchor_class %}{:.{{ include.anchor_class }}}{% endif %}{% endcapture %}
|
85
|
+
{% endfor %}
|
86
|
+
|
87
|
+
{% if include.class %}
|
88
|
+
{% capture my_toc %}{:.{{ include.class }}}
|
89
|
+
{{ my_toc | lstrip }}{% endcapture %}
|
90
|
+
{% endif %}
|
91
|
+
|
92
|
+
{% if include.id %}
|
93
|
+
{% capture my_toc %}{: #{{ include.id }}}
|
94
|
+
{{ my_toc | lstrip }}{% endcapture %}
|
95
|
+
{% endif %}
|
96
|
+
{% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }}
|
data/_includes/toc.html
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
{%- assign tocNodes = hierarchy | where_exp:"item", "item.name == page.id" | map: "items" | first -%}
|
2
|
+
{%- if tocNodes.size > 0 -%}
|
3
|
+
<hr>
|
4
|
+
<h2 class="text-delta">Table of contents</h2>
|
5
|
+
<ul>
|
6
|
+
{%- for tocNode in tocNodes -%}
|
7
|
+
<li>
|
8
|
+
<a href="{{ tocNode.url | absolute_url }}">{{ tocNode.title }}</a>
|
9
|
+
{%- if tocNode.summary -%}
|
10
|
+
-
|
11
|
+
{{ tocNode.summary }}
|
12
|
+
{%- endif -%}
|
13
|
+
</li>
|
14
|
+
{%- endfor -%}
|
15
|
+
</ul>
|
16
|
+
{%- endif -%}
|