diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e40716f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "deno.enable": true, + "deno.lint": true, + "deno.unstable": true +} diff --git a/_config.ts b/_config.ts new file mode 100644 index 0000000..82e6811 --- /dev/null +++ b/_config.ts @@ -0,0 +1,59 @@ +import lume from "lume/mod.ts"; +import jsx from "lume/plugins/jsx.ts"; +import attributes from "lume/plugins/attributes.ts"; +import code_highlight from "lume/plugins/code_highlight.ts"; +// import favicon from "lume/plugins/favicon.ts"; +// import liquid from "lume/plugins/liquid.ts"; +import pug from "lume/plugins/pug.ts"; +import feed from "lume/plugins/feed.ts"; +import filter_pages from "lume/plugins/filter_pages.ts"; +import mdx from "lume/plugins/mdx.ts"; +import metas from "lume/plugins/metas.ts"; +import nav from "lume/plugins/nav.ts"; +import pagefind from "lume/plugins/pagefind.ts"; +import reading_info from "lume/plugins/reading_info.ts"; +import source_maps from "lume/plugins/source_maps.ts"; +import tailwindcss from "lume/plugins/tailwindcss.ts"; +import postcss from "lume/plugins/postcss.ts"; +import terser from "lume/plugins/terser.ts"; + +const site = lume({ + src: "_src", + +}); + +site.ignore( + "readme.md", +) + +site.data("greeting", () => { + const hellos = ["Ahoy!", "Ahoy there!", "Hey there!", "Howdy howdy!", "Howdy, friend!", "Howdy!", "Hey!", "Hey there!", "Hi!", "Hello!", "Hello there!", "Hi there!"]; + return hellos[Math.floor(Math.random() * hellos.length)]; +}) + +site.data("getYear", () => { + return new Date().getFullYear(); +}); + +site.use(pug()); +site.use(jsx()); +site.use(attributes()); +site.use(code_highlight()); +// site.use(favicon()); +site.use(feed()); +site.use(filter_pages({ fn: (page) => page.data.ignored !== true })); +site.use(mdx()); +site.use(metas({ + extensions: [".md", ".mdx"], +})); +site.use(nav()); +site.use(pagefind()); +site.use(reading_info()); +site.use(source_maps()); +site.use(tailwindcss()); +site.use(postcss()); +site.use(terser()); + +site.copy("files"); + +export default site; diff --git a/_data.yml b/_data.yml new file mode 100644 index 0000000..0d95f73 --- /dev/null +++ b/_data.yml @@ -0,0 +1,4 @@ +metas: + site: Lio's Website + twitter: "@fangmrks" + generator: true diff --git a/_data/metas.yml b/_data/metas.yml new file mode 100644 index 0000000..f7a6664 --- /dev/null +++ b/_data/metas.yml @@ -0,0 +1,3 @@ +site: Lio's Website +twitter: "@fangmrks" +generator: true diff --git a/_data/socials.yml b/_data/socials.yml new file mode 100644 index 0000000..33f50ea --- /dev/null +++ b/_data/socials.yml @@ -0,0 +1,10 @@ +- name: Twitter + url: https://twitter.com/fangmrks +- name: Bluesky + url: https://pogcha.mp +- name: Mastodon + url: https://lio.to/mastodon +- name: Forge + url: https://git.lio.cat/l +- name: Github + url: https://github.com/fangmarks diff --git a/_site/feed.rss b/_site/feed.rss new file mode 100644 index 0000000..85ea3f0 --- /dev/null +++ b/_site/feed.rss @@ -0,0 +1,21 @@ + + + + My RSS Feed + http://localhost:3000/ + + + Sat, 06 Jan 2024 01:47:06 GMT + en + Lume v2.0.2 + + http://localhost:3000/ + http://localhost:3000/ + + Howdy! + ]]> + + Fri, 05 Jan 2024 21:19:45 GMT + + + \ No newline at end of file diff --git a/_site/files/TwitterAvi.jpg b/_site/files/TwitterAvi.jpg new file mode 100644 index 0000000..32dada7 Binary files /dev/null and b/_site/files/TwitterAvi.jpg differ diff --git a/_site/index.html b/_site/index.html new file mode 100644 index 0000000..8209419 --- /dev/null +++ b/_site/index.html @@ -0,0 +1,67 @@ + + + + + Lio + + + + + + + + + + + + + + Twitter + + + + Bluesky + + + + Mastodon + + + + Forge + + + + Github + + + + + + + +
+

Howdy!

