rawfeed 0.3.0 → 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.
Files changed (195) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +25 -0
  3. data/.gitignore +19 -0
  4. data/.gitlab/ci/gitlab-pages.yml +51 -0
  5. data/.hidden +6 -0
  6. data/404.html +6 -0
  7. data/Gemfile +51 -0
  8. data/README.md +102 -26
  9. data/_config.yml +77 -0
  10. data/_data/generic.yml +29 -0
  11. data/_data/screen/blog.yml +46 -0
  12. data/_data/screen/contact.yml +31 -0
  13. data/_data/screen/donate.yml +45 -0
  14. data/_data/screen/footer.yml +17 -0
  15. data/_data/screen/head.yml +49 -0
  16. data/_data/screen/home.yml +24 -0
  17. data/_data/screen/maintenance.yml +8 -0
  18. data/_data/screen/navbar.yml +41 -0
  19. data/_data/screen/page.yml +12 -0
  20. data/_data/screen/pixels.yml +7 -0
  21. data/_data/screen/pub.yml +4 -0
  22. data/_data/{resume.yml → screen/resume.yml} +8 -8
  23. data/_data/screen/socials.yml +20 -0
  24. data/_includes/assigned +36 -0
  25. data/_includes/layout/blog_search.html +22 -15
  26. data/_includes/layout/disqus.html +7 -8
  27. data/_includes/layout/footer.html +43 -28
  28. data/_includes/layout/giscus.html +15 -19
  29. data/_includes/layout/head.html +97 -75
  30. data/_includes/layout/maintenance.html +14 -11
  31. data/_includes/layout/navbar.html +253 -0
  32. data/_includes/layout/paginator.html +12 -13
  33. data/_includes/{alert → markdown/alert} +2 -2
  34. data/_includes/{chart → markdown/chart} +3 -3
  35. data/_includes/{image → markdown/image} +4 -4
  36. data/_includes/{socials → markdown/socials} +5 -5
  37. data/_includes/{video → markdown/video} +2 -2
  38. data/_layouts/blog/index.html +53 -0
  39. data/_layouts/{post.html → blog/post.html} +50 -36
  40. data/_layouts/blog/posts_by_tag.html +27 -0
  41. data/_layouts/blog/tags.html +32 -0
  42. data/_layouts/contact.html +156 -114
  43. data/_layouts/default.html +53 -48
  44. data/_layouts/donate.html +112 -0
  45. data/_layouts/error.html +9 -7
  46. data/_layouts/home.html +22 -19
  47. data/_layouts/licenses.html +2 -2
  48. data/_layouts/page.html +18 -17
  49. data/_layouts/pixels/index.html +75 -0
  50. data/_layouts/{pixel.html → pixels/post.html} +5 -5
  51. data/_layouts/pub.html +50 -44
  52. data/_layouts/resume.html +308 -265
  53. data/_pages/any-page.md +336 -0
  54. data/_pages/contact.md +16 -0
  55. data/_pages/donate.md +16 -0
  56. data/_pages/licenses.md +17 -0
  57. data/_pages/resume.md +14 -0
  58. data/_pixels/2025-10-15-first-my-pixel.md +34 -0
  59. data/_posts/2025-09-20-welcome-to-jekyll.md +36 -0
  60. data/_posts/2025-09-25-this-post-demonstrates-post-codeblocks.md +141 -0
  61. data/_posts/2025-09-25-this-post-demonstrates-post-content-styles.md +133 -0
  62. data/_posts/2025-10-04-content-styles-and-codeblocks.md +330 -0
  63. data/_sass/components/_markdown.scss +2 -2
  64. data/_sass/includes/_index.scss +2 -2
  65. data/_sass/includes/{_header.scss → _navbar.scss} +2 -6
  66. data/_sass/includes/_toc.scss +146 -0
  67. data/_sass/layouts/_blog.scss +1 -1
  68. data/_sass/layouts/_index.scss +2 -2
  69. data/_sass/layouts/_page.scss +0 -5
  70. data/_sass/layouts/_post.scss +8 -138
  71. data/_sass/layouts/{_tag-posts.scss → _posts_by_tag.scss} +3 -3
  72. data/_sass/layouts/_resume.scss +1 -1
  73. data/_sass/layouts/{_tag.scss → _tags.scss} +10 -6
  74. data/_sass/main.scss +2 -2
  75. data/_sass/theme/_dark.scss +2 -2
  76. data/_sass/theme/_light.scss +1 -1
  77. data/assets/js/blog.js +52 -18
  78. data/assets/js/contact.js +21 -20
  79. data/assets/js/default.js +67 -50
  80. data/assets/js/discus.js +2 -2
  81. data/assets/js/{donation.js → donate.js} +10 -9
  82. data/assets/js/home.js +18 -16
  83. data/assets/js/page.js +50 -172
  84. data/assets/js/toc.js +133 -0
  85. data/assets/json/blog_search.json +5 -7
  86. data/assets/vendors/fuse.min.js +9 -0
  87. data/blog/index.md +14 -0
  88. data/blog/tags/index.md +12 -0
  89. data/exe/rawfeed +29 -0
  90. data/index.md +15 -0
  91. data/lib/rawfeed/build/cleaner.rb +60 -0
  92. data/lib/rawfeed/build/image_minifier.rb +163 -0
  93. data/lib/rawfeed/build/minifier.rb +89 -0
  94. data/lib/rawfeed/build.rb +9 -0
  95. data/lib/rawfeed/command/backup.rb +124 -0
  96. data/lib/rawfeed/command/cli.rb +118 -0
  97. data/lib/rawfeed/command/installer.rb +156 -0
  98. data/lib/rawfeed/command/tools.rb +138 -0
  99. data/lib/rawfeed/{author.rb → content/author.rb} +7 -7
  100. data/lib/rawfeed/content/contact.rb +51 -0
  101. data/lib/rawfeed/content/donate.rb +48 -0
  102. data/lib/rawfeed/{draft.rb → content/draft.rb} +5 -3
  103. data/lib/rawfeed/content/licenses.rb +46 -0
  104. data/lib/rawfeed/{page.rb → content/page.rb} +4 -3
  105. data/lib/rawfeed/{pixel.rb → content/pixel.rb} +7 -4
  106. data/lib/rawfeed/content/post.rb +107 -0
  107. data/lib/rawfeed/{resume.rb → content/resume.rb} +23 -19
  108. data/lib/rawfeed/{layout.rb → core/layout.rb} +1 -1
  109. data/lib/rawfeed/core/utils.rb +103 -0
  110. data/lib/rawfeed/{version.rb → core/version.rb} +1 -1
  111. data/lib/rawfeed/{datelang.rb → plugin/datelang.rb} +5 -6
  112. data/lib/rawfeed/{pub.rb → plugin/pub.rb} +33 -31
  113. data/lib/rawfeed/{reading_time.rb → plugin/reading_time.rb} +5 -4
  114. data/lib/rawfeed/root.rb +3 -0
  115. data/lib/rawfeed.rb +36 -14
  116. data/pixels/index.md +11 -0
  117. data/robots.txt +26 -0
  118. metadata +153 -195
  119. data/_data/options.yml +0 -329
  120. data/_includes/layout/data.liquid +0 -31
  121. data/_includes/layout/header.html +0 -173
  122. data/_layouts/blog.html +0 -52
  123. data/_layouts/donation.html +0 -113
  124. data/_layouts/pixels.html +0 -71
  125. data/_layouts/tag.html +0 -33
  126. data/_layouts/tag_posts.html +0 -28
  127. data/assets/vendor/simple-jekyll-search.js +0 -433
  128. data/assets/vendor/simple-jekyll-search.min.js +0 -6
  129. data/lib/rawfeed/installer.rb +0 -37
  130. data/lib/rawfeed/post.rb +0 -60
  131. data/lib/rawfeed/utils.rb +0 -75
  132. /data/_includes/{details → markdown/details} +0 -0
  133. /data/_includes/{enddetails → markdown/enddetails} +0 -0
  134. /data/_includes/{endtabs → markdown/endtabs} +0 -0
  135. /data/_includes/{tabs → markdown/tabs} +0 -0
  136. /data/assets/images/{avatar_back.png → avatars/back.png} +0 -0
  137. /data/assets/images/{avatar_dark.png → avatars/dark.png} +0 -0
  138. /data/assets/images/{avatar_light.png → avatars/light.png} +0 -0
  139. /data/assets/images/{icons → donate}/bitcoin.svg +0 -0
  140. /data/assets/images/{icons → donate}/card.svg +0 -0
  141. /data/assets/images/{icons → donate}/donation.svg +0 -0
  142. /data/assets/images/{icons → donate}/lightning_network.svg +0 -0
  143. /data/assets/images/{icons → donate}/paypal.svg +0 -0
  144. /data/assets/images/{icons → donate}/pix.svg +0 -0
  145. /data/assets/images/{qrcode_btc_binance.jpg → donate/qrcode_btc_binance.jpg} +0 -0
  146. /data/assets/images/{qrcode_inter.jpg → donate/qrcode_inter.jpg} +0 -0
  147. /data/assets/images/{qrcode_wos.jpg → donate/qrcode_wos.jpg} +0 -0
  148. /data/assets/images/{icons → donate}/wos.png +0 -0
  149. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-grid.css +0 -0
  150. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-grid.css.map +0 -0
  151. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-grid.min.css +0 -0
  152. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-grid.min.css.map +0 -0
  153. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-grid.rtl.css +0 -0
  154. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-grid.rtl.css.map +0 -0
  155. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-grid.rtl.min.css +0 -0
  156. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-grid.rtl.min.css.map +0 -0
  157. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-reboot.css +0 -0
  158. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-reboot.css.map +0 -0
  159. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-reboot.min.css +0 -0
  160. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-reboot.min.css.map +0 -0
  161. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-reboot.rtl.css +0 -0
  162. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-reboot.rtl.css.map +0 -0
  163. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-reboot.rtl.min.css +0 -0
  164. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-reboot.rtl.min.css.map +0 -0
  165. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-utilities.css +0 -0
  166. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-utilities.css.map +0 -0
  167. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-utilities.min.css +0 -0
  168. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-utilities.min.css.map +0 -0
  169. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-utilities.rtl.css +0 -0
  170. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-utilities.rtl.css.map +0 -0
  171. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-utilities.rtl.min.css +0 -0
  172. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap-utilities.rtl.min.css.map +0 -0
  173. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap.css +0 -0
  174. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap.css.map +0 -0
  175. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap.min.css +0 -0
  176. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap.min.css.map +0 -0
  177. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap.rtl.css +0 -0
  178. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap.rtl.css.map +0 -0
  179. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap.rtl.min.css +0 -0
  180. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/css/bootstrap.rtl.min.css.map +0 -0
  181. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/js/bootstrap.bundle.js +0 -0
  182. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/js/bootstrap.bundle.js.map +0 -0
  183. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/js/bootstrap.bundle.min.js +0 -0
  184. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/js/bootstrap.bundle.min.js.map +0 -0
  185. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/js/bootstrap.esm.js +0 -0
  186. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/js/bootstrap.esm.js.map +0 -0
  187. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/js/bootstrap.esm.min.js +0 -0
  188. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/js/bootstrap.esm.min.js.map +0 -0
  189. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/js/bootstrap.js +0 -0
  190. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/js/bootstrap.js.map +0 -0
  191. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/js/bootstrap.min.js +0 -0
  192. /data/assets/{vendor/bootstrap → vendors/bootstrap-5.2.3}/js/bootstrap.min.js.map +0 -0
  193. /data/lib/rawfeed/{csp_filters.rb → plugin/csp_filters.rb} +0 -0
  194. /data/lib/rawfeed/{typescript_liquid.rb → plugin/typescript_liquid.rb} +0 -0
  195. /data/lib/rawfeed/{with_class.rb → plugin/with_class.rb} +0 -0
