jekyll-bonsai 0.0.3 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +676 -0
  3. data/README.md +3 -5
  4. data/_config.yml +173 -76
  5. data/_data/emoji.yml +45 -0
  6. data/_data/themes.yml +145 -0
  7. data/_includes/anchor-headings.html +5 -1
  8. data/_includes/btn_state.html +14 -0
  9. data/_includes/connect.html +11 -9
  10. data/_includes/cookie-consent.html +79 -0
  11. data/_includes/dates.html +22 -0
  12. data/_includes/hp-tooltip.html +106 -0
  13. data/_includes/img/bullet-net-web.svg +1 -1
  14. data/_includes/img/bullet-tree.svg +1 -1
  15. data/_includes/img/pencil-filter.svg +17 -0
  16. data/_includes/share.html +10 -8
  17. data/_includes/site-nav.html +83 -37
  18. data/_includes/tags.html +49 -0
  19. data/_includes/themes.scss.liquid +80 -0
  20. data/_includes/toc.html +187 -0
  21. data/_layouts/404.html +10 -0
  22. data/_layouts/about.html +14 -0
  23. data/_layouts/archive.html +77 -0
  24. data/_layouts/base.html +68 -0
  25. data/_layouts/book.html +40 -0
  26. data/_layouts/entry.html +238 -93
  27. data/_layouts/home.html +96 -0
  28. data/_layouts/post.html +30 -22
  29. data/_layouts/privacy.html +15 -0
  30. data/_layouts/recent.html +66 -0
  31. data/_layouts/state.html +54 -43
  32. data/_sass/base/_code.scss +133 -0
  33. data/_sass/base/_layout.scss +30 -29
  34. data/_sass/base/_link.scss +105 -0
  35. data/_sass/base/_main.scss +19 -126
  36. data/_sass/base/_markdown.scss +281 -0
  37. data/_sass/base/_typography.scss +81 -67
  38. data/_sass/base/code_themes/_gruvbox.scss +92 -0
  39. data/_sass/base/code_themes/_monokai.scss +217 -0
  40. data/_sass/base/code_themes/_solarized.scss +84 -0
  41. data/_sass/components/_btn.scss +95 -0
  42. data/_sass/components/_infobox.scss +48 -0
  43. data/_sass/components/_item.scss +28 -0
  44. data/_sass/components/_search.scss +61 -0
  45. data/_sass/components/_tag_pills.scss +24 -0
  46. data/_sass/components/_visited.scss +42 -0
  47. data/_sass/includes/_anchor_headings.scss +36 -0
  48. data/_sass/includes/_connect.scss +8 -0
  49. data/_sass/includes/_cookie_consent.scss +46 -0
  50. data/_sass/includes/_dates.scss +6 -0
  51. data/_sass/includes/_hp_tooltip.scss +41 -0
  52. data/_sass/includes/_share.scss +10 -0
  53. data/_sass/includes/_site_nav.scss +26 -150
  54. data/_sass/includes/_svg.scss +89 -0
  55. data/_sass/includes/_toc.scss +38 -0
  56. data/_sass/layouts/_404.scss +3 -0
  57. data/_sass/layouts/_about.scss +3 -0
  58. data/_sass/layouts/_archive.scss +26 -0
  59. data/_sass/layouts/_book.scss +17 -0
  60. data/_sass/layouts/_entry.scss +140 -0
  61. data/_sass/layouts/_home.scss +75 -0
  62. data/_sass/layouts/_post.scss +17 -0
  63. data/_sass/layouts/_privacy.scss +3 -0
  64. data/_sass/layouts/_recent.scss +77 -0
  65. data/_sass/layouts/_state.scss +98 -0
  66. data/_sass/main.scss +72 -0
  67. data/_sass/{support → util}/_functions.scss +0 -0
  68. data/_sass/{support → util}/_variables.scss +21 -87
  69. data/_sass/{support → util}/mixins/_buttons.scss +0 -0
  70. data/_sass/util/mixins/_layout.scss +81 -0
  71. data/_sass/{support → util}/mixins/_typography.scss +0 -0
  72. data/assets/css/styles.scss +29 -6
  73. data/assets/img/bonsai-star.png +0 -0
  74. data/assets/img/bonsai-star.svg +1 -0
  75. data/assets/img/books/the-ancient-art-of-bonsai.png +0 -0
  76. data/assets/img/nav-base-star.svg +1 -0
  77. data/assets/img/nav-bonsai-star.svg +1 -0
  78. data/assets/js/entry.js +33 -5
  79. data/assets/js/graph.js +21 -509
  80. data/assets/js/scripts.js +41 -57
  81. data/assets/js/search.js +165 -0
  82. data/assets/js/site-nav.js +99 -99
  83. data/assets/js/theme-colors.js +23 -37
  84. data/assets/js/vendor/lunr.js +3475 -0
  85. data/assets/js/vendor/lunr.min.js +6 -0
  86. data/assets/js/visited-nav.js +65 -0
  87. metadata +145 -150
  88. data/_entries/digital-garden.bonsai.md +0 -36
  89. data/_entries/digital-garden.field-logs.md +0 -10
  90. data/_entries/digital-garden.fork.md +0 -10
  91. data/_entries/digital-garden.md +0 -17
  92. data/_entries/digital-garden.path.md +0 -11
  93. data/_entries/digital-garden.plants.md +0 -12
  94. data/_entries/digital-garden.pollinate.md +0 -10
  95. data/_entries/digital-garden.steps.md +0 -10
  96. data/_entries/digital-garden.stream.md +0 -12
  97. data/_entries/digital-garden.sweep.md +0 -12
  98. data/_entries/digital-garden.weather.md +0 -12
  99. data/_entries/features.md +0 -10
  100. data/_entries/features.notes.hover-preview.md +0 -10
  101. data/_entries/features.notes.md +0 -12
  102. data/_entries/features.notes.note-body.md +0 -12
  103. data/_entries/features.notes.note-body.share.md +0 -10
  104. data/_entries/features.notes.note-body.sidenotes.md +0 -52
  105. data/_entries/features.notes.note-foot.links.md +0 -10
  106. data/_entries/features.notes.note-foot.md +0 -11
  107. data/_entries/features.notes.note-foot.posts.md +0 -10
  108. data/_entries/features.notes.note-foot.webmentions.md +0 -10
  109. data/_entries/features.notes.note-head.md +0 -10
  110. data/_entries/features.pages.field-blogs.md +0 -10
  111. data/_entries/features.pages.md +0 -12
  112. data/_entries/features.pages.recent.md +0 -10
  113. data/_entries/features.pages.status-tags.md +0 -10
  114. data/_entries/features.site-nav.graph.links.md +0 -10
  115. data/_entries/features.site-nav.graph.links.namespacing.md +0 -14
  116. data/_entries/features.site-nav.graph.links.wikilinks.md +0 -25
  117. data/_entries/features.site-nav.graph.md +0 -12
  118. data/_entries/features.site-nav.graph.nodes.current-note.md +0 -10
  119. data/_entries/features.site-nav.graph.nodes.md +0 -12
  120. data/_entries/features.site-nav.graph.nodes.mia.missing-note.md +0 -20
  121. data/_entries/features.site-nav.graph.nodes.visited-status.md +0 -10
  122. data/_entries/features.site-nav.graph.toggle-graph.md +0 -13
  123. data/_entries/features.site-nav.graph.type.md +0 -16
  124. data/_entries/features.site-nav.graph.type.net-web.md +0 -10
  125. data/_entries/features.site-nav.graph.type.tree.md +0 -12
  126. data/_entries/features.site-nav.md +0 -10
  127. data/_entries/features.site-nav.visited.md +0 -14
  128. data/_entries/features.tags.md +0 -13
  129. data/_entries/features.themes.dark.md +0 -12
  130. data/_entries/features.themes.light.md +0 -10
  131. data/_entries/features.themes.md +0 -12
  132. data/_entries/features.visited.delete-data.md +0 -10
  133. data/_entries/features.visited.md +0 -12
  134. data/_entries/features.visitor-preferences.md +0 -27
  135. data/_entries/feedback.md +0 -10
  136. data/_entries/people.creator.md +0 -12
  137. data/_entries/people.md +0 -13
  138. data/_entries/people.visitors.md +0 -12
  139. data/_entries/plugins.jekyll-wikilinks.md +0 -10
  140. data/_entries/plugins.md +0 -10
  141. data/_entries/root.md +0 -26
  142. data/_includes/entry-attrs.html +0 -27
  143. data/_includes/head.html +0 -23
  144. data/_includes/hover-preview.html +0 -84
  145. data/_includes/metrics.html +0 -10
  146. data/_includes/styles.scss.liquid +0 -3
  147. data/_layouts/default.html +0 -39
  148. data/_pages/about.md +0 -7
  149. data/_pages/posts.html +0 -19
  150. data/_pages/recent.html +0 -48
  151. data/_plugins/doc_filters.rb +0 -44
  152. data/_plugins/prep_entry.rb +0 -43
  153. data/_plugins/sidenote.rb +0 -123
  154. data/_plugins/tags.rb +0 -52
  155. data/_sass/base/base.scss +0 -3
  156. data/_sass/color/dark.scss +0 -58
  157. data/_sass/color/light.scss +0 -58
  158. data/_sass/includes/_btn.scss +0 -106
  159. data/_sass/includes/_graph.scss +0 -69
  160. data/_sass/includes/_nav.scss +0 -89
  161. data/_sass/includes/_tooltip.scss +0 -29
  162. data/_sass/includes/includes.scss +0 -9
  163. data/_sass/markdown/_code.scss +0 -340
  164. data/_sass/markdown/_content.scss +0 -400
  165. data/_sass/markdown/_tables.scss +0 -60
  166. data/_sass/markdown/markdown.scss +0 -7
  167. data/_sass/modules.scss +0 -14
  168. data/_sass/pages/_index.scss +0 -72
  169. data/_sass/pages/_posts.scss +0 -17
  170. data/_sass/pages/_recent.scss +0 -26
  171. data/_sass/pages/_state.scss +0 -72
  172. data/_sass/pages/pages.scss +0 -4
  173. data/_sass/support/mixins/_layout.scss +0 -56
  174. data/_sass/support/mixins/mixins.scss +0 -3
  175. data/_sass/support/support.scss +0 -3
  176. data/_states/bamboo.md +0 -8
  177. data/_states/berry.md +0 -8
  178. data/_states/bloom.md +0 -8
  179. data/_states/bud.md +0 -6
  180. data/_states/fruit.md +0 -8
  181. data/_states/melon.md +0 -8
  182. data/_states/pot-bamboo.md +0 -8
  183. data/_states/seed.md +0 -8
  184. data/_states/sprout.md +0 -8
  185. data/_states/tags.md +0 -8
  186. data/_states/tea.md +0 -8
  187. data/assets/css/styles-dark.scss +0 -3
  188. data/assets/css/styles-light.scss +0 -3
  189. data/assets/img/nav-dot-dark.svg +0 -1
  190. data/assets/img/nav-dot-light.svg +0 -1
  191. data/assets/img/nav-wiki-links-dark.svg +0 -1
  192. data/assets/img/nav-wiki-links-light.svg +0 -1
  193. data/index.html +0 -82
