just-the-hm-docs 1.0.0.rc1

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 (114) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +24 -0
  4. data/Rakefile +1 -0
  5. data/_includes/components/aux_nav.html +15 -0
  6. data/_includes/components/breadcrumbs.html +15 -0
  7. data/_includes/components/children_nav.html +9 -0
  8. data/_includes/components/footer.html +34 -0
  9. data/_includes/components/header.html +11 -0
  10. data/_includes/components/mermaid.html +5 -0
  11. data/_includes/components/search_footer.html +7 -0
  12. data/_includes/components/search_header.html +9 -0
  13. data/_includes/components/sidebar.html +69 -0
  14. data/_includes/css/callouts.scss.liquid +93 -0
  15. data/_includes/css/custom.scss.liquid +1 -0
  16. data/_includes/css/just-the-docs.scss.liquid +10 -0
  17. data/_includes/fix_linenos.html +65 -0
  18. data/_includes/footer_custom.html +3 -0
  19. data/_includes/head.html +46 -0
  20. data/_includes/head_custom.html +4 -0
  21. data/_includes/header_custom.html +0 -0
  22. data/_includes/icons/code_copy.html +15 -0
  23. data/_includes/icons/document.html +6 -0
  24. data/_includes/icons/expand.html +6 -0
  25. data/_includes/icons/external_link.html +5 -0
  26. data/_includes/icons/icons.html +13 -0
  27. data/_includes/icons/link.html +6 -0
  28. data/_includes/icons/menu.html +6 -0
  29. data/_includes/icons/search.html +6 -0
  30. data/_includes/js/custom.js +0 -0
  31. data/_includes/lunr/custom-data.json +0 -0
  32. data/_includes/lunr/custom-index.js +0 -0
  33. data/_includes/mermaid_config.js +1 -0
  34. data/_includes/nav.html +251 -0
  35. data/_includes/nav_footer_custom.html +0 -0
  36. data/_includes/search_placeholder_custom.html +1 -0
  37. data/_includes/title.html +5 -0
  38. data/_includes/toc_heading_custom.html +1 -0
  39. data/_includes/vendor/anchor_headings.html +172 -0
  40. data/_layouts/about.html +5 -0
  41. data/_layouts/default.html +41 -0
  42. data/_layouts/home.html +5 -0
  43. data/_layouts/minimal.html +60 -0
  44. data/_layouts/page.html +5 -0
  45. data/_layouts/post.html +5 -0
  46. data/_layouts/table_wrappers.html +7 -0
  47. data/_layouts/vendor/compress.html +10 -0
  48. data/_sass/base.scss +114 -0
  49. data/_sass/buttons.scss +113 -0
  50. data/_sass/code.scss +210 -0
  51. data/_sass/color_schemes/dark.scss +28 -0
  52. data/_sass/color_schemes/hm.scss +26 -0
  53. data/_sass/color_schemes/light.scss +208 -0
  54. data/_sass/content.scss +239 -0
  55. data/_sass/custom/custom.scss +30 -0
  56. data/_sass/custom/hm-branding.scss +259 -0
  57. data/_sass/custom/hm-code.scss +153 -0
  58. data/_sass/custom/hm-colors.scss +15 -0
  59. data/_sass/custom/hm-notes.scss +38 -0
  60. data/_sass/custom/setup.scss +160 -0
  61. data/_sass/labels.scss +33 -0
  62. data/_sass/layout.scss +206 -0
  63. data/_sass/modules.scss +17 -0
  64. data/_sass/navigation.scss +235 -0
  65. data/_sass/print.scss +40 -0
  66. data/_sass/search.scss +311 -0
  67. data/_sass/skiptomain.scss +30 -0
  68. data/_sass/support/_functions.scss +11 -0
  69. data/_sass/support/_variables.scss +129 -0
  70. data/_sass/support/mixins/_buttons.scss +27 -0
  71. data/_sass/support/mixins/_layout.scss +34 -0
  72. data/_sass/support/mixins/_typography.scss +84 -0
  73. data/_sass/support/mixins/mixins.scss +3 -0
  74. data/_sass/support/support.scss +3 -0
  75. data/_sass/tables.scss +54 -0
  76. data/_sass/typography.scss +63 -0
  77. data/_sass/utilities/_colors.scss +237 -0
  78. data/_sass/utilities/_layout.scss +101 -0
  79. data/_sass/utilities/_lists.scss +15 -0
  80. data/_sass/utilities/_spacing.scss +162 -0
  81. data/_sass/utilities/_typography.scss +85 -0
  82. data/_sass/utilities/utilities.scss +5 -0
  83. data/_sass/vendor/OneDarkJekyll/LICENSE +21 -0
  84. data/_sass/vendor/OneDarkJekyll/README.md +25 -0
  85. data/_sass/vendor/OneDarkJekyll/colors.less +30 -0
  86. data/_sass/vendor/OneDarkJekyll/syntax-firewatch-green.scss +200 -0
  87. data/_sass/vendor/OneDarkJekyll/syntax-firewatch.scss +200 -0
  88. data/_sass/vendor/OneDarkJekyll/syntax-one-dark-vivid.scss +200 -0
  89. data/_sass/vendor/OneDarkJekyll/syntax-one-dark.scss +200 -0
  90. data/_sass/vendor/OneDarkJekyll/syntax-variables.less +56 -0
  91. data/_sass/vendor/OneDarkJekyll/syntax.less +93 -0
  92. data/_sass/vendor/normalize.scss/README.md +7 -0
  93. data/_sass/vendor/normalize.scss/normalize.scss +351 -0
  94. data/assets/css/just-the-docs-dark.scss +3 -0
  95. data/assets/css/just-the-docs-default.scss +8 -0
  96. data/assets/css/just-the-docs-light.scss +3 -0
  97. data/assets/favicon/android-chrome-192x192.png +0 -0
  98. data/assets/favicon/android-chrome-512x512.png +0 -0
  99. data/assets/favicon/apple-touch-icon.png +0 -0
  100. data/assets/favicon/favicon-16x16.png +0 -0
  101. data/assets/favicon/favicon-32x32.png +0 -0
  102. data/assets/favicon/favicon.ico +0 -0
  103. data/assets/favicon/site.webmanifest +1 -0
  104. data/assets/images/.gitkeep +0 -0
  105. data/assets/images/hm-logo.svg +1 -0
  106. data/assets/images/search.svg +1 -0
  107. data/assets/js/just-the-docs.js +528 -0
  108. data/assets/js/vendor/lunr.min.js +61 -0
  109. data/assets/js/zzzz-search-data.json +74 -0
  110. data/bin/just-the-hm-docs +16 -0
  111. data/changelog.md +17 -0
  112. data/favicon.ico +0 -0
  113. data/lib/tasks/search.rake +88 -0
  114. metadata +217 -0