data/assets/js/discus.js CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  ---
3
3
 
4
- {%- include layout/data.liquid -%}
4
+ {%- include assigned -%}
5
5
 
6
6
 
7
7
  document.addEventListener("DOMContentLoaded", () => {
@@ -11,7 +11,7 @@ document.addEventListener("DOMContentLoaded", () => {
11
11
  /**
12
12
  * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES
13
13
  */
14
- var disqus_shortname = '{{ blog_.post.comments.disqus.shortname }}';
14
+ var disqus_shortname = '{{ blog.post.comments.disqus.shortname }}';
15
15
 
16
16
  // The unique URL for the discussion, usually the post's permalink.
17
17
  var disqus_config = function () {
@@ -1,18 +1,18 @@
1
1
  ---
2
2
  ---
3
3
 
4
- {%- include layout/data.liquid -%}
5
-
4
+ {%- include assigned -%}
6
5
 
7
6
  document.addEventListener("DOMContentLoaded", () => {
8
7
  const donation = document.getElementById("donation");
9
- if (!donation) return;
8
+ if (! donation) return;
9
+
10
10
 
11
11
  document.querySelectorAll(".donation__btn--copy").forEach(btn => {
12
- btn.addEventListener("click", function () {
12
+ btn.addEventListener("click", function() {
13
13
  navigator.clipboard.writeText(this.dataset.copy).then(() => {
14
- this.innerText = "{{ donation_.copy_button.clicked }}";
15
- setTimeout(() => this.innerText = "{{ donation_.copy_button.text }}", 2000);
14
+ this.innerText = "{{ donate.copy_button.clicked }}";
15
+ setTimeout(() => this.innerText = "{{ donate.copy_button.text }}", 2000);
16
16
  });
17
17
  });
18
18
  });
@@ -22,9 +22,10 @@ document.addEventListener("DOMContentLoaded", () => {
22
22
  const qrModalImg = document.getElementById('qrModalImg');
23
23
 
24
24
  document.querySelectorAll(".clickable-qr").forEach(img => {
25
- img.addEventListener("click", function () {
26
- qrModalImg.src = this.dataset.qr;
25
+ img.addEventListener("click", function() {
26
+ if (qrModalImg) {
27
+ qrModalImg.src = this.dataset.qr;
28
+ }
27
29
  });
28
30
  });
29
-
30
31
  });
data/assets/js/home.js CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  ---
3
3
 
4
- {%- include layout/data.liquid -%}
4
+ {%- include assigned -%}
5
5
 
6
6
  document.addEventListener("DOMContentLoaded", () => {
7
7
 
@@ -13,13 +13,15 @@ document.addEventListener("DOMContentLoaded", () => {
13
13
  // ----------------------------------------------------------------------------------------------
14
14
  const btnMax = terminal.querySelector(".terminal-header__max");
15
15
 
16
- let isFullscreen = false;
16
+ if (btnMax) {
17
+ let isFullscreen = false;
17
18
 
18
- // maximize/restore
19
- btnMax.addEventListener("click", () => {
20
- isFullscreen = !isFullscreen;
21
- terminal.classList.toggle("terminal-fullscreen", isFullscreen);
22
- });
19
+ // maximize/restore
20
+ btnMax.addEventListener("click", () => {
21
+ isFullscreen = !isFullscreen;
22
+ terminal.classList.toggle("terminal-fullscreen", isFullscreen);
23
+ });
24
+ }
23
25
 
24
26
  // populate the terminal
25
27
  // ----------------------------------------------------------------------------------------------
@@ -28,9 +30,9 @@ document.addEventListener("DOMContentLoaded", () => {
28
30
 
29
31
  const commands = {
30
32
  // Multiple string is the same as using ` in Javascript
31
- help: `{{ home_.terminal.help.menu }}`,
33
+ help: `{{ home.terminal.help.menu }}`,
32
34
  about: document.getElementById("home-content").innerHTML,
33
- socials: socialsEl ? socialsEl.innerHTML : "{{ home_.terminal.no_socials }}"
35
+ socials: socialsEl ? socialsEl.innerHTML : "{{ home.terminal.no_socials }}"
34
36
  };
35
37
 
36
38
  const createInputLine = () => {
@@ -39,7 +41,7 @@ document.addEventListener("DOMContentLoaded", () => {
39
41
 
40
42
  const prompt = document.createElement("span");
41
43
  prompt.className = "prompt";
42
- prompt.textContent = "[{{ home_.terminal.user }}@{{ home_.terminal.hostname }} ~]$";
44
+ prompt.textContent = "[{{ home.terminal.user }}@{{ home.terminal.hostname }} ~]{{ home.terminal.signal }}";
43
45
 
44
46
  // wrapper para conter input, cursor e measure
45
47
  const wrapper = document.createElement("span");
@@ -48,7 +50,7 @@ document.addEventListener("DOMContentLoaded", () => {
48
50
  const input = document.createElement("input");
49
51
  input.type = "text";
50
52
  input.className = "input";
51
- input.placeholder = `{{ home_.terminal.welcome }}`;
53
+ input.placeholder = `{{ home.terminal.welcome }}`;
52
54
  input.spellcheck = false;
53
55
  input.autocomplete = "off";
54
56
  input.autocorrect = "off";
@@ -191,7 +193,7 @@ document.addEventListener("DOMContentLoaded", () => {
191
193
  } else if (cmd === "clear") {
192
194
  screen.innerHTML = "";
193
195
  } else if (cmd) {
194
- commandsPrint(cmd + `{{ home_.terminal.error }}`, "text");
196
+ commandsPrint(cmd + `{{ home.terminal.error }}`, "text");
195
197
  }
196
198
  };
197
199
 
@@ -200,13 +202,13 @@ document.addEventListener("DOMContentLoaded", () => {
200
202
  wrapper.className = "line-wrapper";
201
203
  const helpDescription = document.createElement("span");
202
204
  helpDescription.className = "help-description";
203
- helpDescription.innerHTML = `{{ home_.terminal.help.description | markdownify }}`;
205
+ helpDescription.innerHTML = `{{ home.terminal.help.description | markdownify }}`;
204
206
  const helpCommandTitle = document.createElement("span");
205
207
  helpCommandTitle.className = "help-commands__title";
206
- helpCommandTitle.textContent = "{{ home_.terminal.help.commands.title }}";
208
+ helpCommandTitle.textContent = "{{ home.terminal.help.commands.title }}";
207
209
  const helpCommandDesc = document.createElement("span");
208
210
  helpCommandDesc.className = "help-commands__desc";
209
- helpCommandDesc.textContent = `{{ home_.terminal.help.commands.description }}`;
211
+ helpCommandDesc.textContent = `{{ home.terminal.help.commands.description }}`;
210
212
 
211
213
  wrapper.appendChild(helpDescription);
212
214
  wrapper.appendChild(helpCommandTitle);
@@ -228,7 +230,7 @@ document.addEventListener("DOMContentLoaded", () => {
228
230
  wrapper.className = "line-wrapper";
229
231
  const socialsCommandDesc = document.createElement("span");
230
232
  socialsCommandDesc.className = "socials-command__desc";
231
- socialsCommandDesc.textContent = `{{ socials_.description.terminal.command.description }}`;
233
+ socialsCommandDesc.textContent = `{{ socials.description.terminal.command.description }}`;
232
234
 
233
235
  screen.appendChild(socialsCommandDesc);
234
236
 
data/assets/js/page.js CHANGED
@@ -1,9 +1,6 @@
1
1
  ---
2
2
  ---
3
3
 
4
- {%- include layout/data.liquid -%}
5
-
6
-
7
4
  document.addEventListener("DOMContentLoaded", () => {
8
5
 
9
6
  /* details
@@ -18,7 +15,7 @@ document.addEventListener("DOMContentLoaded", () => {
18
15
  function initDetails(){
19
16
  const starts = document.querySelectorAll('.details-start');
20
17
  starts.forEach(start => {
21
- const summary = start.getAttribute('data-summary') || 'Detalhes';
18
+ const summary = start.getAttribute('data-summary') || 'Details';
22
19
 
23
20
  let end = start.nextSibling;
24
21
  while(end && !(end.nodeType === 1 && end.classList.contains('details-end'))){
@@ -167,184 +164,65 @@ document.addEventListener("DOMContentLoaded", () => {
167
164
 
168
165
  const chart_elements = document.querySelectorAll('[id^="chart-"]');
169
166
 
170
- for (const ctx of chart_elements) {
171
- const data = ctx.dataset;
167
+ if (typeof Chart === 'undefined') {
168
+ console.warn('Chart.js not loaded — skipping chart rendering');
169
+ } else {
170
+ for (const ctx of chart_elements) {
171
+ const data = ctx.dataset;
172
+ if (!data || !data.type || !data.labels || !data.data) {
173
+ console.warn('Chart element missing required data attributes — skipping');
174
+ continue;
175
+ }
172
176
 
173
- new Chart(ctx, {
174
- type: data.type,
175
- data: {
176
- labels: data.labels.split(","),
177
- datasets: [
178
- {
179
- label: data.label,
180
- data: data.data.split(",").map(Number),
181
- borderColor: data.color,
182
- backgroundColor: `${data.color}33`,
183
- fill: true,
184
- tension: 0.3,
185
- borderWidth: 2,
186
- pointRadius: 4,
187
- pointHoverRadius: 6
188
- }
189
- ]
190
- },
191
- options: {
192
- responsive: true,
193
- plugins: {
194
- legend: {
195
- display: true,
196
- labels: {
197
- color: "#444444"
177
+ new Chart(ctx, {
178
+ type: data.type,
179
+ data: {
180
+ labels: data.labels.split(","),
181
+ datasets: [
182
+ {
183
+ label: data.label,
184
+ data: data.data.split(",").map(Number),
185
+ borderColor: data.color,
186
+ backgroundColor: `${data.color}33`,
187
+ fill: true,
188
+ tension: 0.3,
189
+ borderWidth: 2,
190
+ pointRadius: 4,
191
+ pointHoverRadius: 6
198
192
  }
199
- }
193
+ ]
200
194
  },
201
- scales: {
202
- x: {
203
- ticks: {
204
- color: "#131313"
205
- },
206
- grid: {
207
- color: "#111111"
195
+ options: {
196
+ responsive: true,
197
+ plugins: {
198
+ legend: {
199
+ display: true,
200
+ labels: {
201
+ color: "#444444"
202
+ }
208
203
  }
209
204
  },
210
- y: {
211
- ticks: {
212
- color: "#131313"
205
+ scales: {
206
+ x: {
207
+ ticks: {
208
+ color: "#131313"
209
+ },
210
+ grid: {
211
+ color: "#111111"
212
+ }
213
213
  },
214
- grid: {
215
- color: "#111111"
214
+ y: {
215
+ ticks: {
216
+ color: "#131313"
217
+ },
218
+ grid: {
219
+ color: "#111111"
220
+ }
216
221
  }
217
222
  }
218
223
  }
219
- }
220
- });
221
- }
222
-
223
- /* Automatic TOC
224
- # ------------------------------------------------------------------------------------------------
225
- */
226
-
227
- function initAutoTOC() {
228
- const selector = '.post-content, .page-content';
229
- const content = document.querySelector(selector);
230
- if (!content) return;
231
-
232
- const maxLevel = 3;
233
- const headings = Array.from(content.querySelectorAll('h1, h2, h3'))
234
- .filter(h => parseInt(h.tagName[1]) <= maxLevel);
235
-
236
- if (headings.length === 0) return;
237
-
238
- // Create TOC container
239
- const tocContainer = document.createElement('nav');
240
- tocContainer.id = 'auto-toc';
241
- tocContainer.className = 'auto-toc';
242
-
243
- // Create Bars (risquinhos) - Minimized State
244
- const barsContainer = document.createElement('div');
245
- barsContainer.className = 'auto-toc-bars';
246
- for (let i = 0; i < 20; i++) {
247
- const bar = document.createElement('div');
248
- bar.className = 'toc-bar';
249
- barsContainer.appendChild(bar);
250
- }
251
- tocContainer.appendChild(barsContainer);
252
-
253
- // Create Content Wrapper - Expanded State
254
- const contentWrapper = document.createElement('div');
255
- contentWrapper.className = 'auto-toc-content';
256
-
257
- const title = document.createElement('h2');
258
- title.textContent = '{{ page_.toc.title }}';
259
- contentWrapper.appendChild(title);
260
-
261
- const tocList = document.createElement('ul');
262
- tocList.className = 'auto-toc-list';
263
- contentWrapper.appendChild(tocList);
264
-
265
- const slugify = (text) => {
266
- if (!text) return '';
267
- return text.toString().toLowerCase().trim()
268
- .normalize('NFKD').replace(/[\u0300-\u036f]/g, '')
269
- .replace(/[^\w\s-]/g, '')
270
- .replace(/\s+/g, '-')
271
- .replace(/--+/g, '-');
272
- };
273
-
274
- const idCounts = {};
275
- const offset = 20;
276
-
277
- const stack = [{ level: 0, ul: tocList }];
278
-
279
- headings.forEach((h, i) => {
280
- if (!h.id) {
281
- let id = slugify(h.textContent);
282
- if (!id) id = 'section';
283
- if (idCounts[id]) {
284
- idCounts[id]++;
285
- id = `${id}-${idCounts[id]}`;
286
- } else {
287
- idCounts[id] = 1;
288
- }
289
- h.id = id;
290
- }
291
-
292
- const level = parseInt(h.tagName[1]);
293
- const li = document.createElement('li');
294
- const a = document.createElement('a');
295
- a.href = `#${h.id}`;
296
- a.textContent = h.textContent.trim();
297
-
298
- a.addEventListener('click', (e) => {
299
- e.preventDefault();
300
- window.scrollTo({
301
- top: h.getBoundingClientRect().top + window.scrollY - offset,
302
- behavior: 'smooth'
303
- });
304
- history.replaceState(null, '', `#${h.id}`);
305
224
  });
306
-
307
- li.appendChild(a);
308
-
309
- while (stack.length > 1 && level <= stack[stack.length - 1].level) {
310
- stack.pop();
311
- }
312
-
313
- const parent = stack[stack.length - 1].ul;
314
- parent.appendChild(li);
315
-
316
- const next = headings[i + 1];
317
- if (next) {
318
- const nextLevel = parseInt(next.tagName[1]);
319
- if (nextLevel > level) {
320
- const newUl = document.createElement('ul');
321
- li.appendChild(newUl);
322
- stack.push({ level, ul: newUl });
323
- }
324
- }
325
- });
326
-
327
- tocContainer.appendChild(contentWrapper);
328
- document.body.appendChild(tocContainer);
329
-
330
- // Active link highlighting
331
- const links = tocList.querySelectorAll('a');
332
- const onScroll = () => {
333
- const fromTop = window.scrollY + offset + 1;
334
- let current = headings[0];
335
- for (const h of headings) {
336
- if (h.offsetTop <= fromTop) current = h;
337
- }
338
- for (const l of links) {
339
- l.classList.toggle('active', l.getAttribute('href') === `#${current.id}`);
340
- }
341
- };
342
-
343
- window.addEventListener('scroll', onScroll, { passive: true });
344
- onScroll();
225
+ }
345
226
  }
346
227
 
347
- initAutoTOC();
348
-
349
-
350
228
  });
data/assets/js/toc.js ADDED
@@ -0,0 +1,133 @@
1
+ ---
2
+ ---
3
+
4
+ {%- include assigned -%}
5
+
6
+ document.addEventListener("DOMContentLoaded", () => {
7
+
8
+ /* Automatic TOC
9
+ # ------------------------------------------------------------------------------------------------
10
+ */
11
+
12
+ function initAutoTOC() {
13
+ const selector = '.post-content, .page-content';
14
+ const content = document.querySelector(selector);
15
+ if (!content) return;
16
+
17
+ const maxLevel = 3;
18
+ const headings = Array.from(content.querySelectorAll('h1, h2, h3'))
19
+ .filter(h => parseInt(h.tagName[1]) <= maxLevel);
20
+
21
+ if (headings.length === 0) return;
22
+
23
+ // Create TOC container
24
+ const tocContainer = document.createElement('nav');
25
+ tocContainer.id = 'auto-toc';
26
+ tocContainer.className = 'auto-toc';
27
+
28
+ // Create Bars (risquinhos) - Minimized State
29
+ const barsContainer = document.createElement('div');
30
+ barsContainer.className = 'auto-toc-bars';
31
+ for (let i = 0; i < 20; i++) {
32
+ const bar = document.createElement('div');
33
+ bar.className = 'toc-bar';
34
+ barsContainer.appendChild(bar);
35
+ }
36
+ tocContainer.appendChild(barsContainer);
37
+
38
+ // Create Content Wrapper - Expanded State
39
+ const contentWrapper = document.createElement('div');
40
+ contentWrapper.className = 'auto-toc-content';
41
+
42
+ const title = document.createElement('h2');
43
+ title.textContent = '{{ page_data.toc.title }}';
44
+ contentWrapper.appendChild(title);
45
+
46
+ const tocList = document.createElement('ul');
47
+ tocList.className = 'auto-toc-list';
48
+ contentWrapper.appendChild(tocList);
49
+
50
+ const slugify = (text) => {
51
+ if (!text) return '';
52
+ return text.toString().toLowerCase().trim()
53
+ .normalize('NFKD').replace(/[\u0300-\u036f]/g, '')
54
+ .replace(/[^\w\s-]/g, '')
55
+ .replace(/\s+/g, '-')
56
+ .replace(/--+/g, '-');
57
+ };
58
+
59
+ const idCounts = {};
60
+ const offset = 20;
61
+
62
+ const stack = [{ level: 0, ul: tocList }];
63
+
64
+ headings.forEach((h, i) => {
65
+ if (!h.id) {
66
+ let id = slugify(h.textContent);
67
+ if (!id) id = 'section';
68
+ if (idCounts[id]) {
69
+ idCounts[id]++;
70
+ id = `${id}-${idCounts[id]}`;
71
+ } else {
72
+ idCounts[id] = 1;
73
+ }
74
+ h.id = id;
75
+ }
76
+
77
+ const level = parseInt(h.tagName[1]);
78
+ const li = document.createElement('li');
79
+ const a = document.createElement('a');
80
+ a.href = `#${h.id}`;
81
+ a.textContent = h.textContent.trim();
82
+
83
+ a.addEventListener('click', (e) => {
84
+ e.preventDefault();
85
+ window.scrollTo({
86
+ top: h.getBoundingClientRect().top + window.scrollY - offset,
87
+ behavior: 'smooth'
88
+ });
89
+ history.replaceState(null, '', `#${h.id}`);
90
+ });
91
+
92
+ li.appendChild(a);
93
+
94
+ while (stack.length > 1 && level <= stack[stack.length - 1].level) {
95
+ stack.pop();
96
+ }
97
+
98
+ const parent = stack[stack.length - 1].ul;
99
+ parent.appendChild(li);
100
+
101
+ const next = headings[i + 1];
102
+ if (next) {
103
+ const nextLevel = parseInt(next.tagName[1]);
104
+ if (nextLevel > level) {
105
+ const newUl = document.createElement('ul');
106
+ li.appendChild(newUl);
107
+ stack.push({ level, ul: newUl });
108
+ }
109
+ }
110
+ });
111
+
112
+ tocContainer.appendChild(contentWrapper);
113
+ document.body.appendChild(tocContainer);
114
+
115
+ // Active link highlighting
116
+ const links = tocList.querySelectorAll('a');
117
+ const onScroll = () => {
118
+ const fromTop = window.scrollY + offset + 1;
119
+ let current = headings[0];
120
+ for (const h of headings) {
121
+ if (h.offsetTop <= fromTop) current = h;
122
+ }
123
+ for (const l of links) {
124
+ l.classList.toggle('active', l.getAttribute('href') === `#${current.id}`);
125
+ }
126
+ };
127
+
128
+ window.addEventListener('scroll', onScroll, { passive: true });
129
+ onScroll();
130
+ }
131
+
132
+ initAutoTOC();
133
+ });
@@ -2,15 +2,13 @@
2
2
  layout: none
3
3
  ---
4
4
 
5
- {%- include layout/data.liquid -%}
5
+ {%- include assigned -%}
6
6
 
7
7
  [
8
- {% for post in site.posts %}
8
+ {%- for post in site.posts -%}
9
9
  {
10
10
  "title" : "{{ post.title | escape }}",
11
- "tags" : "{{ post.tags | join: ', ' }}",
12
- "url" : "{{ site.baseurl }}{{ post.url }}",
13
- "date" : "{% datelang post.date format:datelang_.format %}"
14
- } {% unless forloop.last %},{% endunless %}
15
- {% endfor %}
11
+ "tags" : "{{ post.tags | join: ', ' }}"
12
+ } {%- unless forloop.last -%},{%- endunless -%}
13
+ {%- endfor -%}
16
14
  ]
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Fuse.js v7.1.0 - Lightweight fuzzy-search (http://fusejs.io)
3
+ *
4
+ * Copyright (c) 2025 Kiro Risk (http://kiro.me)
5
+ * All Rights Reserved. Apache Software License 2.0
6
+ *
7
+ * http://www.apache.org/licenses/LICENSE-2.0
8
+ */
9
+ var e,t;e=this,t=function(){"use strict";function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v(r.key),r)}}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function h(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=a(e);if(t){var i=a(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function f(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function g(e){return Array.isArray?Array.isArray(e):"[object Array]"===M(e)}var y=1/0;function p(e){return null==e?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-y?"-0":t}(e)}function A(e){return"string"==typeof e}function m(e){return"number"==typeof e}function C(e){return!0===e||!1===e||function(e){return k(e)&&null!==e}(e)&&"[object Boolean]"==M(e)}function k(e){return"object"===n(e)}function E(e){return null!=e}function F(e){return!e.trim().length}function M(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var b=function(e){return"Missing ".concat(e," property in key")},D=function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")},B=Object.prototype.hasOwnProperty,x=function(){function e(t){var n=this;r(this,e),this._keys=[],this._keyMap={};var i=0;t.forEach((function(e){var t=w(e);n._keys.push(t),n._keyMap[t.id]=t,i+=t.weight})),this._keys.forEach((function(e){e.weight/=i}))}return u(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function w(e){var t=null,n=null,r=null,i=1,u=null;if(A(e)||g(e))r=e,t=S(e),n=L(e);else{if(!B.call(e,"name"))throw new Error(b("name"));var o=e.name;if(r=o,B.call(e,"weight")&&(i=e.weight)<=0)throw new Error(D(o));t=S(o),n=L(o),u=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:u}}function S(e){return g(e)?e:e.split(".")}function L(e){return g(e)?e.join("."):e}var _={useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,i,u){if(E(t))if(i[u]){var o=t[i[u]];if(!E(o))return;if(u===i.length-1&&(A(o)||m(o)||C(o)))n.push(p(o));else if(g(o)){r=!0;for(var c=0,a=o.length;c<a;c+=1)e(o[c],i,u+1)}else i.length&&e(o,i,u+1)}else n.push(t)}(e,A(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},O=t(t(t(t({},{isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}}),{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1}),{location:0,threshold:.6,distance:100}),_),j=/[^ ]+/g,I=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,i=void 0===n?O.getFn:n,u=t.fieldNormWeight,o=void 0===u?O.fieldNormWeight:u;r(this,e),this.norm=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=new Map,r=Math.pow(10,t);return{get:function(t){var i=t.match(j).length;if(n.has(i))return n.get(i);var u=1/Math.pow(i,.5*e),o=parseFloat(Math.round(u*r)/r);return n.set(i,o),o},clear:function(){n.clear()}}}(o,3),this.getFn=i,this.isCreated=!1,this.setIndexRecords()}return u(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,A(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();A(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(E(e)&&!F(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach((function(t,i){var u=t.getFn?t.getFn(e):n.getFn(e,t.path);if(E(u))if(g(u)){for(var o=[],c=[{nestedArrIndex:-1,value:u}];c.length;){var a=c.pop(),s=a.nestedArrIndex,h=a.value;if(E(h))if(A(h)&&!F(h)){var l={v:h,i:s,n:n.norm.get(h)};o.push(l)}else g(h)&&h.forEach((function(e,t){c.push({nestedArrIndex:t,value:e})}))}r.$[i]=o}else if(A(u)&&!F(u)){var f={v:u,n:n.norm.get(u)};r.$[i]=f}})),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function $(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?O.getFn:r,u=n.fieldNormWeight,o=void 0===u?O.fieldNormWeight:u,c=new I({getFn:i,fieldNormWeight:o});return c.setKeys(e.map(w)),c.setSources(t),c.create(),c}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,u=void 0===i?0:i,o=t.expectedLocation,c=void 0===o?0:o,a=t.distance,s=void 0===a?O.distance:a,h=t.ignoreLocation,l=void 0===h?O.ignoreLocation:h,f=r/e.length;if(l)return f;var d=Math.abs(c-u);return s?f+d/s:d?1:f}var N=32;function P(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,u=void 0===i?O.location:i,o=r.distance,c=void 0===o?O.distance:o,a=r.threshold,s=void 0===a?O.threshold:a,h=r.findAllMatches,l=void 0===h?O.findAllMatches:h,f=r.minMatchCharLength,d=void 0===f?O.minMatchCharLength:f,v=r.includeMatches,g=void 0===v?O.includeMatches:v,y=r.ignoreLocation,p=void 0===y?O.ignoreLocation:y;if(t.length>N)throw new Error("Pattern length exceeds max of ".concat(N,"."));for(var A,m=t.length,C=e.length,k=Math.max(0,Math.min(u,C)),E=s,F=k,M=d>1||g,b=M?Array(C):[];(A=e.indexOf(t,F))>-1;){var D=R(t,{currentLocation:A,expectedLocation:k,distance:c,ignoreLocation:p});if(E=Math.min(D,E),F=A+m,M)for(var B=0;B<m;)b[A+B]=1,B+=1}F=-1;for(var x=[],w=1,S=m+C,L=1<<m-1,_=0;_<m;_+=1){for(var j=0,I=S;j<I;)R(t,{errors:_,currentLocation:k+I,expectedLocation:k,distance:c,ignoreLocation:p})<=E?j=I:S=I,I=Math.floor((S-j)/2+j);S=I;var $=Math.max(1,k-I+1),P=l?C:Math.min(k+I,C)+m,W=Array(P+2);W[P+1]=(1<<_)-1;for(var z=P;z>=$;z-=1){var T=z-1,K=n[e.charAt(T)];if(M&&(b[T]=+!!K),W[z]=(W[z+1]<<1|1)&K,_&&(W[z]|=(x[z+1]|x[z])<<1|1|x[z+1]),W[z]&L&&(w=R(t,{errors:_,currentLocation:T,expectedLocation:k,distance:c,ignoreLocation:p}))<=E){if(E=w,(F=T)<=k)break;$=Math.max(1,2*k-F)}}if(R(t,{errors:_+1,currentLocation:k,expectedLocation:k,distance:c,ignoreLocation:p})>E)break;x=W}var q={isMatch:F>=0,score:Math.max(.001,w)};if(M){var J=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O.minMatchCharLength,n=[],r=-1,i=-1,u=0,o=e.length;u<o;u+=1){var c=e[u];c&&-1===r?r=u:c||-1===r||((i=u-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[u-1]&&u-r>=t&&n.push([r,u-1]),n}(b,d);J.length?g&&(q.indices=J):q.isMatch=!1}return q}function W(e){for(var t={},n=0,r=e.length;n<r;n+=1){var i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var z=String.prototype.normalize?function(e){return e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")}:function(e){return e},T=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=i.location,o=void 0===u?O.location:u,c=i.threshold,a=void 0===c?O.threshold:c,s=i.distance,h=void 0===s?O.distance:s,l=i.includeMatches,f=void 0===l?O.includeMatches:l,d=i.findAllMatches,v=void 0===d?O.findAllMatches:d,g=i.minMatchCharLength,y=void 0===g?O.minMatchCharLength:g,p=i.isCaseSensitive,A=void 0===p?O.isCaseSensitive:p,m=i.ignoreDiacritics,C=void 0===m?O.ignoreDiacritics:m,k=i.ignoreLocation,E=void 0===k?O.ignoreLocation:k;if(r(this,e),this.options={location:o,threshold:a,distance:h,includeMatches:f,findAllMatches:v,minMatchCharLength:y,isCaseSensitive:A,ignoreDiacritics:C,ignoreLocation:E},t=A?t:t.toLowerCase(),t=C?z(t):t,this.pattern=t,this.chunks=[],this.pattern.length){var F=function(e,t){n.chunks.push({pattern:e,alphabet:W(e),startIndex:t})},M=this.pattern.length;if(M>N){for(var b=0,D=M%N,B=M-D;b<B;)F(this.pattern.substr(b,N),b),b+=N;if(D){var x=M-N;F(this.pattern.substr(x),x)}}else F(this.pattern,0)}}return u(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.ignoreDiacritics,i=t.includeMatches;if(e=n?e:e.toLowerCase(),e=r?z(e):e,this.pattern===e){var u={isMatch:!0,score:0};return i&&(u.indices=[[0,e.length-1]]),u}var o=this.options,c=o.location,a=o.distance,s=o.threshold,h=o.findAllMatches,l=o.minMatchCharLength,d=o.ignoreLocation,v=[],g=0,y=!1;this.chunks.forEach((function(t){var n=t.pattern,r=t.alphabet,u=t.startIndex,o=P(e,n,r,{location:c+u,distance:a,threshold:s,findAllMatches:h,minMatchCharLength:l,includeMatches:i,ignoreLocation:d}),p=o.isMatch,A=o.score,m=o.indices;p&&(y=!0),g+=A,p&&m&&(v=[].concat(f(v),f(m)))}));var p={isMatch:y,score:y?g/this.chunks.length:1};return y&&i&&(p.indices=v),p}}]),e}(),K=function(){function e(t){r(this,e),this.pattern=t}return u(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return q(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return q(e,this.singleRegex)}}]),e}();function q(e,t){var n=e.match(t);return n?n[1]:null}var J=function(e){c(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),n}(K),U=function(e){c(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),n}(K),V=function(e){c(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),n}(K),G=function(e){c(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),n}(K),H=function(e){c(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),n}(K),Q=function(e){c(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),n}(K),X=function(e){c(n,e);var t=l(n);function n(e){var i,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=u.location,c=void 0===o?O.location:o,a=u.threshold,s=void 0===a?O.threshold:a,h=u.distance,l=void 0===h?O.distance:h,f=u.includeMatches,d=void 0===f?O.includeMatches:f,v=u.findAllMatches,g=void 0===v?O.findAllMatches:v,y=u.minMatchCharLength,p=void 0===y?O.minMatchCharLength:y,A=u.isCaseSensitive,m=void 0===A?O.isCaseSensitive:A,C=u.ignoreDiacritics,k=void 0===C?O.ignoreDiacritics:C,E=u.ignoreLocation,F=void 0===E?O.ignoreLocation:E;return r(this,n),(i=t.call(this,e))._bitapSearch=new T(e,{location:c,threshold:s,distance:l,includeMatches:d,findAllMatches:g,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:k,ignoreLocation:F}),i}return u(n,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),n}(K),Y=function(e){c(n,e);var t=l(n);function n(e){return r(this,n),t.call(this,e)}return u(n,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var u=!!r.length;return{isMatch:u,score:u?0:1,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),n}(K),Z=[J,Y,V,G,Q,H,U,X],ee=Z.length,te=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,ne=new Set([X.type,Y.type]),re=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.isCaseSensitive,u=void 0===i?O.isCaseSensitive:i,o=n.ignoreDiacritics,c=void 0===o?O.ignoreDiacritics:o,a=n.includeMatches,s=void 0===a?O.includeMatches:a,h=n.minMatchCharLength,l=void 0===h?O.minMatchCharLength:h,f=n.ignoreLocation,d=void 0===f?O.ignoreLocation:f,v=n.findAllMatches,g=void 0===v?O.findAllMatches:v,y=n.location,p=void 0===y?O.location:y,A=n.threshold,m=void 0===A?O.threshold:A,C=n.distance,k=void 0===C?O.distance:C;r(this,e),this.query=null,this.options={isCaseSensitive:u,ignoreDiacritics:c,includeMatches:s,minMatchCharLength:l,findAllMatches:g,ignoreLocation:d,location:p,threshold:m,distance:k},t=u?t:t.toLowerCase(),t=c?z(t):t,this.pattern=t,this.query=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var n=e.trim().split(te).filter((function(e){return e&&!!e.trim()})),r=[],i=0,u=n.length;i<u;i+=1){for(var o=n[i],c=!1,a=-1;!c&&++a<ee;){var s=Z[a],h=s.isMultiMatch(o);h&&(r.push(new s(h,t)),c=!0)}if(!c)for(a=-1;++a<ee;){var l=Z[a],f=l.isSingleMatch(o);if(f){r.push(new l(f,t));break}}}return r}))}(this.pattern,this.options)}return u(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches,i=n.isCaseSensitive,u=n.ignoreDiacritics;e=i?e:e.toLowerCase(),e=u?z(e):e;for(var o=0,c=[],a=0,s=0,h=t.length;s<h;s+=1){var l=t[s];c.length=0,o=0;for(var d=0,v=l.length;d<v;d+=1){var g=l[d],y=g.search(e),p=y.isMatch,A=y.indices,m=y.score;if(!p){a=0,o=0,c.length=0;break}if(o+=1,a+=m,r){var C=g.constructor.type;ne.has(C)?c=[].concat(f(c),f(A)):c.push(A)}}if(o){var k={isMatch:!0,score:a/o};return r&&(k.indices=c),k}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(e,t){return t.useExtendedSearch}}]),e}(),ie=[];function ue(e,t){for(var n=0,r=ie.length;n<r;n+=1){var i=ie[n];if(i.condition(e,t))return new i(e,t)}return new T(e,t)}var oe="$and",ce="$or",ae="$path",se="$val",he=function(e){return!(!e[oe]&&!e[ce])},le=function(e){return o({},oe,Object.keys(e).map((function(t){return o({},t,e[t])})))};function fe(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).auto,r=void 0===n||n;return he(e)||(e=le(e)),function e(n){var i=Object.keys(n),u=function(e){return!!e[ae]}(n);if(!u&&i.length>1&&!he(n))return e(le(n));if(function(e){return!g(e)&&k(e)&&!he(e)}(n)){var o=u?n[ae]:i[0],c=u?n[se]:n[o];if(!A(c))throw new Error(function(e){return"Invalid value for key ".concat(e)}(o));var a={keyId:L(o),pattern:c};return r&&(a.searcher=ue(c,t)),a}var s={children:[],operator:i[0]};return i.forEach((function(t){var r=n[t];g(r)&&r.forEach((function(t){s.children.push(e(t))}))})),s}(e)}function de(e,t){var n=e.matches;t.matches=[],E(n)&&n.forEach((function(e){if(E(e.indices)&&e.indices.length){var n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.src),e.idx>-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function ve(e,t){t.score=e.score}var ge=function(){function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2?arguments[2]:void 0;r(this,e),this.options=t(t({},O),i),this.options.useExtendedSearch,this._keyStore=new x(this.options.keys),this.setCollection(n,u)}return u(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof I))throw new Error("Incorrect 'index' type");this._myIndex=t||$(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(e){E(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n<r;n+=1){var i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).limit,n=void 0===t?-1:t,r=this.options,i=r.includeMatches,u=r.includeScore,o=r.shouldSort,c=r.sortFn,a=r.ignoreFieldNorm,s=A(e)?A(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return function(e,t){var n=t.ignoreFieldNorm,r=void 0===n?O.ignoreFieldNorm:n;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var n=e.key,i=e.norm,u=e.score,o=n?n.weight:null;t*=Math.pow(0===u&&o?Number.EPSILON:u,(o||1)*(r?1:i))})),e.score=t}))}(s,{ignoreFieldNorm:a}),o&&s.sort(c),m(n)&&n>-1&&(s=s.slice(0,n)),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?O.includeMatches:r,u=n.includeScore,o=void 0===u?O.includeScore:u,c=[];return i&&c.push(de),o&&c.push(ve),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return c.length&&c.forEach((function(t){t(e,r)})),r}))}(s,this._docs,{includeMatches:i,includeScore:u})}},{key:"_searchStringList",value:function(e){var t=ue(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,i=e.i,u=e.n;if(E(n)){var o=t.searchIn(n),c=o.isMatch,a=o.score,s=o.indices;c&&r.push({item:n,idx:i,matches:[{score:a,value:n,norm:u,indices:s}]})}})),r}},{key:"_searchLogical",value:function(e){var t=this,n=fe(e,this.options),r=function e(n,r,i){if(!n.children){var u=n.keyId,o=n.searcher,c=t._findMatches({key:t._keyStore.get(u),value:t._myIndex.getValueForItemAtKeyId(r,u),searcher:o});return c&&c.length?[{idx:i,item:r,matches:c}]:[]}for(var a=[],s=0,h=n.children.length;s<h;s+=1){var l=e(n.children[s],r,i);if(l.length)a.push.apply(a,f(l));else if(n.operator===oe)return[]}return a},i=this._myIndex.records,u={},o=[];return i.forEach((function(e){var t=e.$,i=e.i;if(E(t)){var c=r(n,t,i);c.length&&(u[i]||(u[i]={idx:i,item:t,matches:[]},o.push(u[i])),c.forEach((function(e){var t,n=e.matches;(t=u[i].matches).push.apply(t,f(n))})))}})),o}},{key:"_searchObjectList",value:function(e){var t=this,n=ue(e,this.options),r=this._myIndex,i=r.keys,u=r.records,o=[];return u.forEach((function(e){var r=e.$,u=e.i;if(E(r)){var c=[];i.forEach((function(e,i){c.push.apply(c,f(t._findMatches({key:e,value:r[i],searcher:n})))})),c.length&&o.push({idx:u,item:r,matches:c})}})),o}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!E(n))return[];var i=[];if(g(n))n.forEach((function(e){var n=e.v,u=e.i,o=e.n;if(E(n)){var c=r.searchIn(n),a=c.isMatch,s=c.score,h=c.indices;a&&i.push({score:s,key:t,value:n,idx:u,norm:o,indices:h})}}));else{var u=n.v,o=n.n,c=r.searchIn(u),a=c.isMatch,s=c.score,h=c.indices;a&&i.push({score:s,key:t,value:u,norm:o,indices:h})}return i}}]),e}();return ge.version="7.1.0",ge.createIndex=$,ge.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?O.getFn:n,i=t.fieldNormWeight,u=void 0===i?O.fieldNormWeight:i,o=e.keys,c=e.records,a=new I({getFn:r,fieldNormWeight:u});return a.setKeys(o),a.setIndexRecords(c),a},ge.config=O,function(){ie.push.apply(ie,arguments)}(re),ge},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Fuse=t();
data/blog/index.md ADDED
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: blog/index
3
+ author: "William C. Canin"
4
+ order: -1
5
+ title: "blog"
6
+ description: |
7
+ My thoughts and skills in posting
8
+ published: true
9
+ pagination:
10
+ enabled: true
11
+ permalink: /blog/
12
+ ---
13
+
14
+ <!-- There is no need to put anything here -->
@@ -0,0 +1,12 @@
1
+ ---
2
+ layout: blog/tags
3
+ author: "William C. Canin"
4
+ order: 0
5
+ title: "tags"
6
+ description: |
7
+ Here you can find post tags
8
+ published: true
9
+ permalink: /blog/tags/
10
+ ---
11
+
12
+ <!-- There is no need to put anything here -->