data/_entries/feedback.md DELETED
@@ -1,10 +0,0 @@
1
- ---
2
- id: 9ced1b66d5
3
- title: Feedback
4
- desc: ''
5
- updated: 1620695624628
6
- created: 1620695624628
7
- tags: 🌸
8
- ---
9
-
10
- Found a 🐛? Want to see something new 🪴? [Let me know.](https://github.com/manunamz/jekyll-bonsai)
@@ -1,12 +0,0 @@
1
- ---
2
- id: 908c123c77
3
- title: Creator
4
- desc: ''
5
- updated: 1623851566991
6
- created: 1620681119055
7
- tags: "\U0001F33F"
8
- ---
9
- One of the core principles driving this template is that people should be in control of their own content: They own it and have the final say on what is done with it.
10
-
11
- So, [[features.notes|note]] content is rendered from plain markdown files and the graph is built from the [[features.site-nav.graph.links.wikilinks]] and [[features.site-nav.graph.links.namespacing]].
12
-
data/_entries/people.md DELETED
@@ -1,13 +0,0 @@
1
- ---
2
- id: e170d5e122
3
- title: People
4
- desc: ''
5
- updated: 1620685947743
6
- created: 1620685947743
7
- tags: 🎋
8
- notable: true
9
- ---
10
-
11
- This template aims to be as humane and people-friendly as possible.
12
-
13
- See child notes for descriptions.
@@ -1,12 +0,0 @@
1
- ---
2
- id: a0020408a9
3
- title: Visitors
4
- desc: ''
5
- updated: 1622903588995
6
- created: 1620493085857
7
- tags: 🌿
8
- ---
9
-
10
- You know, people. Humans ~~🤖~~...Hopefully ☺️. Not just "users".
11
-
12
- Some minimal [[features.visitor-preferences]] are stored locally for the visitor's convenience.
@@ -1,10 +0,0 @@
1
- ---
2
- id: f570b2af01
3
- title: Jekyll-Wikilinks
4
- desc: ''
5
- updated: 1620412436879
6
- created: 1620412378566
7
- tags: 🥭
8
- ---
9
-
10
- - [github](https://github.com/manunamz/jekyll-wikilinks)
data/_entries/plugins.md DELETED
@@ -1,10 +0,0 @@
1
- ---
2
- id: 8201f789c8
3
- title: Plugins
4
- desc: ''
5
- updated: 1620424682705
6
- created: 1620424682705
7
- tags: 🎋
8
- ---
9
-
10
- See children for jekyll plugins used in this template.
data/_entries/root.md DELETED
@@ -1,26 +0,0 @@
1
- ---
2
- id: e4dc466bc6
3
- title: Jekyll-Bonsai
4
- desc: ''
5
- updated: 1623247179192
6
- created: 1620408350557
7
- tags: 🍈
8
- ---
9
-
10
- 🦊 Welcome to Jekyll-Bonsai.
11
-
12
- This template is about discovering new ways of structuring knowledge and navigating the internet.
13
-
14
- It's about discovering and crafting digital tools that are meant to help us, that wait patiently as we do our human thing. It's about leveraging the things we as people are good at, like visual navigation over walls of menu-text, or speaking in story and metaphor instead of trudging through countless bits of minutae.
15
-
16
- It's a [[digital-garden.bonsai]]. It's a [[digital-garden]]. The [[features]][>all] herein are meant to investigate how we might explore the internet differently: By organizing knowledge efficiently and humanizing digital interactions with other people.
17
-
18
- It's about cleaning up this mess we've made and to make something beautiful out of it.
19
-
20
- 🌱 mnz
21
-
22
- PS Check out the [github repo](https://github.com/manunamz/jekyll-bonsai) to start sifting through code.
23
-
24
- PPS This was my first time learning scss, ruby, jekyll, and d3. Code quality may vary.
25
-
26
- [>all]: Not _all_ features are implemented yet... 😉
@@ -1,27 +0,0 @@
1
- <!-- <table class="infobox" style="width: 40%; float: right;">
2
- <tbody>
3
- <th style="width: 100%;">{{ page.title }}</th>
4
- {% assign attributes = page.attributes | doc_type: "sem_tags" %}
5
- {% for attr in attributes %}
6
- <tr>
7
- <th>{{ attr.type | capitalize }}</th>
8
- <td><a class="wiki-link" href="{{ attr.doc.url | relative_url }}">{{ attr.doc.title }}</a></td>
9
- </tr>
10
- {% endfor %}
11
- </tbody>
12
- </table> -->
13
-
14
- {% assign attributes = page.attributes | doc_type: "sem_tags" %}
15
- {% if attributes.size > 0 %}
16
- <div class="infobox" style="padding: 1em; width: 40%; float: right;">
17
- <p class="title">Attributes</p>
18
- <ul>
19
- {% for attr in attributes %}
20
- <li style="display: flex; justify-content: space-between;">
21
- <span>{{ attr.type | capitalize }} : </span>
22
- <span><a class="wiki-link" href="{{ attr.doc.url | relative_url }}">{{ attr.doc.title }}</a></span>
23
- </li>
24
- {% endfor %}
25
- </ul>
26
- </div>
27
- {% endif %}
data/_includes/head.html DELETED
@@ -1,23 +0,0 @@
1
- <head>
2
- <!-- Global site tag (gtag.js) - Google Analytics -->
3
- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-190413040-3"></script>
4
- <script>
5
- window.dataLayer = window.dataLayer || [];
6
- function gtag(){dataLayer.push(arguments);}
7
- gtag('js', new Date());
8
-
9
- gtag('config', {{ site.ga_tracking }}, { 'anonymize_ip': true });
10
- </script>
11
-
12
- <meta charset="utf-8">
13
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
14
-
15
- <title>{{ page.title }}</title>
16
-
17
- <link rel="icon" type="image/png">
18
- <link rel="stylesheet" href="{{ '/assets/css/styles.css' | relative_url }}">
19
-
20
- {% feed_meta %}
21
- {% seo %}
22
-
23
- </head>
@@ -1,84 +0,0 @@
1
- <!-- That file is not particularly elegant. This will need a refactor at some point. -->
2
- <style>
3
- /* leave id for opacity toggle */
4
- #tooltip-wrapper {
5
- opacity: 0;
6
- transition: opacity 100ms;
7
- }
8
- </style>
9
-
10
- <div style="opacity: 0; display: none;" class="tooltip-wrapper" id="tooltip-wrapper">
11
- <div id='tooltip-content'></div>
12
- </div>
13
- <iframe style="display: none; height: 0; width: 0;" id="hover-preview-iframe" src=""></iframe>
14
-
15
- <script>
16
- var opacityTimeout;
17
- var contentTimeout;
18
- var transitionDurationMs = 100;
19
-
20
- var iframe = document.getElementById('hover-preview-iframe');
21
- var tooltipWrapper = document.getElementById('tooltip-wrapper');
22
- var tooltipContent = document.getElementById('tooltip-content');
23
-
24
- function hideTooltip() {
25
- opacityTimeout = setTimeout(function() {
26
- tooltipWrapper.style.opacity = 0;
27
- contentTimeout = setTimeout(function() {
28
- tooltipContent.innerHTML = '';
29
- tooltipWrapper.style.display = 'none';
30
- }, transitionDurationMs + 1);
31
- }, transitionDurationMs)
32
- }
33
-
34
- function showTooltip(event) {
35
- var elem = event.target;
36
- var elem_props = elem.getClientRects()[elem.getClientRects().length - 1];
37
- var top = window.pageYOffset || document.documentElement.scrollTop;
38
-
39
- if (event.target.host === window.location.host) {
40
- iframe.src = event.target.href;
41
- iframe.onload = function() {
42
- tooltipContent.innerHTML = iframe.contentWindow.document.querySelector('.main-content').innerHTML;
43
- tooltipWrapper.style.display = 'block';
44
- setTimeout(function() {
45
- tooltipWrapper.style.opacity = 1;
46
- }, 1);
47
- };
48
-
49
- tooltipWrapper.style.left = elem_props.left - (tooltipWrapper.offsetWidth / 2) + (elem_props.width / 2) + "px";
50
- if ((window.innerHeight - elem_props.top) < (tooltipWrapper.offsetHeight)) {
51
- tooltipWrapper.style.top = elem_props.top + top - tooltipWrapper.offsetHeight - 10 + "px";
52
- } else if ((window.innerHeight - elem_props.top) > (tooltipWrapper.offsetHeight)) {
53
- tooltipWrapper.style.top = elem_props.top + top + 35 + "px";
54
- }
55
-
56
- if ((elem_props.left + (elem_props.width / 2)) < (tooltipWrapper.offsetWidth / 2)) {
57
- tooltipWrapper.style.left = "10px";
58
- } else if ((document.body.clientWidth - elem_props.left - (elem_props.width / 2)) < (tooltipWrapper.offsetWidth / 2)) {
59
- tooltipWrapper.style.left = document.body.clientWidth - tooltipWrapper.offsetWidth - 20 + "px";
60
- }
61
- }
62
- }
63
-
64
- function setupListeners(linkElement) {
65
- linkElement.addEventListener('mouseleave', function(_event) {
66
- hideTooltip();
67
- });
68
-
69
- tooltipWrapper.addEventListener('mouseleave', function(_event) {
70
- hideTooltip();
71
- });
72
-
73
- linkElement.addEventListener('mouseenter', function(event) {
74
- clearTimeout(opacityTimeout);
75
- clearTimeout(contentTimeout);
76
- showTooltip(event);
77
- });
78
-
79
- tooltipWrapper.addEventListener('mouseenter', function(event) {
80
- clearTimeout(opacityTimeout);
81
- clearTimeout(contentTimeout);
82
- });
83
- }
84
- </script>
@@ -1,10 +0,0 @@
1
- {% if site.ga_tracking != nil %}
2
- <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_tracking }}"></script>
3
- <script>
4
- window.dataLayer = window.dataLayer || [];
5
- function gtag(){dataLayer.push(arguments);}
6
- gtag('js', new Date());
7
-
8
- gtag('config', '{{ site.ga_tracking }}'{% unless site.ga_tracking_anonymize_ip == nil %}, { 'anonymize_ip': true }{% endunless %});
9
- </script>
10
- {% endif %}
@@ -1,3 +0,0 @@
1
- @import "./support/support";
2
- @import "./color/{{ include.theme_colors }}";
3
- @import "./modules";
@@ -1,39 +0,0 @@
1
- ---
2
- layout: table-wrappers
3
- ---
4
- <!doctype html>
5
- <html>
6
- {% include head.html %}
7
- <body>
8
-
9
- <div class="side-bar">
10
- {% include site-nav.html %}
11
- </div>
12
-
13
- <div class="main" id="top">
14
- <div id="main-content-wrap" class="main-content-wrap">
15
- <div id="main-content" class="main-content" role="main">
16
- {% include anchor-headings.html html=content anchorBody="<i class='anchor-tag'>🐝</i>" anchorClass="anchor-heading" %}
17
- </div>
18
- <div class="connect">
19
- {% if site.social.enabled %}
20
- {% include connect.html %}
21
- {% endif %}
22
- </div>
23
- </div>
24
- </div>
25
-
26
- <label class="bonsai-burger">
27
- <input id="wiki-link-nav-checkbox" type="checkbox">
28
- <img id="nav-bonsai" height="50" width="50" hidden></img>
29
- <img id="nav-base" height="40" width="40"></img>
30
- </label>
31
-
32
- <script src="https://d3js.org/d3.v6.min.js"></script>
33
- {% include metrics.html %}
34
- {% include hover-preview.html wrapperQuerySelector="content" %}
35
- <!-- modules: https://stackoverflow.com/questions/58211880/uncaught-syntaxerror-cannot-use-import-statement-outside-a-module-when-import -->
36
- <script type="module" src="{{ '/assets/js/scripts.js' | relative_url }}"></script>
37
-
38
- </body>
39
- </html>
data/_pages/about.md DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- layout: default
3
- title: About
4
- permalink: /about/
5
- ---
6
-
7
- This is a test -- head to [[root]].
data/_pages/posts.html DELETED
@@ -1,19 +0,0 @@
1
- ---
2
- layout: default
3
- title: Field bLogs Page
4
- permalink: /posts/
5
- ---
6
- <div id="posts">
7
-
8
- <h1>📓 Field bLogs</h1>
9
-
10
- <ul class="posts-list">
11
- {% for post in site.posts %}
12
- <li class="posts-list-item">
13
- <a class="wiki-link" href="{{ post.url | relative_url }}">📄 {{ post.title }}</a>
14
- <span style="color: grey;">{{ post.updated | date: "%Y-%m-%d" }}</span>
15
- </li>
16
- {% endfor %}
17
- </ul>
18
-
19
- </div>
data/_pages/recent.html DELETED
@@ -1,48 +0,0 @@
1
- ---
2
- layout: default
3
- title: Recent Weather Page
4
- permalink: /recent/
5
- ---
6
- <div id="recent">
7
-
8
- <div>
9
- <h1>🌦 Recent Weather</h1>
10
- <div class="leader">
11
- <div class="infobox">
12
- <p class="title">Weather Statuses</p>
13
- <p>🌤 Created</p>
14
- <p>🌧 Updated</p>
15
- <p style="color: grey;"><em>🌩 Deleted (Currently not active)</em></p>
16
- </div>
17
- <p>
18
- Instead of a 'forecast' looking into the future, these are 'backcasts' peering into recent history.
19
- It's featured posts, but version controlled. It's a feed, without infinite scroll. It's releases, with a chance of rain.
20
- </p>
21
- </div>
22
- </div>
23
-
24
- <div>
25
- <h2 style="text-align: left; padding-bottom: 24px; padding-top: 24px;">Posts</h2>
26
- {% assign recent_posts = site.posts | recent: site.recent_num %}
27
- <ul class="recent-list">
28
- {% for post in recent_posts %}
29
- <li class="recent-list-item">
30
- <a class="wiki-link" href="{{ post.url | relative_url }}">{{ post | weather }} {{ post.title }}</a>
31
- <span class="date-updated">{{ post.updated | date: "%Y-%m-%d" }}</span>
32
- </li>
33
- {% endfor %}
34
- </ul>
35
-
36
- <h2 style="text-align: left; padding-bottom: 12px;">Entries</h2>
37
- {% assign recent_entries = site.entries | recent: site.recent_num %}
38
- <ul class="recent-list">
39
- {% for entry in recent_entries %}
40
- <li class="recent-list-item">
41
- <a class="wiki-link" href="{{ entry.url | relative_url }}">{{ entry | weather }} {{ entry.title }}</a>
42
- <span class="date-updated">{{ entry.updated | date: "%Y-%m-%d" }}</span>
43
- </li>
44
- {% endfor %}
45
- </ul>
46
- </div>
47
-
48
- </div>
@@ -1,44 +0,0 @@
1
- # liquid template to filter for most recently created/edited docs
2
- require 'time'
3
-
4
- module Jekyll
5
- module DocFilters
6
- def notable(docs)
7
- return docs.select { |d| d.data.include?('notable') && (d.data['notable'] == true) }
8
- end
9
-
10
- # returns most recently created/updated docs up to the defined 'num'ber.
11
- # adds a 'weather' data attribute to render on the page.
12
- def recent(docs, num=10)
13
- return if docs.nil?
14
- num = self.to_integer(num)
15
- # sort docs by most recently updated
16
- recent_docs = docs.sort_by { |d| d.data['updated'] }.reverse[0..(num - 1)]
17
- # assign weather attribute: if 'created' and 'updated' happened on the same day, presume creation status.
18
- recent_docs.each do |docs|
19
- day_created = Time.at(docs.data['created']).to_date
20
- day_updated = Time.at(docs.data['updated']).to_date
21
- end
22
- return recent_docs
23
- end
24
-
25
- def weather(doc)
26
- day_created = Time.at(doc['created']).to_date
27
- day_updated = Time.at(doc['updated']).to_date
28
- return day_created === day_updated ? "🌤" : "🌧"
29
- end
30
-
31
- # from: https://github.com/Shopify/liquid/blob/eab13a07d9861a38d993d2749ae25f06ff76426b/lib/liquid/utils.rb#L38
32
- def to_integer(num)
33
- return num if num.is_a?(Integer)
34
- num = num.to_s
35
- begin
36
- Integer(num)
37
- rescue ::ArgumentError
38
- raise ArgumentError, "invalid integer"
39
- end
40
- end
41
- end
42
- end
43
-
44
- Liquid::Template.register_filter(Jekyll::DocFilters)
@@ -1,43 +0,0 @@
1
- # frozen_string_literal: true
2
- require 'nanoid'
3
- require 'time'
4
-
5
- class EntryVerificationGenerator < Jekyll::Generator
6
- safe true
7
- priority :highest
8
-
9
- def generate(site)
10
- #
11
- # init jekyll vars
12
- #
13
- all_entries = site.collections['entries'].docs
14
- # all_pages = site.pages
15
- all_docs = all_entries # + all_pages
16
-
17
- link_extension = site.config["permalink"] != "pretty" ? '.html' : ''
18
-
19
- all_docs.each do |cur_entry|
20
- # validation and sanitization
21
- prep_entries(site, cur_entry, link_extension)
22
- end
23
- end
24
-
25
- # verify all entries end with a "\n" so sidenotes works
26
- # (sidenotes don't detect the last definition if there is no ending "\n").
27
- def prep_entries(site, entry, link_extension)
28
- # make sure ids are proper nano id format
29
- if !(entry.data['id'] =~ /^[1234567890abcdef]{10}$/)
30
- entry.data['id'] = Nanoid.generate(size: 10, alphabet: '1234567890abcdef')
31
- end
32
- # from: https://stackoverflow.com/questions/16235601/what-are-the-steps-to-getting-this-custom-permalink-scheme-in-jekyll
33
- # Until Jekyll allows me to use :id, I have to resort to this
34
- if link_extension.empty?
35
- entry.data['permalink'] = '/entry/' + entry.data['id'] + '/'
36
- else
37
- entry.data['permalink'] = '/entry/' + entry.data['id'] + link_extension
38
- end
39
- # sanitize timestamps: remove milliseconds from epoch time
40
- entry.data['created'] = Time.at(entry.data['created'].to_s[0..-4].to_i)
41
- entry.data['updated'] = Time.at(entry.data['updated'].to_s[0..-4].to_i)
42
- end
43
- end
data/_plugins/sidenote.rb DELETED
@@ -1,123 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Jekyll
4
- class SideNoteGenerator < Generator
5
- safe true
6
- attr_accessor :md_docs
7
-
8
- ##
9
- # parser constants
10
- ##
11
- # constants are taken from kramdown and baseparser.
12
- # (for easier kramdown integration)
13
-
14
- # from baseparser: https://github.com/ruby/rexml/blob/master/lib/rexml/parsers/baseparser.rb#L36
15
- LETTER = '[:alpha:]'
16
- COMBININGCHAR = '' # TODO
17
- EXTENDER = '' # TODO
18
- NCNAME_STR= "[#{LETTER}_][-[:alnum:]._#{COMBININGCHAR}#{EXTENDER}]*"
19
- UNAME_STR= "(?:#{NCNAME_STR}:)?#{NCNAME_STR}"
20
-
21
- # from kramdown: https://github.com/gettalong/kramdown
22
- # from blank_line.rb
23
- BLANK_LINE = /(?>^\s*\n)+/
24
- # from eob.rb
25
- EOB_MARKER = /^\^\s*?\n/
26
- # from kramdown.rb
27
- OPT_SPACE = / {0,3}/
28
- # Regexp for matching indentation (one tab or four spaces)
29
- INDENT = /^(?:\t| {4})/
30
- # from extensions.rb
31
- ALD_ID_CHARS = /[\w-]/
32
- ALD_ANY_CHARS = /\\\}|[^\}]/
33
- ALD_ID_NAME = /\w#{ALD_ID_CHARS}*/
34
- IAL_BLOCK = /\{:(?!:|\/)(#{ALD_ANY_CHARS}+)\}\s*?\n/
35
- IAL_BLOCK_START = /^#{OPT_SPACE}#{IAL_BLOCK}/
36
- # from html.rb
37
- # Some HTML elements like script belong to both categories (i.e. are valid in block and
38
- # span HTML) and don't appear therefore!
39
- # script, textarea
40
- HTML_SPAN_ELEMENTS = %w[a abbr acronym b big bdo br button cite code del dfn em i img input
41
- ins kbd label mark option q rb rbc rp rt rtc ruby samp select small
42
- span strong sub sup tt u var]
43
- # from paragraph.rb
44
- LAZY_END_HTML_SPAN_ELEMENTS = HTML_SPAN_ELEMENTS + %w[script]
45
- LAZY_END_HTML_START = /<(?>(?!(?:#{LAZY_END_HTML_SPAN_ELEMENTS.join('|')})\b)#{REXML::Parsers::BaseParser::UNAME_STR})/
46
- LAZY_END_HTML_STOP = /<\/(?!(?:#{LAZY_END_HTML_SPAN_ELEMENTS.join('|')})\b)#{REXML::Parsers::BaseParser::UNAME_STR}\s*>/m
47
- # from markdown.rb
48
- # CODEBLOCK_MATCH = /(?:#{BLANK_LINE}?(?:#{INDENT}[ \t]*\S.*\n)+)*/
49
- # because `.gsub(INDENT, '')` in footnote.rb
50
- # CODEBLOCK_MATCH = /(?:#{BLANK_LINE}?(?:s[ \t]*\S.*\n)+)*/
51
- # from codeblock.rb
52
- CODEBLOCK_MATCH = /(?:#{BLANK_LINE}?(?:#{INDENT}[ \t]*\S.*\n)+(?:(?!#{IAL_BLOCK_START}|#{EOB_MARKER}|^#{OPT_SPACE}#{LAZY_END_HTML_STOP}|^#{OPT_SPACE}#{LAZY_END_HTML_START})^[ \t]*\S.*\n)*)*/
53
-
54
- # footnotes (for reference)
55
- # FOOTNOTE_DEFINITION_START = /^#{OPT_SPACE}\[\^(#{ALD_ID_NAME})\]:\s*?(.*?\n#{CODEBLOCK_MATCH})/
56
- # FOOTNOTE_MARKER_START = /\[\^(#{ALD_ID_NAME})\]/
57
- ##
58
- # constants for local use
59
- ##
60
- # right
61
- RIGHT_SIDENOTE_DEFINITION_START = /^#{OPT_SPACE}\[\>(#{ALD_ID_NAME})\]:\s*?(.*?\n#{CODEBLOCK_MATCH})/
62
- RIGHT_SIDENOTE_MARKER_START = /\[\>(#{ALD_ID_NAME})\]/
63
- # left
64
- LEFT_SIDENOTE_DEFINITION_START = /^#{OPT_SPACE}\[\<(#{ALD_ID_NAME})\]:\s*?(.*?\n#{CODEBLOCK_MATCH})/
65
- LEFT_SIDENOTE_MARKER_START = /\[\<(#{ALD_ID_NAME})\]/
66
-
67
- def generate(site)
68
-
69
- # setup markdown docs
70
- docs = site.pages + site.docs_to_write
71
- @md_docs = docs.filter {|doc| site.find_converter_instance(Jekyll::Converters::Markdown).matches(doc.extname) }
72
-
73
- link_extension = !!site.config["use_html_extension"] ? '.html' : ''
74
-
75
- @md_docs.each do |cur_doc|
76
- # check for newlines @ eof.
77
- # (kramdown can handle footnotes with no newline, but the regex i'm getting requires a newline after the last footnote to find it.)
78
- if cur_doc.content[-1] != "\n"
79
- Jekyll.logger.warn "Missing newline at end of file -- this could break sidenotes: ", cur_note.data['title']
80
- end
81
- parse_sidenote(cur_doc, "left")
82
- parse_sidenote(cur_doc, "right")
83
- end
84
- end
85
-
86
- # just get tufte-style sidenotes working for now...
87
- # if there's time, emulate gwern's method: https://github.com/gwern/gwern.net/blob/9e6893033ec63248b1f0b29df119c40d39a7dcef/css/default.css#L1223
88
-
89
- # mark -> [<left-sidenote], [>right-sidenote]
90
- # def -> [<left-sidenote]:, [>right-sidenote]:
91
- # `side` should be 'right' or 'left'
92
- def parse_sidenote(doc, side)
93
- # left v right setup
94
- if side == "right"
95
- sidenote_def_regex = RIGHT_SIDENOTE_DEFINITION_START
96
- # sidenote_mark_regex = RIGHT_SIDENOTE_MARKER_START
97
- css_class = "rsn"
98
- sn_regex = /\>/
99
- elsif side == "left"
100
- sidenote_def_regex = LEFT_SIDENOTE_DEFINITION_START
101
- # sidenote_mark_regex = LEFT_SIDENOTE_MARKER_START
102
- css_class = "lsn"
103
- sn_regex = /\</
104
- else
105
- Jekyll.logger.error "Can't process sidenote that is not either 'right' or 'left'."
106
- return
107
- end
108
- # process sidenotes
109
- sidenotes = doc.content.scan(sidenote_def_regex)
110
- doc.content.gsub!(sidenote_def_regex, '') # rm sidenote defs from original note.
111
- i = 0
112
- sidenotes.each do |sidenote|
113
- i += 1
114
- mark = sidenote[0]
115
- definition = sidenote[1]
116
- doc.content = doc.content.gsub(
117
- /\[#{sn_regex}(#{mark})\]/i,
118
- "<label for=\"#{css_class}-#{i}\" class=\"sidenote-toggle sidenote-number\"></label><input type=\"checkbox\" id=\"#{css_class}-#{i}\" class=\"sidenote-toggle\"><span class=\"#{css_class}\">#{definition}</span>"
119
- )
120
- end
121
- end
122
- end
123
- end
data/_plugins/tags.rb DELETED
@@ -1,52 +0,0 @@
1
- # liquid template to filter between semantic and status tags
2
- module Jekyll
3
- module TagFilters
4
-
5
- # filter tags
6
-
7
- def sem_tags(tags)
8
- return if tags.nil?
9
- site = @context.registers[:site]
10
- sem_tags = []
11
- site.collections['entries'].docs.each do |n|
12
- tags.each do |t|
13
- if n['namespace'] == t
14
- sem_tags << {
15
- 'tag' => n['title'],
16
- # 'namespace' => n['namespace'],
17
- 'url' => n.url
18
- }
19
- end
20
- end
21
- end
22
- return sem_tags
23
- end
24
-
25
- def stat_tags(tags)
26
- return if tags.nil?
27
- site = @context.registers[:site]
28
- stat_tags = []
29
- site.collections['states'].docs.each do |st|
30
- tags.each do |t|
31
- if st['emoji'] == t
32
- stat_tags << {
33
- 'emoji' => st['emoji'],
34
- 'url' => st.url
35
- }
36
- end
37
- end
38
- end
39
- return stat_tags
40
- end
41
-
42
- # filter posts
43
-
44
- def sem_tag_posts(namespace)
45
- return if namespace.nil?
46
- site = @context.registers[:site]
47
- return site.posts.docs.select { |p| p['tags'].include?(namespace) }
48
- end
49
- end
50
- end
51
-
52
- Liquid::Template.register_filter(Jekyll::TagFilters)
data/_sass/base/base.scss DELETED
@@ -1,3 +0,0 @@
1
- @import "./layout";
2
- @import "./main";
3
- @import "./typography";