@@ -0,0 +1,61 @@
1
+ /**
2
+ * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9
3
+ * Copyright (C) 2020 Oliver Nightingale
4
+ * @license MIT
5
+ */
6
+ /**
7
+ * ORIGINAL MIT LICENSE
8
+ * Copyright (C) 2013 by Oliver Nightingale
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ */
16
+ !function(){var e,t,r,i,n,s,o,a,u,l,c,h,d,f,p,y,m,g,x,v,w,Q,k,S,E,L,b,P,T=function(e){var t=new T.Builder;return t.pipeline.add(T.trimmer,T.stopWordFilter,T.stemmer),t.searchPipeline.add(T.stemmer),e.call(t,t),t.build()};T.version="2.3.9"
17
+ /*!
18
+ * lunr.utils
19
+ * Copyright (C) 2020 Oliver Nightingale
20
+ */,T.utils={},T.utils.warn=(e=this,function(t){e.console&&console.warn&&console.warn(t)}),T.utils.asString=function(e){return null==e?"":e.toString()},T.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i<r.length;i++){var n=r[i],s=e[n];if(Array.isArray(s))t[n]=s.slice();else{if("string"!=typeof s&&"number"!=typeof s&&"boolean"!=typeof s)throw new TypeError("clone is not deep and does not support nested objects");t[n]=s}}return t},T.FieldRef=function(e,t,r){this.docRef=e,this.fieldName=t,this._stringValue=r},T.FieldRef.joiner="/",T.FieldRef.fromString=function(e){var t=e.indexOf(T.FieldRef.joiner);if(-1===t)throw"malformed field ref string";var r=e.slice(0,t),i=e.slice(t+1);return new T.FieldRef(i,r,e)},T.FieldRef.prototype.toString=function(){return null==this._stringValue&&(this._stringValue=this.fieldName+T.FieldRef.joiner+this.docRef),this._stringValue}
21
+ /*!
22
+ * lunr.Set
23
+ * Copyright (C) 2020 Oliver Nightingale
24
+ */,T.Set=function(e){if(this.elements=Object.create(null),e){this.length=e.length;for(var t=0;t<this.length;t++)this.elements[e[t]]=!0}else this.length=0},T.Set.complete={intersect:function(e){return e},union:function(){return this},contains:function(){return!0}},T.Set.empty={intersect:function(){return this},union:function(e){return e},contains:function(){return!1}},T.Set.prototype.contains=function(e){return!!this.elements[e]},T.Set.prototype.intersect=function(e){var t,r,i,n=[];if(e===T.Set.complete)return this;if(e===T.Set.empty)return e;this.length<e.length?(t=this,r=e):(t=e,r=this),i=Object.keys(t.elements);for(var s=0;s<i.length;s++){var o=i[s];o in r.elements&&n.push(o)}return new T.Set(n)},T.Set.prototype.union=function(e){return e===T.Set.complete?T.Set.complete:e===T.Set.empty?this:new T.Set(Object.keys(this.elements).concat(Object.keys(e.elements)))},T.idf=function(e,t){var r=0;for(var i in e)"_index"!=i&&(r+=Object.keys(e[i]).length);var n=(t-r+.5)/(r+.5);return Math.log(1+Math.abs(n))},T.Token=function(e,t){this.str=e||"",this.metadata=t||{}},T.Token.prototype.toString=function(){return this.str},T.Token.prototype.update=function(e){return this.str=e(this.str,this.metadata),this},T.Token.prototype.clone=function(e){return e=e||function(e){return e},new T.Token(e(this.str,this.metadata),this.metadata)}
25
+ /*!
26
+ * lunr.tokenizer
27
+ * Copyright (C) 2020 Oliver Nightingale
28
+ */,T.tokenizer=function(e,t){if(null==e||null==e)return[];if(Array.isArray(e))return e.map((function(e){return new T.Token(T.utils.asString(e).toLowerCase(),T.utils.clone(t))}));for(var r=e.toString().toLowerCase(),i=r.length,n=[],s=0,o=0;s<=i;s++){var a=s-o;if(r.charAt(s).match(T.tokenizer.separator)||s==i){if(a>0){var u=T.utils.clone(t)||{};u.position=[o,a],u.index=n.length,n.push(new T.Token(r.slice(o,s),u))}o=s+1}}return n},T.tokenizer.separator=/[\s\-]+/
29
+ /*!
30
+ * lunr.Pipeline
31
+ * Copyright (C) 2020 Oliver Nightingale
32
+ */,T.Pipeline=function(){this._stack=[]},T.Pipeline.registeredFunctions=Object.create(null),T.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&T.utils.warn("Overwriting existing registered function: "+t),e.label=t,T.Pipeline.registeredFunctions[e.label]=e},T.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||T.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},T.Pipeline.load=function(e){var t=new T.Pipeline;return e.forEach((function(e){var r=T.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)})),t},T.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach((function(e){T.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},T.Pipeline.prototype.after=function(e,t){T.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},T.Pipeline.prototype.before=function(e,t){T.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},T.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},T.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r<t;r++){for(var i=this._stack[r],n=[],s=0;s<e.length;s++){var o=i(e[s],s,e);if(null!=o&&""!==o)if(Array.isArray(o))for(var a=0;a<o.length;a++)n.push(o[a]);else n.push(o)}e=n}return e},T.Pipeline.prototype.runString=function(e,t){var r=new T.Token(e,t);return this.run([r]).map((function(e){return e.toString()}))},T.Pipeline.prototype.reset=function(){this._stack=[]},T.Pipeline.prototype.toJSON=function(){return this._stack.map((function(e){return T.Pipeline.warnIfFunctionNotRegistered(e),e.label}))}
33
+ /*!
34
+ * lunr.Vector
35
+ * Copyright (C) 2020 Oliver Nightingale
36
+ */,T.Vector=function(e){this._magnitude=0,this.elements=e||[]},T.Vector.prototype.positionForIndex=function(e){if(0==this.elements.length)return 0;for(var t=0,r=this.elements.length/2,i=r-t,n=Math.floor(i/2),s=this.elements[2*n];i>1&&(s<e&&(t=n),s>e&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e||s>e?2*n:s<e?2*(n+1):void 0},T.Vector.prototype.insert=function(e,t){this.upsert(e,t,(function(){throw"duplicate index"}))},T.Vector.prototype.upsert=function(e,t,r){this._magnitude=0;var i=this.positionForIndex(e);this.elements[i]==e?this.elements[i+1]=r(this.elements[i+1],t):this.elements.splice(i,0,e,t)},T.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var e=0,t=this.elements.length,r=1;r<t;r+=2){var i=this.elements[r];e+=i*i}return this._magnitude=Math.sqrt(e)},T.Vector.prototype.dot=function(e){for(var t=0,r=this.elements,i=e.elements,n=r.length,s=i.length,o=0,a=0,u=0,l=0;u<n&&l<s;)(o=r[u])<(a=i[l])?u+=2:o>a?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},T.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},T.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t<this.elements.length;t+=2,r++)e[r]=this.elements[t];return e},T.Vector.prototype.toJSON=function(){return this.elements}
37
+ /*!
38
+ * lunr.stemmer
39
+ * Copyright (C) 2020 Oliver Nightingale
40
+ * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt
41
+ */,T.stemmer=(t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},r={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},i="[aeiouy]",n="[^aeiou][^aeiouy]*",s=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),o=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*"),a=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$"),u=new RegExp("^([^aeiou][^aeiouy]*)?[aeiouy]"),l=/^(.+?)(ss|i)es$/,c=/^(.+?)([^s])s$/,h=/^(.+?)eed$/,d=/^(.+?)(ed|ing)$/,f=/.$/,p=/(at|bl|iz)$/,y=new RegExp("([^aeiouylsz])\\1$"),m=new RegExp("^"+n+i+"[^aeiouwxy]$"),g=/^(.+?[^aeiou])y$/,x=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,v=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,w=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,Q=/^(.+?)(s|t)(ion)$/,k=/^(.+?)e$/,S=/ll$/,E=new RegExp("^"+n+i+"[^aeiouwxy]$"),L=function(e){var i,n,L,b,P,T,O;if(e.length<3)return e;if("y"==(L=e.substr(0,1))&&(e=L.toUpperCase()+e.substr(1)),P=c,(b=l).test(e)?e=e.replace(b,"$1$2"):P.test(e)&&(e=e.replace(P,"$1$2")),P=d,(b=h).test(e)){var I=b.exec(e);(b=s).test(I[1])&&(b=f,e=e.replace(b,""))}else P.test(e)&&(i=(I=P.exec(e))[1],(P=u).test(i)&&(T=y,O=m,(P=p).test(e=i)?e+="e":T.test(e)?(b=f,e=e.replace(b,"")):O.test(e)&&(e+="e")));return(b=g).test(e)&&(e=(i=(I=b.exec(e))[1])+"i"),(b=x).test(e)&&(i=(I=b.exec(e))[1],n=I[2],(b=s).test(i)&&(e=i+t[n])),(b=v).test(e)&&(i=(I=b.exec(e))[1],n=I[2],(b=s).test(i)&&(e=i+r[n])),P=Q,(b=w).test(e)?(i=(I=b.exec(e))[1],(b=o).test(i)&&(e=i)):P.test(e)&&(i=(I=P.exec(e))[1]+I[2],(P=o).test(i)&&(e=i)),(b=k).test(e)&&(i=(I=b.exec(e))[1],P=a,T=E,((b=o).test(i)||P.test(i)&&!T.test(i))&&(e=i)),P=o,(b=S).test(e)&&P.test(e)&&(b=f,e=e.replace(b,"")),"y"==L&&(e=L.toLowerCase()+e.substr(1)),e},function(e){return e.update(L)}),T.Pipeline.registerFunction(T.stemmer,"stemmer")
42
+ /*!
43
+ * lunr.stopWordFilter
44
+ * Copyright (C) 2020 Oliver Nightingale
45
+ */,T.generateStopWordFilter=function(e){var t=e.reduce((function(e,t){return e[t]=t,e}),{});return function(e){if(e&&t[e.toString()]!==e.toString())return e}},T.stopWordFilter=T.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),T.Pipeline.registerFunction(T.stopWordFilter,"stopWordFilter")
46
+ /*!
47
+ * lunr.trimmer
48
+ * Copyright (C) 2020 Oliver Nightingale
49
+ */,T.trimmer=function(e){return e.update((function(e){return e.replace(/^\W+/,"").replace(/\W+$/,"")}))},T.Pipeline.registerFunction(T.trimmer,"trimmer")
50
+ /*!
51
+ * lunr.TokenSet
52
+ * Copyright (C) 2020 Oliver Nightingale
53
+ */,T.TokenSet=function(){this.final=!1,this.edges={},this.id=T.TokenSet._nextId,T.TokenSet._nextId+=1},T.TokenSet._nextId=1,T.TokenSet.fromArray=function(e){for(var t=new T.TokenSet.Builder,r=0,i=e.length;r<i;r++)t.insert(e[r]);return t.finish(),t.root},T.TokenSet.fromClause=function(e){return"editDistance"in e?T.TokenSet.fromFuzzyString(e.term,e.editDistance):T.TokenSet.fromString(e.term)},T.TokenSet.fromFuzzyString=function(e,t){for(var r=new T.TokenSet,i=[{node:r,editsRemaining:t,str:e}];i.length;){var n=i.pop();if(n.str.length>0){var s,o=n.str.charAt(0);o in n.node.edges?s=n.node.edges[o]:(s=new T.TokenSet,n.node.edges[o]=s),1==n.str.length&&(s.final=!0),i.push({node:s,editsRemaining:n.editsRemaining,str:n.str.slice(1)})}if(0!=n.editsRemaining){if("*"in n.node.edges)var a=n.node.edges["*"];else{a=new T.TokenSet;n.node.edges["*"]=a}if(0==n.str.length&&(a.final=!0),i.push({node:a,editsRemaining:n.editsRemaining-1,str:n.str}),n.str.length>1&&i.push({node:n.node,editsRemaining:n.editsRemaining-1,str:n.str.slice(1)}),1==n.str.length&&(n.node.final=!0),n.str.length>=1){if("*"in n.node.edges)var u=n.node.edges["*"];else{u=new T.TokenSet;n.node.edges["*"]=u}1==n.str.length&&(u.final=!0),i.push({node:u,editsRemaining:n.editsRemaining-1,str:n.str.slice(1)})}if(n.str.length>1){var l,c=n.str.charAt(0),h=n.str.charAt(1);h in n.node.edges?l=n.node.edges[h]:(l=new T.TokenSet,n.node.edges[h]=l),1==n.str.length&&(l.final=!0),i.push({node:l,editsRemaining:n.editsRemaining-1,str:c+n.str.slice(2)})}}}return r},T.TokenSet.fromString=function(e){for(var t=new T.TokenSet,r=t,i=0,n=e.length;i<n;i++){var s=e[i],o=i==n-1;if("*"==s)t.edges[s]=t,t.final=o;else{var a=new T.TokenSet;a.final=o,t.edges[s]=a,t=a}}return r},T.TokenSet.prototype.toArray=function(){for(var e=[],t=[{prefix:"",node:this}];t.length;){var r=t.pop(),i=Object.keys(r.node.edges),n=i.length;r.node.final&&(r.prefix.charAt(0),e.push(r.prefix));for(var s=0;s<n;s++){var o=i[s];t.push({prefix:r.prefix.concat(o),node:r.node.edges[o]})}}return e},T.TokenSet.prototype.toString=function(){if(this._str)return this._str;for(var e=this.final?"1":"0",t=Object.keys(this.edges).sort(),r=t.length,i=0;i<r;i++){var n=t[i];e=e+n+this.edges[n].id}return e},T.TokenSet.prototype.intersect=function(e){for(var t=new T.TokenSet,r=void 0,i=[{qNode:e,output:t,node:this}];i.length;){r=i.pop();for(var n=Object.keys(r.qNode.edges),s=n.length,o=Object.keys(r.node.edges),a=o.length,u=0;u<s;u++)for(var l=n[u],c=0;c<a;c++){var h=o[c];if(h==l||"*"==l){var d=r.node.edges[h],f=r.qNode.edges[l],p=d.final&&f.final,y=void 0;h in r.output.edges?(y=r.output.edges[h]).final=y.final||p:((y=new T.TokenSet).final=p,r.output.edges[h]=y),i.push({qNode:f,output:y,node:d})}}}return t},T.TokenSet.Builder=function(){this.previousWord="",this.root=new T.TokenSet,this.uncheckedNodes=[],this.minimizedNodes={}},T.TokenSet.Builder.prototype.insert=function(e){var t,r=0;if(e<this.previousWord)throw new Error("Out of order word insertion");for(var i=0;i<e.length&&i<this.previousWord.length&&e[i]==this.previousWord[i];i++)r++;this.minimize(r),t=0==this.uncheckedNodes.length?this.root:this.uncheckedNodes[this.uncheckedNodes.length-1].child;for(i=r;i<e.length;i++){var n=new T.TokenSet,s=e[i];t.edges[s]=n,this.uncheckedNodes.push({parent:t,char:s,child:n}),t=n}t.final=!0,this.previousWord=e},T.TokenSet.Builder.prototype.finish=function(){this.minimize(0)},T.TokenSet.Builder.prototype.minimize=function(e){for(var t=this.uncheckedNodes.length-1;t>=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}}
54
+ /*!
55
+ * lunr.Index
56
+ * Copyright (C) 2020 Oliver Nightingale
57
+ */,T.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},T.Index.prototype.search=function(e){return this.query((function(t){new T.QueryParser(e,t).parse()}))},T.Index.prototype.query=function(e){for(var t=new T.Query(this.fields),r=Object.create(null),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=0;a<this.fields.length;a++)i[this.fields[a]]=new T.Vector;e.call(t,t);for(a=0;a<t.clauses.length;a++){var u=t.clauses[a],l=null,c=T.Set.empty;l=u.usePipeline?this.pipeline.runString(u.term,{fields:u.fields}):[u.term];for(var h=0;h<l.length;h++){var d=l[h];u.term=d;var f=T.TokenSet.fromClause(u),p=this.tokenSet.intersect(f).toArray();if(0===p.length&&u.presence===T.Query.presence.REQUIRED){for(var y=0;y<u.fields.length;y++){s[F=u.fields[y]]=T.Set.empty}break}for(var m=0;m<p.length;m++){var g=p[m],x=this.invertedIndex[g],v=x._index;for(y=0;y<u.fields.length;y++){var w=x[F=u.fields[y]],Q=Object.keys(w),k=g+"/"+F,S=new T.Set(Q);if(u.presence==T.Query.presence.REQUIRED&&(c=c.union(S),void 0===s[F]&&(s[F]=T.Set.complete)),u.presence!=T.Query.presence.PROHIBITED){if(i[F].upsert(v,u.boost,(function(e,t){return e+t})),!n[k]){for(var E=0;E<Q.length;E++){var L,b=Q[E],P=new T.FieldRef(b,F),O=w[b];void 0===(L=r[P])?r[P]=new T.MatchData(g,F,O):L.add(g,F,O)}n[k]=!0}}else void 0===o[F]&&(o[F]=T.Set.empty),o[F]=o[F].union(S)}}}if(u.presence===T.Query.presence.REQUIRED)for(y=0;y<u.fields.length;y++){s[F=u.fields[y]]=s[F].intersect(c)}}var I=T.Set.complete,R=T.Set.empty;for(a=0;a<this.fields.length;a++){var F;s[F=this.fields[a]]&&(I=I.intersect(s[F])),o[F]&&(R=R.union(o[F]))}var C=Object.keys(r),N=[],j=Object.create(null);if(t.isNegated()){C=Object.keys(this.fieldVectors);for(a=0;a<C.length;a++){P=C[a];var _=T.FieldRef.fromString(P);r[P]=new T.MatchData}}for(a=0;a<C.length;a++){var D=(_=T.FieldRef.fromString(C[a])).docRef;if(I.contains(D)&&!R.contains(D)){var A,B=this.fieldVectors[_],V=i[_.fieldName].similarity(B);if(void 0!==(A=j[D]))A.score+=V,A.matchData.combine(r[_]);else{var z={ref:D,score:V,matchData:r[_]};j[D]=z,N.push(z)}}}return N.sort((function(e,t){return t.score-e.score}))},T.Index.prototype.toJSON=function(){var e=Object.keys(this.invertedIndex).sort().map((function(e){return[e,this.invertedIndex[e]]}),this),t=Object.keys(this.fieldVectors).map((function(e){return[e,this.fieldVectors[e].toJSON()]}),this);return{version:T.version,fields:this.fields,fieldVectors:t,invertedIndex:e,pipeline:this.pipeline.toJSON()}},T.Index.load=function(e){var t={},r={},i=e.fieldVectors,n=Object.create(null),s=e.invertedIndex,o=new T.TokenSet.Builder,a=T.Pipeline.load(e.pipeline);e.version!=T.version&&T.utils.warn("Version mismatch when loading serialised index. Current version of lunr '"+T.version+"' does not match serialized index '"+e.version+"'");for(var u=0;u<i.length;u++){var l=(h=i[u])[0],c=h[1];r[l]=new T.Vector(c)}for(u=0;u<s.length;u++){var h,d=(h=s[u])[0],f=h[1];o.insert(d),n[d]=f}return o.finish(),t.fields=e.fields,t.fieldVectors=r,t.invertedIndex=n,t.tokenSet=o.root,t.pipeline=a,new T.Index(t)}
58
+ /*!
59
+ * lunr.Builder
60
+ * Copyright (C) 2020 Oliver Nightingale
61
+ */,T.Builder=function(){this._ref="id",this._fields=Object.create(null),this._documents=Object.create(null),this.invertedIndex=Object.create(null),this.fieldTermFrequencies={},this.fieldLengths={},this.tokenizer=T.tokenizer,this.pipeline=new T.Pipeline,this.searchPipeline=new T.Pipeline,this.documentCount=0,this._b=.75,this._k1=1.2,this.termIndex=0,this.metadataWhitelist=[]},T.Builder.prototype.ref=function(e){this._ref=e},T.Builder.prototype.field=function(e,t){if(/\//.test(e))throw new RangeError("Field '"+e+"' contains illegal character '/'");this._fields[e]=t||{}},T.Builder.prototype.b=function(e){this._b=e<0?0:e>1?1:e},T.Builder.prototype.k1=function(e){this._k1=e},T.Builder.prototype.add=function(e,t){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var n=0;n<i.length;n++){var s=i[n],o=this._fields[s].extractor,a=o?o(e):e[s],u=this.tokenizer(a,{fields:[s]}),l=this.pipeline.run(u),c=new T.FieldRef(r,s),h=Object.create(null);this.fieldTermFrequencies[c]=h,this.fieldLengths[c]=0,this.fieldLengths[c]+=l.length;for(var d=0;d<l.length;d++){var f=l[d];if(null==h[f]&&(h[f]=0),h[f]+=1,null==this.invertedIndex[f]){var p=Object.create(null);p._index=this.termIndex,this.termIndex+=1;for(var y=0;y<i.length;y++)p[i[y]]=Object.create(null);this.invertedIndex[f]=p}null==this.invertedIndex[f][s][r]&&(this.invertedIndex[f][s][r]=Object.create(null));for(var m=0;m<this.metadataWhitelist.length;m++){var g=this.metadataWhitelist[m],x=f.metadata[g];null==this.invertedIndex[f][s][r][g]&&(this.invertedIndex[f][s][r][g]=[]),this.invertedIndex[f][s][r][g].push(x)}}}},T.Builder.prototype.calculateAverageFieldLengths=function(){for(var e=Object.keys(this.fieldLengths),t=e.length,r={},i={},n=0;n<t;n++){var s=T.FieldRef.fromString(e[n]),o=s.fieldName;i[o]||(i[o]=0),i[o]+=1,r[o]||(r[o]=0),r[o]+=this.fieldLengths[s]}var a=Object.keys(this._fields);for(n=0;n<a.length;n++){var u=a[n];r[u]=r[u]/i[u]}this.averageFieldLength=r},T.Builder.prototype.createFieldVectors=function(){for(var e={},t=Object.keys(this.fieldTermFrequencies),r=t.length,i=Object.create(null),n=0;n<r;n++){for(var s=T.FieldRef.fromString(t[n]),o=s.fieldName,a=this.fieldLengths[s],u=new T.Vector,l=this.fieldTermFrequencies[s],c=Object.keys(l),h=c.length,d=this._fields[o].boost||1,f=this._documents[s.docRef].boost||1,p=0;p<h;p++){var y,m,g,x=c[p],v=l[x],w=this.invertedIndex[x]._index;void 0===i[x]?(y=T.idf(this.invertedIndex[x],this.documentCount),i[x]=y):y=i[x],m=y*((this._k1+1)*v)/(this._k1*(1-this._b+this._b*(a/this.averageFieldLength[o]))+v),m*=d,m*=f,g=Math.round(1e3*m)/1e3,u.insert(w,g)}e[s]=u}this.fieldVectors=e},T.Builder.prototype.createTokenSet=function(){this.tokenSet=T.TokenSet.fromArray(Object.keys(this.invertedIndex).sort())},T.Builder.prototype.build=function(){return this.calculateAverageFieldLengths(),this.createFieldVectors(),this.createTokenSet(),new T.Index({invertedIndex:this.invertedIndex,fieldVectors:this.fieldVectors,tokenSet:this.tokenSet,fields:Object.keys(this._fields),pipeline:this.searchPipeline})},T.Builder.prototype.use=function(e){var t=Array.prototype.slice.call(arguments,1);t.unshift(this),e.apply(this,t)},T.MatchData=function(e,t,r){for(var i=Object.create(null),n=Object.keys(r||{}),s=0;s<n.length;s++){var o=n[s];i[o]=r[o].slice()}this.metadata=Object.create(null),void 0!==e&&(this.metadata[e]=Object.create(null),this.metadata[e][t]=i)},T.MatchData.prototype.combine=function(e){for(var t=Object.keys(e.metadata),r=0;r<t.length;r++){var i=t[r],n=Object.keys(e.metadata[i]);null==this.metadata[i]&&(this.metadata[i]=Object.create(null));for(var s=0;s<n.length;s++){var o=n[s],a=Object.keys(e.metadata[i][o]);null==this.metadata[i][o]&&(this.metadata[i][o]=Object.create(null));for(var u=0;u<a.length;u++){var l=a[u];null==this.metadata[i][o][l]?this.metadata[i][o][l]=e.metadata[i][o][l]:this.metadata[i][o][l]=this.metadata[i][o][l].concat(e.metadata[i][o][l])}}}},T.MatchData.prototype.add=function(e,t,r){if(!(e in this.metadata))return this.metadata[e]=Object.create(null),void(this.metadata[e][t]=r);if(t in this.metadata[e])for(var i=Object.keys(r),n=0;n<i.length;n++){var s=i[n];s in this.metadata[e][t]?this.metadata[e][t][s]=this.metadata[e][t][s].concat(r[s]):this.metadata[e][t][s]=r[s]}else this.metadata[e][t]=r},T.Query=function(e){this.clauses=[],this.allFields=e},T.Query.wildcard=new String("*"),T.Query.wildcard.NONE=0,T.Query.wildcard.LEADING=1,T.Query.wildcard.TRAILING=2,T.Query.presence={OPTIONAL:1,REQUIRED:2,PROHIBITED:3},T.Query.prototype.clause=function(e){return"fields"in e||(e.fields=this.allFields),"boost"in e||(e.boost=1),"usePipeline"in e||(e.usePipeline=!0),"wildcard"in e||(e.wildcard=T.Query.wildcard.NONE),e.wildcard&T.Query.wildcard.LEADING&&e.term.charAt(0)!=T.Query.wildcard&&(e.term="*"+e.term),e.wildcard&T.Query.wildcard.TRAILING&&e.term.slice(-1)!=T.Query.wildcard&&(e.term=e.term+"*"),"presence"in e||(e.presence=T.Query.presence.OPTIONAL),this.clauses.push(e),this},T.Query.prototype.isNegated=function(){for(var e=0;e<this.clauses.length;e++)if(this.clauses[e].presence!=T.Query.presence.PROHIBITED)return!1;return!0},T.Query.prototype.term=function(e,t){if(Array.isArray(e))return e.forEach((function(e){this.term(e,T.utils.clone(t))}),this),this;var r=t||{};return r.term=e.toString(),this.clause(r),this},T.QueryParseError=function(e,t,r){this.name="QueryParseError",this.message=e,this.start=t,this.end=r},T.QueryParseError.prototype=new Error,T.QueryLexer=function(e){this.lexemes=[],this.str=e,this.length=e.length,this.pos=0,this.start=0,this.escapeCharPositions=[]},T.QueryLexer.prototype.run=function(){for(var e=T.QueryLexer.lexText;e;)e=e(this)},T.QueryLexer.prototype.sliceString=function(){for(var e=[],t=this.start,r=this.pos,i=0;i<this.escapeCharPositions.length;i++)r=this.escapeCharPositions[i],e.push(this.str.slice(t,r)),t=r+1;return e.push(this.str.slice(t,this.pos)),this.escapeCharPositions.length=0,e.join("")},T.QueryLexer.prototype.emit=function(e){this.lexemes.push({type:e,str:this.sliceString(),start:this.start,end:this.pos}),this.start=this.pos},T.QueryLexer.prototype.escapeCharacter=function(){this.escapeCharPositions.push(this.pos-1),this.pos+=1},T.QueryLexer.prototype.next=function(){if(this.pos>=this.length)return T.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},T.QueryLexer.prototype.width=function(){return this.pos-this.start},T.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},T.QueryLexer.prototype.backup=function(){this.pos-=1},T.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=T.QueryLexer.EOS&&this.backup()},T.QueryLexer.prototype.more=function(){return this.pos<this.length},T.QueryLexer.EOS="EOS",T.QueryLexer.FIELD="FIELD",T.QueryLexer.TERM="TERM",T.QueryLexer.EDIT_DISTANCE="EDIT_DISTANCE",T.QueryLexer.BOOST="BOOST",T.QueryLexer.PRESENCE="PRESENCE",T.QueryLexer.lexField=function(e){return e.backup(),e.emit(T.QueryLexer.FIELD),e.ignore(),T.QueryLexer.lexText},T.QueryLexer.lexTerm=function(e){if(e.width()>1&&(e.backup(),e.emit(T.QueryLexer.TERM)),e.ignore(),e.more())return T.QueryLexer.lexText},T.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(T.QueryLexer.EDIT_DISTANCE),T.QueryLexer.lexText},T.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(T.QueryLexer.BOOST),T.QueryLexer.lexText},T.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(T.QueryLexer.TERM)},T.QueryLexer.termSeparator=T.tokenizer.separator,T.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==T.QueryLexer.EOS)return T.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return T.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(T.QueryLexer.TERM),T.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(T.QueryLexer.TERM),T.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(T.QueryLexer.PRESENCE),T.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(T.QueryLexer.PRESENCE),T.QueryLexer.lexText;if(t.match(T.QueryLexer.termSeparator))return T.QueryLexer.lexTerm}else e.escapeCharacter()}},T.QueryParser=function(e,t){this.lexer=new T.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},T.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=T.QueryParser.parseClause;e;)e=e(this);return this.query},T.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},T.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},T.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},T.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case T.QueryLexer.PRESENCE:return T.QueryParser.parsePresence;case T.QueryLexer.FIELD:return T.QueryParser.parseField;case T.QueryLexer.TERM:return T.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value '"+t.str+"'"),new T.QueryParseError(r,t.start,t.end)}},T.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=T.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=T.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+t.str+"'";throw new T.QueryParseError(r,t.start,t.end)}var i=e.peekLexeme();if(null==i){r="expecting term or field, found nothing";throw new T.QueryParseError(r,t.start,t.end)}switch(i.type){case T.QueryLexer.FIELD:return T.QueryParser.parseField;case T.QueryLexer.TERM:return T.QueryParser.parseTerm;default:r="expecting term or field, found '"+i.type+"'";throw new T.QueryParseError(r,i.start,i.end)}}},T.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),i="unrecognised field '"+t.str+"', possible fields: "+r;throw new T.QueryParseError(i,t.start,t.end)}e.currentClause.fields=[t.str];var n=e.peekLexeme();if(null==n){i="expecting term, found nothing";throw new T.QueryParseError(i,t.start,t.end)}if(n.type===T.QueryLexer.TERM)return T.QueryParser.parseTerm;i="expecting term, found '"+n.type+"'";throw new T.QueryParseError(i,n.start,n.end)}},T.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(null!=r)switch(r.type){case T.QueryLexer.TERM:return e.nextClause(),T.QueryParser.parseTerm;case T.QueryLexer.FIELD:return e.nextClause(),T.QueryParser.parseField;case T.QueryLexer.EDIT_DISTANCE:return T.QueryParser.parseEditDistance;case T.QueryLexer.BOOST:return T.QueryParser.parseBoost;case T.QueryLexer.PRESENCE:return e.nextClause(),T.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new T.QueryParseError(i,r.start,r.end)}else e.nextClause()}},T.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new T.QueryParseError(i,t.start,t.end)}e.currentClause.editDistance=r;var n=e.peekLexeme();if(null!=n)switch(n.type){case T.QueryLexer.TERM:return e.nextClause(),T.QueryParser.parseTerm;case T.QueryLexer.FIELD:return e.nextClause(),T.QueryParser.parseField;case T.QueryLexer.EDIT_DISTANCE:return T.QueryParser.parseEditDistance;case T.QueryLexer.BOOST:return T.QueryParser.parseBoost;case T.QueryLexer.PRESENCE:return e.nextClause(),T.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+n.type+"'";throw new T.QueryParseError(i,n.start,n.end)}else e.nextClause()}},T.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var i="boost must be numeric";throw new T.QueryParseError(i,t.start,t.end)}e.currentClause.boost=r;var n=e.peekLexeme();if(null!=n)switch(n.type){case T.QueryLexer.TERM:return e.nextClause(),T.QueryParser.parseTerm;case T.QueryLexer.FIELD:return e.nextClause(),T.QueryParser.parseField;case T.QueryLexer.EDIT_DISTANCE:return T.QueryParser.parseEditDistance;case T.QueryLexer.BOOST:return T.QueryParser.parseBoost;case T.QueryLexer.PRESENCE:return e.nextClause(),T.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+n.type+"'";throw new T.QueryParseError(i,n.start,n.end)}else e.nextClause()}},b=this,P=function(){return T},"function"==typeof define&&define.amd?define(P):"object"==typeof exports?module.exports=P():b.lunr=P()}();
@@ -0,0 +1,74 @@
1
+ ---
2
+ permalink: /assets/js/search-data.json
3
+ ---
4
+ {
5
+ {%- assign i = 0 -%}
6
+ {%- assign pages_array = "" | split: "" -%}
7
+ {%- assign pages_array = pages_array | push: site.html_pages -%}
8
+ {%- if site.just_the_hm_docs.collections -%}
9
+ {%- for collection_entry in site.just_the_hm_docs.collections -%}
10
+ {%- assign collection_key = collection_entry[0] -%}
11
+ {%- assign collection_value = collection_entry[1] -%}
12
+ {%- assign collection = site[collection_key] -%}
13
+ {%- if collection_value.search_exclude != true -%}
14
+ {%- assign pages_array = pages_array | push: collection -%}
15
+ {%- endif -%}
16
+ {%- endfor -%}
17
+ {%- endif -%}
18
+ {%- for pages in pages_array -%}
19
+ {%- for page in pages -%}
20
+ {%- if page.title and page.search_exclude != true -%}
21
+ {%- assign page_content = page.content -%}
22
+ {%- assign heading_level = site.search.heading_level | default: 2 -%}
23
+ {%- for j in (2..heading_level) -%}
24
+ {%- assign tag = '<h' | append: j -%}
25
+ {%- assign closing_tag = '</h' | append: j -%}
26
+ {%- assign page_content = page_content | replace: tag, '<h1' | replace: closing_tag, '</h1' -%}
27
+ {%- endfor -%}
28
+ {%- assign parts = page_content | split: '<h1' -%}
29
+ {%- assign title_found = false -%}
30
+ {%- for part in parts offset: 1 -%}
31
+ {%- assign titleAndContent = part | split: '</h1>' -%}
32
+ {%- assign title = titleAndContent[0] | replace_first: '>', '<h1>' | split: '<h1>' -%}
33
+ {%- assign title = title[1] | strip_html -%}
34
+ {%- assign content = titleAndContent[1] -%}
35
+ {%- assign url = page.url -%}
36
+ {%- if title == page.title and parts[0] == '' -%}
37
+ {%- assign title_found = true -%}
38
+ {%- else -%}
39
+ {%- assign id = titleAndContent[0] -%}
40
+ {%- assign id = id | split: 'id="' -%}
41
+ {%- if id.size == 2 -%}
42
+ {%- assign id = id[1] -%}
43
+ {%- assign id = id | split: '"' -%}
44
+ {%- assign id = id[0] -%}
45
+ {%- capture url -%}{{ url | append: '#' | append: id }}{%- endcapture -%}
46
+ {%- endif -%}
47
+ {%- endif -%}
48
+ {%- unless i == 0 -%},{%- endunless -%}
49
+ "{{ i }}": {
50
+ "doc": {{ page.title | jsonify }},
51
+ "title": {{ title | jsonify }},
52
+ "content": {{ content | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '<ul', ' . <ul' | replace: '</ul', ' . </ul' | replace: '<ol', ' . <ol' | replace: '</ol', ' . </ol' | replace: '</tr', ' . </tr' | replace: '<li', ' | <li' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | replace: '<td', ' | <td' | replace: '</th', ' | </th' | replace: '<th', ' | <th' | strip_html | remove: 'Table of contents' | normalize_whitespace | replace: '. . .', '.' | replace: '. .', '.' | replace: '| |', '|' | append: ' ' | jsonify }},
53
+ "url": "{{ url | relative_url }}",
54
+ {% include lunr/custom-data.json page=page %}
55
+ "relUrl": "{{ url }}"
56
+ }
57
+ {%- assign i = i | plus: 1 -%}
58
+ {%- endfor -%}
59
+ {%- unless title_found -%}
60
+ {%- unless i == 0 -%},{%- endunless -%}
61
+ "{{ i }}": {
62
+ "doc": {{ page.title | jsonify }},
63
+ "title": {{ page.title | jsonify }},
64
+ "content": {{ parts[0] | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '<ul', ' . <ul' | replace: '</ul', ' . </ul' | replace: '<ol', ' . <ol' | replace: '</ol', ' . </ol' | replace: '</tr', ' . </tr' | replace: '<li', ' | <li' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | replace: '<td', ' | <td' | replace: '</th', ' | </th' | replace: '<th', ' | <th' | strip_html | remove: 'Table of contents' | normalize_whitespace | replace: '. . .', '.' | replace: '. .', '.' | replace: '| |', '|' | append: ' ' | jsonify }},
65
+ "url": "{{ page.url | relative_url }}",
66
+ {% include lunr/custom-data.json page=page %}
67
+ "relUrl": "{{ page.url }}"
68
+ }
69
+ {%- assign i = i | plus: 1 -%}
70
+ {%- endunless -%}
71
+ {%- endif -%}
72
+ {%- endfor -%}
73
+ {%- endfor %}
74
+ }
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ gem_dir = File.expand_path("..",File.dirname(__FILE__))
4
+ $LOAD_PATH.unshift gem_dir # Look in gem directory for resources first.
5
+ exec_type = ARGV[0]
6
+
7
+ if exec_type == 'rake' then
8
+ require 'rake'
9
+ require 'pp'
10
+ pwd=Dir.pwd
11
+ Dir.chdir(gem_dir) # We'll load rakefile from the gem's dir.
12
+ Rake.application.init
13
+ Rake.application.load_rakefile
14
+ Dir.chdir(pwd) # Revert to original pwd for any path args passed to task.
15
+ Rake.application.invoke_task(ARGV[1])
16
+ end
data/changelog.md ADDED
@@ -0,0 +1,17 @@
1
+ ---
2
+ layout: page
3
+ title: Changelog
4
+ description: A curated, chronologically ordered list of notable changes for each version of the project.
5
+ nav_order: 99
6
+ ---
7
+
8
+ # Changelog
9
+
10
+
11
+ ## v0.0.1
12
+
13
+ - Release [Just the HM docs](https://github.com/humanmade/just-the-hm-docs/pull/1) site.
14
+
15
+ ## v0.0.0
16
+
17
+ - Fork of [Just the Docs](https://github.com/just-the-docs/just-the-docs) Jekyll theme.
data/favicon.ico ADDED
Binary file
@@ -0,0 +1,88 @@
1
+ namespace :search do
2
+ desc 'Generate the files needed for search functionality'
3
+ task :init do
4
+ puts 'Creating search data json file...'
5
+ mkdir_p 'assets/js'
6
+ touch 'assets/js/zzzz-search-data.json'
7
+ puts 'Done.'
8
+ puts 'Generating content...'
9
+
10
+ File.open('assets/js/zzzz-search-data.json', 'w') do |f|
11
+ f.puts '---
12
+ permalink: /assets/js/search-data.json
13
+ ---
14
+ {
15
+ {%- assign i = 0 -%}
16
+ {%- assign pages_array = "" | split: "" -%}
17
+ {%- assign pages_array = pages_array | push: site.html_pages -%}
18
+ {%- if site.just_the_hm_docs.collections -%}
19
+ {%- for collection_entry in site.just_the_hm_docs.collections -%}
20
+ {%- assign collection_key = collection_entry[0] -%}
21
+ {%- assign collection_value = collection_entry[1] -%}
22
+ {%- assign collection = site[collection_key] -%}
23
+ {%- if collection_value.search_exclude != true -%}
24
+ {%- assign pages_array = pages_array | push: collection -%}
25
+ {%- endif -%}
26
+ {%- endfor -%}
27
+ {%- endif -%}
28
+ {%- for pages in pages_array -%}
29
+ {%- for page in pages -%}
30
+ {%- if page.title and page.search_exclude != true -%}
31
+ {%- assign page_content = page.content -%}
32
+ {%- assign heading_level = site.search.heading_level | default: 2 -%}
33
+ {%- for j in (2..heading_level) -%}
34
+ {%- assign tag = \'<h\' | append: j -%}
35
+ {%- assign closing_tag = \'</h\' | append: j -%}
36
+ {%- assign page_content = page_content | replace: tag, \'<h1\' | replace: closing_tag, \'</h1\' -%}
37
+ {%- endfor -%}
38
+ {%- assign parts = page_content | split: \'<h1\' -%}
39
+ {%- assign title_found = false -%}
40
+ {%- for part in parts offset: 1 -%}
41
+ {%- assign titleAndContent = part | split: \'</h1>\' -%}
42
+ {%- assign title = titleAndContent[0] | replace_first: \'>\', \'<h1>\' | split: \'<h1>\' -%}
43
+ {%- assign title = title[1] | strip_html -%}
44
+ {%- assign content = titleAndContent[1] -%}
45
+ {%- assign url = page.url -%}
46
+ {%- if title == page.title and parts[0] == \'\' -%}
47
+ {%- assign title_found = true -%}
48
+ {%- else -%}
49
+ {%- assign id = titleAndContent[0] -%}
50
+ {%- assign id = id | split: \'id="\' -%}
51
+ {%- if id.size == 2 -%}
52
+ {%- assign id = id[1] -%}
53
+ {%- assign id = id | split: \'"\' -%}
54
+ {%- assign id = id[0] -%}
55
+ {%- capture url -%}{{ url | append: \'#\' | append: id }}{%- endcapture -%}
56
+ {%- endif -%}
57
+ {%- endif -%}
58
+ {%- unless i == 0 -%},{%- endunless -%}
59
+ "{{ i }}": {
60
+ "doc": {{ page.title | jsonify }},
61
+ "title": {{ title | jsonify }},
62
+ "content": {{ content | replace: \'</h\', \' . </h\' | replace: \'<hr\', \' . <hr\' | replace: \'</p\', \' . </p\' | replace: \'<ul\', \' . <ul\' | replace: \'</ul\', \' . </ul\' | replace: \'<ol\', \' . <ol\' | replace: \'</ol\', \' . </ol\' | replace: \'</tr\', \' . </tr\' | replace: \'<li\', \' | <li\' | replace: \'</li\', \' | </li\' | replace: \'</td\', \' | </td\' | replace: \'<td\', \' | <td\' | replace: \'</th\', \' | </th\' | replace: \'<th\', \' | <th\' | strip_html | remove: \'Table of contents\' | normalize_whitespace | replace: \'. . .\', \'.\' | replace: \'. .\', \'.\' | replace: \'| |\', \'|\' | append: \' \' | jsonify }},
63
+ "url": "{{ url | relative_url }}",
64
+ {% include lunr/custom-data.json page=page %}
65
+ "relUrl": "{{ url }}"
66
+ }
67
+ {%- assign i = i | plus: 1 -%}
68
+ {%- endfor -%}
69
+ {%- unless title_found -%}
70
+ {%- unless i == 0 -%},{%- endunless -%}
71
+ "{{ i }}": {
72
+ "doc": {{ page.title | jsonify }},
73
+ "title": {{ page.title | jsonify }},
74
+ "content": {{ parts[0] | replace: \'</h\', \' . </h\' | replace: \'<hr\', \' . <hr\' | replace: \'</p\', \' . </p\' | replace: \'<ul\', \' . <ul\' | replace: \'</ul\', \' . </ul\' | replace: \'<ol\', \' . <ol\' | replace: \'</ol\', \' . </ol\' | replace: \'</tr\', \' . </tr\' | replace: \'<li\', \' | <li\' | replace: \'</li\', \' | </li\' | replace: \'</td\', \' | </td\' | replace: \'<td\', \' | <td\' | replace: \'</th\', \' | </th\' | replace: \'<th\', \' | <th\' | strip_html | remove: \'Table of contents\' | normalize_whitespace | replace: \'. . .\', \'.\' | replace: \'. .\', \'.\' | replace: \'| |\', \'|\' | append: \' \' | jsonify }},
75
+ "url": "{{ page.url | relative_url }}",
76
+ {% include lunr/custom-data.json page=page %}
77
+ "relUrl": "{{ page.url }}"
78
+ }
79
+ {%- assign i = i | plus: 1 -%}
80
+ {%- endunless -%}
81
+ {%- endif -%}
82
+ {%- endfor -%}
83
+ {%- endfor %}
84
+ }'
85
+ end
86
+ puts 'Done.'
87
+ end
88
+ end
metadata ADDED
@@ -0,0 +1,217 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: just-the-hm-docs
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.rc1
5
+ platform: ruby
6
+ authors:
7
+ - Human Made
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-02-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.3.5
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.3.5
27
+ - !ruby/object:Gem::Dependency
28
+ name: jekyll
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 3.8.5
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 3.8.5
41
+ - !ruby/object:Gem::Dependency
42
+ name: jekyll-seo-tag
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 12.3.1
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 12.3.1
69
+ description:
70
+ email:
71
+ - info@humanmade.com
72
+ executables:
73
+ - just-the-hm-docs
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - LICENSE.txt
78
+ - README.md
79
+ - Rakefile
80
+ - _includes/components/aux_nav.html
81
+ - _includes/components/breadcrumbs.html
82
+ - _includes/components/children_nav.html
83
+ - _includes/components/footer.html
84
+ - _includes/components/header.html
85
+ - _includes/components/mermaid.html
86
+ - _includes/components/search_footer.html
87
+ - _includes/components/search_header.html
88
+ - _includes/components/sidebar.html
89
+ - _includes/css/callouts.scss.liquid
90
+ - _includes/css/custom.scss.liquid
91
+ - _includes/css/just-the-docs.scss.liquid
92
+ - _includes/fix_linenos.html
93
+ - _includes/footer_custom.html
94
+ - _includes/head.html
95
+ - _includes/head_custom.html
96
+ - _includes/header_custom.html
97
+ - _includes/icons/code_copy.html
98
+ - _includes/icons/document.html
99
+ - _includes/icons/expand.html
100
+ - _includes/icons/external_link.html
101
+ - _includes/icons/icons.html
102
+ - _includes/icons/link.html
103
+ - _includes/icons/menu.html
104
+ - _includes/icons/search.html
105
+ - _includes/js/custom.js
106
+ - _includes/lunr/custom-data.json
107
+ - _includes/lunr/custom-index.js
108
+ - _includes/mermaid_config.js
109
+ - _includes/nav.html
110
+ - _includes/nav_footer_custom.html
111
+ - _includes/search_placeholder_custom.html
112
+ - _includes/title.html
113
+ - _includes/toc_heading_custom.html
114
+ - _includes/vendor/anchor_headings.html
115
+ - _layouts/about.html
116
+ - _layouts/default.html
117
+ - _layouts/home.html
118
+ - _layouts/minimal.html
119
+ - _layouts/page.html
120
+ - _layouts/post.html
121
+ - _layouts/table_wrappers.html
122
+ - _layouts/vendor/compress.html
123
+ - _sass/base.scss
124
+ - _sass/buttons.scss
125
+ - _sass/code.scss
126
+ - _sass/color_schemes/dark.scss
127
+ - _sass/color_schemes/hm.scss
128
+ - _sass/color_schemes/light.scss
129
+ - _sass/content.scss
130
+ - _sass/custom/custom.scss
131
+ - _sass/custom/hm-branding.scss
132
+ - _sass/custom/hm-code.scss
133
+ - _sass/custom/hm-colors.scss
134
+ - _sass/custom/hm-notes.scss
135
+ - _sass/custom/setup.scss
136
+ - _sass/labels.scss
137
+ - _sass/layout.scss
138
+ - _sass/modules.scss
139
+ - _sass/navigation.scss
140
+ - _sass/print.scss
141
+ - _sass/search.scss
142
+ - _sass/skiptomain.scss
143
+ - _sass/support/_functions.scss
144
+ - _sass/support/_variables.scss
145
+ - _sass/support/mixins/_buttons.scss
146
+ - _sass/support/mixins/_layout.scss
147
+ - _sass/support/mixins/_typography.scss
148
+ - _sass/support/mixins/mixins.scss
149
+ - _sass/support/support.scss
150
+ - _sass/tables.scss
151
+ - _sass/typography.scss
152
+ - _sass/utilities/_colors.scss
153
+ - _sass/utilities/_layout.scss
154
+ - _sass/utilities/_lists.scss
155
+ - _sass/utilities/_spacing.scss
156
+ - _sass/utilities/_typography.scss
157
+ - _sass/utilities/utilities.scss
158
+ - _sass/vendor/OneDarkJekyll/LICENSE
159
+ - _sass/vendor/OneDarkJekyll/README.md
160
+ - _sass/vendor/OneDarkJekyll/colors.less
161
+ - _sass/vendor/OneDarkJekyll/syntax-firewatch-green.scss
162
+ - _sass/vendor/OneDarkJekyll/syntax-firewatch.scss
163
+ - _sass/vendor/OneDarkJekyll/syntax-one-dark-vivid.scss
164
+ - _sass/vendor/OneDarkJekyll/syntax-one-dark.scss
165
+ - _sass/vendor/OneDarkJekyll/syntax-variables.less
166
+ - _sass/vendor/OneDarkJekyll/syntax.less
167
+ - _sass/vendor/normalize.scss/README.md
168
+ - _sass/vendor/normalize.scss/normalize.scss
169
+ - assets/css/just-the-docs-dark.scss
170
+ - assets/css/just-the-docs-default.scss
171
+ - assets/css/just-the-docs-light.scss
172
+ - assets/favicon/android-chrome-192x192.png
173
+ - assets/favicon/android-chrome-512x512.png
174
+ - assets/favicon/apple-touch-icon.png
175
+ - assets/favicon/favicon-16x16.png
176
+ - assets/favicon/favicon-32x32.png
177
+ - assets/favicon/favicon.ico
178
+ - assets/favicon/site.webmanifest
179
+ - assets/images/.gitkeep
180
+ - assets/images/hm-logo.svg
181
+ - assets/images/search.svg
182
+ - assets/js/just-the-docs.js
183
+ - assets/js/vendor/lunr.min.js
184
+ - assets/js/zzzz-search-data.json
185
+ - bin/just-the-hm-docs
186
+ - changelog.md
187
+ - favicon.ico
188
+ - lib/tasks/search.rake
189
+ homepage: https://github.com/humanmade/just-the-hm-docs
190
+ licenses:
191
+ - MIT
192
+ metadata:
193
+ bug_tracker_uri: https://github.com/humanmade/just-the-hm-docs/issues
194
+ changelog_uri: https://github.com/humanmade/just-the-hm-docs/blob/main/changelog.md
195
+ documentation_uri: https://humanmade.github.io/just-the-hm-docs/
196
+ source_code_uri: https://github.com/humanmade/just-the-hm-docs
197
+ post_install_message:
198
+ rdoc_options: []
199
+ require_paths:
200
+ - lib
201
+ required_ruby_version: !ruby/object:Gem::Requirement
202
+ requirements:
203
+ - - ">="
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
+ required_rubygems_version: !ruby/object:Gem::Requirement
207
+ requirements:
208
+ - - ">"
209
+ - !ruby/object:Gem::Version
210
+ version: 1.3.1
211
+ requirements: []
212
+ rubygems_version: 3.3.26
213
+ signing_key:
214
+ specification_version: 4
215
+ summary: A modern, highly customizable, and responsive Jekyll theme for documentation
216
+ with built-in search.
217
+ test_files: []