jekyll-notes 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f33e7721278686ce7d42c10c1b8fe0e91b3d92e6bf9308a1002ba166d1aab674
4
+ data.tar.gz: 685cc535b8829f629c696ac12b57cbc7e3ecd52bcee0aa700981e0aa59508e07
5
+ SHA512:
6
+ metadata.gz: d2612ec43fc19d6f2222e2d7723278ee9f43410fd2ef46ea69a1d911a0cbc4b5bb6fdd0191a364444de76590494ec8597391ce7b1abb8ffa75cda7998331a620
7
+ data.tar.gz: 1be3550ed06146d0bb29b55e09513439162e2e35ba507c4d7160317ef104b4754175d025a2e363fa77751b32a687b5b7903b211fdea75ed94a9489477bf15c03
data/README.md ADDED
@@ -0,0 +1,83 @@
1
+ ## Jekyll-notes
2
+
3
+ Jekyll-notes is a Jekyll theme for managing notes.
4
+ Simply create _chapters folder and populate it with subfolders and notes.
5
+ The .md files with "layout: default" would appear at Notes page submenu.
6
+
7
+ ## Screenshot
8
+
9
+ <img src="screenshot-menu.png" alt="drawing" width="350"/>
10
+
11
+
12
+ ## Installing
13
+
14
+ 1. Edit Gemfile
15
+ ```yaml
16
+ group :jekyll_plugins do
17
+ gem "jekyll-remote-theme"
18
+ end
19
+ ```
20
+
21
+ 2. Edit _config.yml
22
+ ```yaml
23
+ plugins:
24
+ - jekyll-remote-theme
25
+
26
+ remote_theme: alexz005/jekyll-notes
27
+
28
+ collections:
29
+ sections:
30
+ output: false
31
+ chapters:
32
+ output: true
33
+ ```
34
+
35
+ 3. Create _chapters folder and make .md files inside.
36
+
37
+ ## Debugging locally
38
+
39
+ Gemfile
40
+ ```yaml
41
+ group :jekyll_plugins do
42
+ gem "jekyll-feed", "~> 0.12"
43
+ gem "jekyll-notes", :path => "../../jekyll-notes/"
44
+ end
45
+ ```
46
+
47
+ _config.yml
48
+ ```yaml
49
+ theme: jekyll-notes
50
+ collections:
51
+ sections:
52
+ output: false
53
+ chapters:
54
+ output: true
55
+ ```
56
+
57
+ ## Advantages
58
+
59
+ Contents are stored in _chapters folder and any subfolder and its files are automatically seen in submenu. The notes have to mantain yaml structure though, including three dashes and layout: default.
60
+
61
+ Menu automatically generates with subfolders, isn’t it neat?
62
+
63
+
64
+ ## Building and testing locally
65
+
66
+ This site is using Jekyll/SCSS
67
+ bundle exec jekyll serve --port 8080
68
+
69
+ ## Used sources
70
+
71
+ Following were used to build this theme:
72
+
73
+ 1. Parts of theme [Milidocs](http://alexander.heimbu.ch/millidocs/) by Alexander Heimbuch
74
+ 2. Collapsable list Javascript code from [here](http://code.iamkate.com/javascript/collapsible-lists/) by Kate Morley
75
+ 3. JavaScript code to generate menu from [here](https://stackoverflow.com/questions/26645220/build-nested-folder-structure-from-path-strings/26652662)
76
+ 4. JavaScript code to search through the list from [here](https://www.w3schools.com/howto/howto_js_filter_lists.asp)
77
+ 5. Parts of [startbootstrap](https://github.com/BlackrockDigital/startbootstrap-landing-page)
78
+
79
+ ## License
80
+
81
+ MIT license, except any copied code or parts used above.
82
+
83
+ Have you found it useful? Give me a star or [fork](/fork) this!
@@ -0,0 +1,13 @@
1
+ <div id="breadcrumbs">
2
+ {% assign crumbs = page.url | remove:'/index.html' | split: '/' %}
3
+ <a href="/">Home</a>
4
+ {% for crumb in crumbs offset: 1 %}
5
+ {% if forloop.last %}
6
+ / {{ page.title }}
7
+ {% else %}
8
+ / <a href="{% assign crumb_limit = forloop.index | plus: 1 %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' | replace:'without-plugin/','without-plugins/' }}{% endfor %}">{{ crumb | replace:'-',' ' | remove:'.html' | capitalize }}</a>
9
+ {% endif %}
10
+ {% endfor %}
11
+ <br />
12
+ <div align="right"><a href="https://github.com/AlexZ005/alexz005.github.io/edit/master/{{page.url | remove:'.html' | append:'.md' | remove_first: "/" | prepend: "_"}}">Edit this page</a></div>
13
+ </div>
@@ -0,0 +1,81 @@
1
+ {% if page.comment_issue_id %}
2
+ <script type="text/javascript">
3
+
4
+ document.querySelector("{{ include.element }}").innerHTML = document.querySelector("{{ include.element }}").innerHTML + "<div id='comments'></div>";
5
+ document.getElementById("comments").innerHTML = "<h3>Comments</h3><p>You can <a href='https://github.com/{{ include.github_account }}/issues/{{page.comment_issue_id}}' target='_blank'>view the comments</a> on GitHub.</p>";
6
+
7
+ function reloadComments() {
8
+ var elements = document.querySelectorAll('.comment');
9
+ Array.prototype.forEach.call(elements, function(el, i){
10
+ el.remove();
11
+ });
12
+ $.ajax("https://api.github.com/repos/{{ include.github_account }}/issues/{{page.comment_issue_id}}/comments?per_page=100", {
13
+ headers: {Accept: "application/vnd.github.full+json"},
14
+ dataType: "json",
15
+ success: function(msg){
16
+ localStorage.setItem('comments_{{ include.github_account }}_{{page.comment_issue_id}}',JSON.stringify(msg));
17
+ loadComments(msg);
18
+ },
19
+ error: function() {
20
+ document.getElementById("comments").innerHTML = "<h3>Comments</h3><p>You can <a href='https://github.com/{{ include.github_account }}/issues/{{page.comment_issue_id}}' target='_blank'>view the comments</a> on GitHub. The comments cannot be shown inline because we have hit the rate limit of Github.</p>";
21
+ }
22
+ });
23
+ return false;
24
+ }
25
+ function loadComments(data) {
26
+ $("#comments").html("<h3>Comments</h3><p>You can <a href='https://github.com/{{ include.github_account }}/issues/{{page.comment_issue_id}}' target='_blank'>leave a comment</a> through GitHub, or <a onclick=' reloadComments();' style='cursor: pointer;'>refresh</a> the comments below.</p>");
27
+ for (var i=0; i<data.length; i++) {
28
+ var cuser = data[i].user.login;
29
+ var cuserlink = "https://www.github.com/" + data[i].user.login;
30
+ var clink = "https://github.com/{{ include.github_account }}/issues/{{page.comment_issue_id}}#issuecomment-" + data[i].url.substring(data[i].url.lastIndexOf("/")+1);
31
+ var cbody = data[i].body_html;
32
+ {% if include.require_cookie_consent == 'true' %}
33
+ if(readCookie('cookie-notice-dismissed')=='true') {
34
+ var cavatarlink = data[i].user.avatar_url;
35
+ } else {
36
+ var cavatarlink = '/img/emptyavatar.png';
37
+ cbody = cbody.replace(/<img src=/g,"<img data-src=");
38
+ }
39
+ {% else %}
40
+ var cavatarlink = data[i].user.avatar_url;
41
+ {% endif %}
42
+ var cdate = data[i].created_at;
43
+ document.getElementById("comments").innerHTML = document.getElementById("comments").innerHTML + "<div class='comment'><div class='commentgravatar'>" + '<img src="' + cavatarlink + '" alt="' + cuser + '">' + "</div><div class='commentheader'><a class='commentuser' href=\""+ cuserlink + "\">" + cuser + "</a> commented <a class='commentdate' href=\"" + clink + "\">on " + cdate.substring(0, 10) + "</a></div><div class='commentbody'>" + cbody + "</div></div>";
44
+ $('img[data-src]').replaceWith( "[Image blocked] " );
45
+ }
46
+ }
47
+ var data = localStorage.getItem('comments_{{ include.github_account }}_{{page.comment_issue_id}}');
48
+ if(data) {
49
+ loadComments(JSON.parse(data));
50
+ } else {
51
+ {% if include.require_cookie_consent == 'true' %}
52
+ if(readCookie('cookie-notice-dismissed')=='true') reloadComments();
53
+ else document.getElementById("comments").innerHTML = "<h3>Comments</h3><p>You can <a href='https://github.com/{{ include.github_account }}/issues/{{page.comment_issue_id}}' target='_blank'>view the comments</a> on GitHub (approve third party scripts to view them inline).</p>";
54
+ {% else %}
55
+ reloadComments();
56
+ {% endif %}
57
+ }
58
+ </script>
59
+ <style>
60
+ .comment {padding: 5px 0 15px;}
61
+ .comment P:last-child {margin-bottom: 0;}
62
+ .commentgravatar {position: absolute; width: 40px; border: 1px solid #e5e5e5;}
63
+ .commentheader, .commentbody {padding: 5px 10px; margin-left: 55px; border: 1px solid #e5e5e5; background: white;}
64
+ .commentheader {position: relative; background: #f4f4f4; border-bottom: 0;}
65
+ .commentbody {padding: 10px 10px 13px;}
66
+ .commentheader a {color: #777777;}
67
+ .commentheader::before {
68
+ position: absolute;
69
+ content: "";
70
+ display: block;
71
+ width: 9px;
72
+ height: 9px;
73
+ background: #f4f4f4;
74
+ transform: rotate(-45deg);
75
+ left: 0;
76
+ margin-left: -4px;
77
+ margin-top: 4px;
78
+ box-shadow: -1px -1px 0px 0px rgba(0, 0, 0, 0.15);
79
+ }
80
+ </style>
81
+ {% endif %}
@@ -0,0 +1,35 @@
1
+ <footer class="site-footer h-card">
2
+ <data class="u-url" href="{{ "/" | relative_url }}"></data>
3
+
4
+ <div class="wrapper">
5
+
6
+ <h2 class="footer-heading">{{ site.title | escape }}</h2>
7
+
8
+ <div class="footer-col-wrapper">
9
+ <div class="footer-col footer-col-1">
10
+ <ul class="contact-list">
11
+ <li class="p-name">
12
+ {%- if site.author -%}
13
+ {{ site.author | escape }}
14
+ {%- else -%}
15
+ {{ site.title | escape }}
16
+ {%- endif -%}
17
+ </li>
18
+ {%- if site.email -%}
19
+ <li><a class="u-email" href="mailto:{{ site.email }}">{{ site.email }}</a></li>
20
+ {%- endif -%}
21
+ </ul>
22
+ </div>
23
+
24
+ <div class="footer-col footer-col-2">
25
+ {%- include social.html -%}
26
+ </div>
27
+
28
+ <div class="footer-col footer-col-3">
29
+ <p>{{- site.description | escape -}}</p>
30
+ </div>
31
+ </div>
32
+
33
+ </div>
34
+
35
+ </footer>
@@ -0,0 +1,18 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+ {%- seo -%}
6
+ {%- if page.url == '/' -%}}
7
+ <link rel="stylesheet" href="{{ "/assets/css/minima.css" | relative_url }}">
8
+ {%- endif -%}
9
+ {%- if page.url != '/' -%}}
10
+ <link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
11
+ {%- endif -%}
12
+ <link rel="stylesheet" href="{{ "https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" | relative_url }}">
13
+ {%- feed_meta -%}
14
+ {%- if jekyll.environment == 'production' and site.google_analytics -%}
15
+ {%- include google-analytics.html -%}
16
+ {%- endif -%}
17
+
18
+ </head>
@@ -0,0 +1,38 @@
1
+ <header class="site-header">
2
+
3
+ <!-- Navigation -->
4
+
5
+
6
+ <div class="wrapper">
7
+ {%- assign default_paths = site.pages | map: "path" -%}
8
+ {%- assign page_paths = site.header_pages | default: default_paths -%}
9
+ {%- assign titles_size = site.pages | map: 'title' | join: '' | size -%}
10
+ <nav class="navbar navbar-dark bg-dark fixed-top site-nav">
11
+ <div class="">
12
+ <a class="navbar-brand" href="#">{{ site.title | escape }}</a>
13
+ </div>
14
+ {%- if titles_size > 0 -%}
15
+
16
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
17
+ <label for="nav-trigger" class="bg-white">
18
+ <span class="menu-icon">
19
+ <svg viewBox="0 0 18 15" width="18px" height="15px">
20
+ <path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
21
+ </svg>
22
+ </span>
23
+ </label>
24
+
25
+ <div class="trigger">
26
+ {%- for path in page_paths -%}
27
+ {%- assign my_page = site.pages | where: "path", path | first -%}
28
+ {%- if my_page.title -%}
29
+ <a class="btn btn-dark" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
30
+ {%- endif -%}
31
+ {%- endfor -%}
32
+ </div>
33
+
34
+ </div>
35
+
36
+ {%- endif -%}
37
+ </nav>
38
+ </header>
@@ -0,0 +1,5 @@
1
+ <script src="{{ "https://cdn.jsdelivr.net/npm/lodash@4.17.15/lodash.min.js" | relative_url }}"></script>
2
+ <script src="{{ "/assets/js/GenerateMenu.js" | relative_url }}"></script>
3
+ <script src="{{ "/assets/js/CollapsibleLists.js" | relative_url }}"></script>
4
+ <script src="{{ "/assets/js/SearchBar.js" | relative_url }}"></script>
5
+
@@ -0,0 +1,24 @@
1
+
2
+ <div class="sidebar">
3
+ <div class="sidebar-main">
4
+
5
+ <input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for names..">
6
+
7
+
8
+ <h1>Chapters</h1>
9
+
10
+ <button onclick="CollapsibleLists.apply()">Collapse/Expand</button>
11
+
12
+ <ul class="posts" id="menu">
13
+ {% for chapter in site.chapters %}
14
+ {% if chapter.path != "_chapters/index.html" %}
15
+ {{ chapter.path }}
16
+ {% endif %}
17
+ {% endfor %}
18
+ </ul>
19
+
20
+ <div id="renderList">
21
+ </div>
22
+
23
+ </div>
24
+ </div>
@@ -0,0 +1,34 @@
1
+
2
+ <div class="sidebar">
3
+ <div class="sidebar-main">
4
+
5
+ <h1>Chapters</h1>
6
+ <button onclick="CollapsibleLists.apply()">Collapse/Expand</button>
7
+
8
+ <ul class="posts">
9
+ {% for chapter in site.chapters %}
10
+ <li>
11
+ <a class="post-link" href="{{ chapter.url | prepend: site.baseurl }}">{{ chapter.path }}</a>
12
+ </li>
13
+ {% endfor %}
14
+ </ul>
15
+
16
+ <ul class="collapsibleList" id="renderList">
17
+ <li>
18
+ Parent item
19
+ <ul>
20
+ <li>Child item</li>
21
+ <li>Child item</li>
22
+ </ul>
23
+ </li>
24
+ <li>
25
+ Parent item
26
+ <ul>
27
+ <li>Child item</li>
28
+ <li>Child item</li>
29
+ </ul>
30
+ </li>
31
+ </ul>
32
+
33
+ </div>
34
+ </div>
@@ -0,0 +1,14 @@
1
+ <ul class="social-media-list">
2
+ {%- if site.dribbble_username -%}<li><a href="https://dribbble.com/{{ site.dribbble_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#dribbble' | relative_url }}"></use></svg> <span class="username">{{ site.dribbble_username| escape }}</span></a></li>{%- endif -%}
3
+ {%- if site.facebook_username -%}<li><a href="https://www.facebook.com/{{ site.facebook_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#facebook' | relative_url }}"></use></svg> <span class="username">{{ site.facebook_username| escape }}</span></a></li>{%- endif -%}
4
+ {%- if site.flickr_username -%}<li><a href="https://www.flickr.com/photos/{{ site.flickr_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#flickr' | relative_url }}"></use></svg> <span class="username">{{ site.flickr_username| escape }}</span></a></li>{%- endif -%}
5
+ {%- if site.github_username -%}<li><a href="https://github.com/{{ site.github_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#github' | relative_url }}"></use></svg> <span class="username">{{ site.github_username| escape }}</span></a></li>{%- endif -%}
6
+ {%- if site.instagram_username -%}<li><a href="https://instagram.com/{{ site.instagram_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#instagram' | relative_url }}"></use></svg> <span class="username">{{ site.instagram_username| escape }}</span></a></li>{%- endif -%}
7
+ {%- if site.linkedin_username -%}<li><a href="https://www.linkedin.com/in/{{ site.linkedin_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#linkedin' | relative_url }}"></use></svg> <span class="username">{{ site.linkedin_username| escape }}</span></a></li>{%- endif -%}
8
+ {%- if site.pinterest_username -%}<li><a href="https://www.pinterest.com/{{ site.pinterest_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#pinterest' | relative_url }}"></use></svg> <span class="username">{{ site.pinterest_username| escape }}</span></a></li>{%- endif -%}
9
+ {%- for mst in site.mastodon -%}{%- if mst.username and mst.instance -%}<li><a href="https://{{ mst.instance| cgi_escape | escape}}/@{{mst.username}}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#mastodon' | relative_url }}"></use></svg> <span class="username">{{ mst.username|escape }}</span></a></li>{%- endif -%}{%- endfor -%}
10
+ {%- if site.twitter_username -%}<li><a href="https://www.twitter.com/{{ site.twitter_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#twitter' | relative_url }}"></use></svg> <span class="username">{{ site.twitter_username| escape }}</span></a></li>{%- endif -%}
11
+ {%- if site.youtube_username -%}<li><a href="https://youtube.com/{{ site.youtube_username| cgi_escape | escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#youtube' | relative_url }}"></use></svg> <span class="username">{{ site.youtube_username| escape }}</span></a></li>{%- endif -%}
12
+ {%- if site.googleplus_username -%}<li><a href="https://plus.google.com/{{ site.googleplus_username| escape }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#googleplus' | relative_url }}"></use></svg> <span class="username">{{ site.googleplus_username| escape }}</span></a></li>{%- endif -%}
13
+ {%- if site.rss -%}<li><a href="{{ 'feed.xml' | relative_url }}"><svg class="svg-icon"><use xlink:href="{{ '/assets/minima-social-icons.svg#rss' | relative_url }}"></use></svg> <span>{{ site.rss | escape }}</span></a></li>{%- endif -%}
14
+ </ul>
@@ -0,0 +1,96 @@
1
+ {% capture tocWorkspace %}
2
+ {% comment %}
3
+ Version 1.0.10
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
+ {% if include.item_class and include.item_class != blank %}
79
+ {% capture listItemClass %}{:.{{ include.item_class | replace: '%level%', headerLevel }}}{% endcapture %}
80
+ {% endif %}
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 and include.class != blank %}
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 }}
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <h1>Chapter {{ page.chapter }}</h1>
6
+
7
+ {% for section in site.sections %}
8
+ {% if section.chapter == page.chapter %}
9
+ {{ section.output }}
10
+ {% endif %}
11
+ {% endfor %}
12
+
13
+
14
+ {{ content }}
@@ -0,0 +1,29 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}" />
5
+ <meta charset="utf-8">
6
+ <title>{{ page.title }}</title>
7
+ </head>
8
+ <body>
9
+ <div class="wrapper">
10
+
11
+
12
+ {% include sidebar.html %}
13
+
14
+ <main class="content">
15
+ <div class="inner">
16
+
17
+ <p>{% include breadcrumbs.html %}</p>
18
+ <p>{% include toc.html html=content %}</p>
19
+ {{ content | newline_to_br }}
20
+ {% include comments.html element=".post-content" github_account="AlexZ005/alexz005.github.io" require_cookie_consent="true" %}
21
+
22
+ </div>
23
+ </main>
24
+ </div>
25
+ {% include scripts.html %}
26
+
27
+ <script src="/js/jquery.min.js"></script>
28
+ </body>
29
+ </html>
@@ -0,0 +1,20 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ page.lang | default: site.lang | default: "en" }}">
3
+
4
+ {%- include head.html -%}
5
+
6
+ <body>
7
+
8
+ {%- include header.html -%}
9
+
10
+ <main class="page-content" aria-label="Content">
11
+ <div class="wrapper">
12
+ {{ content }}
13
+ </div>
14
+ </main>
15
+
16
+ {%- include footer.html -%}
17
+
18
+ </body>
19
+
20
+ </html>