+ +
+ + + + + + \ No newline at end of file diff --git a/_site/pagefind/fragment/en_27214a4.pf_fragment b/_site/pagefind/fragment/en_27214a4.pf_fragment new file mode 100644 index 0000000..1335d60 Binary files /dev/null and b/_site/pagefind/fragment/en_27214a4.pf_fragment differ diff --git a/_site/pagefind/fragment/en_2b46224.pf_fragment b/_site/pagefind/fragment/en_2b46224.pf_fragment new file mode 100644 index 0000000..41d4a2f Binary files /dev/null and b/_site/pagefind/fragment/en_2b46224.pf_fragment differ diff --git a/_site/pagefind/fragment/en_2e48399.pf_fragment b/_site/pagefind/fragment/en_2e48399.pf_fragment new file mode 100644 index 0000000..48f7bbc Binary files /dev/null and b/_site/pagefind/fragment/en_2e48399.pf_fragment differ diff --git a/_site/pagefind/fragment/en_88f9672.pf_fragment b/_site/pagefind/fragment/en_88f9672.pf_fragment new file mode 100644 index 0000000..bfe8cfe Binary files /dev/null and b/_site/pagefind/fragment/en_88f9672.pf_fragment differ diff --git a/_site/pagefind/index/en_44e160d.pf_index b/_site/pagefind/index/en_44e160d.pf_index new file mode 100644 index 0000000..169eeac Binary files /dev/null and b/_site/pagefind/index/en_44e160d.pf_index differ diff --git a/_site/pagefind/index/en_5f55a8b.pf_index b/_site/pagefind/index/en_5f55a8b.pf_index new file mode 100644 index 0000000..4d7c110 Binary files /dev/null and b/_site/pagefind/index/en_5f55a8b.pf_index differ diff --git a/_site/pagefind/index/en_6daa25a.pf_index b/_site/pagefind/index/en_6daa25a.pf_index new file mode 100644 index 0000000..7540c42 Binary files /dev/null and b/_site/pagefind/index/en_6daa25a.pf_index differ diff --git a/_site/pagefind/index/en_836d1ab.pf_index b/_site/pagefind/index/en_836d1ab.pf_index new file mode 100644 index 0000000..d980783 Binary files /dev/null and b/_site/pagefind/index/en_836d1ab.pf_index differ diff --git a/_site/pagefind/pagefind-entry.json b/_site/pagefind/pagefind-entry.json new file mode 100644 index 0000000..6576572 --- /dev/null +++ b/_site/pagefind/pagefind-entry.json @@ -0,0 +1 @@ +{"version":"1.0.4","languages":{"en":{"hash":"en_1eb54973a8","wasm":"en","page_count":1}}} \ No newline at end of file diff --git a/_site/pagefind/pagefind-highlight.js b/_site/pagefind/pagefind-highlight.js new file mode 100644 index 0000000..40f8d7d --- /dev/null +++ b/_site/pagefind/pagefind-highlight.js @@ -0,0 +1,11 @@ +var e,t,n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=((e,t,c)=>(c=null!=e?n(o(e)):{},((e,t,n,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let c of a(t))s.call(e,c)||c===n||r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e})(!t&&e&&e.__esModule?c:r(c,"default",{value:e,enumerable:!0}),e)))((e={"node_modules/mark.js/dist/mark.js"(e,t){var n,r;n=e,r=function(){var e="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},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=i,this.iframesTimeout=a}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(t){var n=e.filter((function(e){return e.contains(t)})).length>0;-1!==e.indexOf(t)||n||e.push(t)})),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var i=e.contentWindow;if(r=i.document,!i||!r)throw new Error("iframe inaccessible")}catch(e){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,i=!1,a=null,o=function o(){if(!i){i=!0,clearTimeout(a);try{r.isIframeBlank(e)||(e.removeEventListener("load",o),r.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",o),a=setTimeout(o,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,(function(){return!0}),(function(e){r++,n.waitForIframes(e.querySelector("html"),(function(){--r||t()}))}),(function(e){e||t()}))}},{key:"forEachIframe",value:function(t,n,r){var i=this,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=t.querySelectorAll("iframe"),s=o.length,c=0;o=Array.prototype.slice.call(o);var u=function(){--s<=0&&a(c)};s||u(),o.forEach((function(t){e.matches(t,i.exclude)?u():i.onIframeReady(t,(function(e){n(t)&&(c++,r(e)),u()}),u)}))}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:(null===t||e.nextNode())&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var i=!1,a=!1;return r.forEach((function(e,t){e.val===n&&(i=t,a=e.handled)})),this.compareNodeIframe(e,t,n)?(!1!==i||a?!1===i||a||(r[i].handled=!0):r.push({val:n,handled:!0}),!0):(!1===i&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var i=this;e.forEach((function(e){e.handled||i.getIframeContents(e.val,(function(e){i.createInstanceOnIframe(e).forEachNode(t,n,r)}))}))}},{key:"iterateThroughNodes",value:function(e,t,n,r,i){for(var a,o=this,s=this.createIterator(t,e,r),c=[],u=[],l=void 0,h=void 0;a=void 0,a=o.getIteratorNode(s),h=a.prevNode,l=a.node;)this.iframes&&this.forEachIframe(t,(function(e){return o.checkIframeFilter(l,h,e,c)}),(function(t){o.createInstanceOnIframe(t).forEachNode(e,(function(e){return u.push(e)}),r)})),u.push(l);u.forEach((function(e){n(e)})),this.iframes&&this.handleOpenIframes(c,e,n,r),i()}},{key:"forEachNode",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=this.getContexts(),o=a.length;o||i(),a.forEach((function(a){var s=function(){r.iterateThroughNodes(e,a,t,n,(function(){--o<=0&&i()}))};r.iframes?r.waitForIframes(a,s):s()}))}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var i=!1;return n.every((function(t){return!r.call(e,t)||(i=!0,!1)})),i}return!1}}]),e}(),a=function(){function a(e){t(this,a),this.ctx=e,this.ie=!1;var n=window.navigator.userAgent;(n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1)&&(this.ie=!0)}return n(a,[{key:"log",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===(void 0===r?"undefined":e(r))&&"function"==typeof r[n]&&r[n]("mark.js: "+t)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var i in t)if(t.hasOwnProperty(i)){var a=t[i],o="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(i):this.escapeStr(i),s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(a):this.escapeStr(a);""!==o&&""!==s&&(e=e.replace(new RegExp("("+this.escapeStr(o)+"|"+this.escapeStr(s)+")","gm"+n),r+"("+this.processSynomyms(o)+"|"+this.processSynomyms(s)+")"+r))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,(function(e){return"\\"===e.charAt(0)?"?":""}))).replace(/(?:\\)*\*/g,(function(e){return"\\"===e.charAt(0)?"*":""}))}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,(function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"}))}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],r=[];return e.split("").forEach((function(i){n.every((function(n){if(-1!==n.indexOf(i)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),r.push(n)}return!0}))})),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n=this.opt.accuracy,r="string"==typeof n?n:n.value,i="string"==typeof n?[]:n.limiters,a="";switch(i.forEach((function(e){a+="|"+t.escapeStr(e)})),r){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(a="\\s"+(a||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+e+"[^"+a+"]*)";case"exactly":return"(^|\\s"+a+")("+e+")(?=$|\\s"+a+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach((function(e){t.opt.separateWordSearch?e.split(" ").forEach((function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)})):e.trim()&&-1===n.indexOf(e)&&n.push(e)})),{keywords:n.sort((function(e,t){return t.length-e.length})),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort((function(e,t){return e.start-t.start})).forEach((function(e){var i=t.callNoMatchOnInvalidRanges(e,r),a=i.start,o=i.end;i.valid&&(e.start=a,e.length=o-a,n.push(e),r=o)})),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,i=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?i=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:r,valid:i}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,i=!0,a=n.length,o=t-a,s=parseInt(e.start,10)-o;return(r=(s=s>a?a:s)+parseInt(e.length,10))>a&&(r=a,this.log("End range automatically set to the max value of "+a)),s<0||r-s<0||s>a||r>a?(i=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(s,r).replace(/\s+/g,"")&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:s,end:r,valid:i}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})}),(function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){e({value:n,nodes:r})}))}},{key:"matchesExclude",value:function(e){return i.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",i=e.splitText(t),a=i.splitText(n-t),o=document.createElement(r);return o.setAttribute("data-markjs","true"),this.opt.className&&o.setAttribute("class",this.opt.className),o.textContent=i.textContent,i.parentNode.replaceChild(o,i),a}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,i){var a=this;e.nodes.every((function(o,s){var c=e.nodes[s+1];if(void 0===c||c.start>t){if(!r(o.node))return!1;var u=t-o.start,l=(n>o.end?o.end:n)-o.start,h=e.value.substr(0,o.start),d=e.value.substr(l+o.start);if(o.node=a.wrapRangeInTextNode(o.node,u,l),e.value=h+d,e.nodes.forEach((function(t,n){n>=s&&(e.nodes[n].start>0&&n!==s&&(e.nodes[n].start-=l),e.nodes[n].end-=l)})),n-=l,i(o.node.previousSibling,o.start),!(n>o.end))return!1;t=o.end}return!0}))}},{key:"wrapMatches",value:function(e,t,n,r,i){var a=this,o=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var i=void 0;null!==(i=e.exec(t.textContent))&&""!==i[o];)if(n(i[o],t)){var s=i.index;if(0!==o)for(var c=1;c