forked from mCaptcha/website
1 line
No EOL
19 KiB
JavaScript
1 line
No EOL
19 KiB
JavaScript
var suggestions=document.getElementById('suggestions'),userinput=document.getElementById('userinput');document.addEventListener('keydown',inputFocus);function inputFocus(a){a.keyCode===191&&(a.preventDefault(),userinput.focus()),a.keyCode===27&&(userinput.blur(),suggestions.classList.add('d-none'))}document.addEventListener('click',function(a){var b=suggestions.contains(a.target);b||suggestions.classList.add('d-none')}),document.addEventListener('keydown',suggestionFocus);function suggestionFocus(b){const d=suggestions.querySelectorAll('a'),e=[...d],a=e.indexOf(document.activeElement);let c=0;b.keyCode===38?(b.preventDefault(),c=a>0?a-1:0,d[c].focus()):b.keyCode===40&&(b.preventDefault(),c=a+1<e.length?a+1:a,d[c].focus())}(function(){var b=new FlexSearch({preset:'score',cache:!0,doc:{id:'id',field:['title','description','content'],store:['href','title','description']}}),c=[{id:0,href:"/docs/api/mcaptcha-system/",title:"mCaptcha System Library",description:"API documenttion for the core Library used in mCaptcha",content:'\u003cp\u003eDocumentation for the library used in mCaptcha core.\u003c/p\u003e\n\u003ch2 id="versions"\u003eVersions\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href="https://mcaptcha.github.io/mCaptcha/m_captcha/index.html"\u003emaster-branch\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href="/api-docs/m_captcha/0.1.3/m_captcha/index.html"\u003e0.1.3\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href="/api-docs/m_captcha/0.1.2/m_captcha/index.html"\u003e0.1.2\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href="/api-docs/m_captcha/0.1.1/m_captcha/index.html"\u003e0.1.1\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href="/api-docs/m_captcha/0.1.0/m_captcha/index.html"\u003e0.1.0\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n'},{id:1,href:"/docs/prologue/introduction/",title:"Introduction",description:"Doks is a Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default.",content:'\u003ch2 id="get-started"\u003eGet started\u003c/h2\u003e\n\u003cp\u003eThere are two main ways to get started with Doks:\u003c/p\u003e\n\u003ch3 id="tutorial"\u003eTutorial\u003c/h3\u003e\n\u003cdiv class="alert alert-warning d-flex" role="alert"\u003e\n \u003cdiv class="flex-shrink-1 alert-icon"\u003e👉\u003c/div\u003e\n \u003cdiv class="w-100"\u003eThe Tutorial is intended for novice to intermediate users.\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eStep-by-step instructions on how to start a new Doks project. \u003ca href="https://getdoks.org/tutorial/introduction/"\u003eTutorial →\u003c/a\u003e\u003c/p\u003e\n\u003ch3 id="quick-start"\u003eQuick Start\u003c/h3\u003e\n\u003cdiv class="alert alert-warning d-flex" role="alert"\u003e\n \u003cdiv class="flex-shrink-1 alert-icon"\u003e👉\u003c/div\u003e\n \u003cdiv class="w-100"\u003eThe Quick Start is intended for intermediate to advanced users.\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eOne page summary of how to start a new Doks project. \u003ca href="/docs/prologue/quick-start/"\u003eQuick Start →\u003c/a\u003e\u003c/p\u003e\n\u003ch2 id="go-further"\u003eGo further\u003c/h2\u003e\n\u003cp\u003eRecipes, Reference Guides, Extensions, and Showcase.\u003c/p\u003e\n\u003ch3 id="recipes"\u003eRecipes\u003c/h3\u003e\n\u003cp\u003eGet instructions on how to accomplish common tasks with Doks. \u003ca href="https://getdoks.org/docs/recipes/project-configuration/"\u003eRecipes →\u003c/a\u003e\u003c/p\u003e\n\u003ch3 id="reference-guides"\u003eReference Guides\u003c/h3\u003e\n\u003cp\u003eLearn how to customize Doks to fully make it your own. \u003ca href="https://getdoks.org/docs/reference-guides/security/"\u003eReference Guides →\u003c/a\u003e\u003c/p\u003e\n\u003ch3 id="extensions"\u003eExtensions\u003c/h3\u003e\n\u003cp\u003eGet instructions on how to add even more to Doks. \u003ca href="https://getdoks.org/docs/extensions/add-google-fonts/"\u003eExtensions →\u003c/a\u003e\u003c/p\u003e\n\u003ch3 id="showcase"\u003eShowcase\u003c/h3\u003e\n\u003cp\u003eSee what others have build with Doks. \u003ca href="https://getdoks.org/showcase/parietal-numerics-documentation/"\u003eShowcase →\u003c/a\u003e\u003c/p\u003e\n\u003ch2 id="contributing"\u003eContributing\u003c/h2\u003e\n\u003cp\u003eFind out how to contribute to Doks. \u003ca href="https://getdoks.org/docs/contributing/how-to-contribute/"\u003eContributing →\u003c/a\u003e\u003c/p\u003e\n\u003ch2 id="help"\u003eHelp\u003c/h2\u003e\n\u003cp\u003eGet help on Doks. \u003ca href="/docs/help/how-to-update/"\u003eHelp →\u003c/a\u003e\u003c/p\u003e\n'},{id:2,href:"/docs/api/browser/",title:"Browser library",description:"API documenttion for mCaptcha WASM library",content:'\u003cp\u003eWebAssembly library which generates Proofs of Work for mCaptcha systems.\u003c/p\u003e\n\u003ch2 id="versions"\u003eVersions\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href="https://mcaptcha.github.io/browser/mCaptcha_browser/index.html"\u003emaster-branch\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href="/api-docs/browser/0.1.0/mCaptcha_browser/index.html"\u003e0.1.0\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n'},{id:3,href:"/docs/prologue/quick-start/",title:"Quick Start",description:"One page summary of how to start a new Doks project.",content:'\u003ch2 id="requirements"\u003eRequirements\u003c/h2\u003e\n\u003cp\u003eDoks uses npm to install dependencies and run commands. Installing npm is pretty simple. Download and install \u003ca href="https://nodejs.org/"\u003eNode.js\u003c/a\u003e (it includes npm) for your platform.\u003c/p\u003e\n\u003ch2 id="start-a-new-doks-project"\u003eStart a new Doks project\u003c/h2\u003e\n\u003cp\u003eCreate a new site, change directories, install dependencies, and start development server.\u003c/p\u003e\n\u003ch3 id="create-a-new-site"\u003eCreate a new site\u003c/h3\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="git clone https://github.com/h-enk/doks.git my-doks-site"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003egit clone https://github.com/h-enk/doks.git my-doks-site\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id="change-directories"\u003eChange directories\u003c/h3\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="cd my-doks-site"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003e\u003cspan class="nb"\u003ecd\u003c/span\u003e my-doks-site\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id="install-dependencies"\u003eInstall dependencies\u003c/h3\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="npm install"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm install\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id="start-development-server"\u003eStart development server\u003c/h3\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="npm run start"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm run start\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eDoks will start the Hugo development webserver accessible by default at \u003ccode\u003ehttp://localhost:1313\u003c/code\u003e. Saved changes will live reload in the browser.\u003c/p\u003e\n\u003ch2 id="other-commands"\u003eOther commands\u003c/h2\u003e\n\u003cp\u003eDoks comes with commands for common tasks. \u003ca href="/docs/prologue/commands/"\u003eCommands →\u003c/a\u003e\u003c/p\u003e\n'},{id:4,href:"/docs/api/pow-sha256/",title:"pow_sha256",description:"API documenttion for PoW Library used in mCaptcha",content:'\u003cp\u003eRust crate which generates SHA256 Proofs of Work on serializable datatypes.\u003c/p\u003e\n\u003cp\u003eThis is a fork of the \u003ca href="https://github.com/bddap/pow"\u003e\u003ccode\u003epow\u003c/code\u003e library\u003c/a\u003e by\n\u003ca href="https://github.com/robkorn/pow_sha256"\u003e@robkorn\u003c/a\u003e) with some new\nadditions. Primary of these being:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003ePoW datatype now offers a constructor\u003c/li\u003e\n\u003cli\u003eSalt is no longer hard coded into the library, users can provide\nunique salts.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eOther small changes have also been included of various importance but\nmostly just stylistic/ease of use improvements.\u003c/p\u003e\n\u003ch2 id="versions"\u003eVersions\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href="https://mcaptcha.github.io/pow_sha256/pow_sha256/index.html"\u003emaster-branch\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href="/api-docs/pow_sha256/0.2.1/pow_sha256/index.html"\u003e0.2.1\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href="/api-docs/pow_sha256/0.2.0/pow_sha256/index.html"\u003e0.2.0\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href="/api-docs/pow_sha256/0.1.0/pow_sha256/index.html"\u003e0.1.0\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id="changelog"\u003eChangelog\u003c/h2\u003e\n\u003cp\u003eChangelog is available at the project\u0026rsquo;s\n\u003ca href="https://github.com/mCaptcha/pow_sha256/blob/master/CHANGELOG.md"\u003erepository\u003c/a\u003e\u003c/p\u003e\n'},{id:5,href:"/docs/prologue/commands/",title:"Commands",description:"Doks comes with commands for common tasks.",content:'\u003cdiv class="alert alert-warning d-flex" role="alert"\u003e\n \u003cdiv class="flex-shrink-1 alert-icon"\u003e💡\u003c/div\u003e\n \u003cdiv class="w-100"\u003eYou can change the commands in the scripts section of `./package.json`.\u003c/div\u003e\n\u003c/div\u003e\n\u003ch2 id="start"\u003estart\u003c/h2\u003e\n\u003cp\u003eStart local development server:\u003c/p\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="npm run start"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm run start\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id="lint"\u003elint\u003c/h2\u003e\n\u003cp\u003eCheck scripts, styles, and markdown for errors:\u003c/p\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="npm run lint"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm run lint\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id="scripts"\u003escripts\u003c/h3\u003e\n\u003cp\u003eCheck scripts for errors:\u003c/p\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="npm run lint:scripts"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm run lint:scripts \u003cspan class="o"\u003e[\u003c/span\u003e-- --fix\u003cspan class="o"\u003e]\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id="styles"\u003estyles\u003c/h3\u003e\n\u003cp\u003eCheck styles for errors:\u003c/p\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="npm run lint:styles"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm run lint:styles \u003cspan class="o"\u003e[\u003c/span\u003e-- --fix\u003cspan class="o"\u003e]\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id="markdown"\u003emarkdown\u003c/h3\u003e\n\u003cp\u003eCheck markdown for errors:\u003c/p\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="npm run lint:markdown"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm run lint:markdown \u003cspan class="o"\u003e[\u003c/span\u003e-- --fix\u003cspan class="o"\u003e]\u003c/span\u003e\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id="clean"\u003eclean\u003c/h2\u003e\n\u003cp\u003eDelete temporary directories:\u003c/p\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="npm run clean"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm run clean\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id="build"\u003ebuild\u003c/h2\u003e\n\u003cp\u003eBuild production website:\u003c/p\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="npm run build"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm run build\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id="functions"\u003efunctions\u003c/h3\u003e\n\u003cp\u003eBuild Lambda functions:\u003c/p\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="npm run build:functions"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm run build:functions\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch3 id="preview"\u003epreview\u003c/h3\u003e\n\u003cp\u003eBuild production website including draft and future content:\u003c/p\u003e\n\u003cbutton class="btn-clipboard btn btn-sm btn-link" data-clipboard-text="npm run build:preview"\u003e\u003cspan class="copy-status"\u003e\u003c/span\u003e\u003c/button\u003e\n\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm run build:preview\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e'},{id:6,href:"/docs/help/how-to-update/",title:"How to Update",description:"Regularly update the installed npm packages to keep your Doks website stable, usable, and secure.",content:'\u003cdiv class="alert alert-warning d-flex" role="alert"\u003e\n \u003cdiv class="flex-shrink-1 alert-icon"\u003e💡\u003c/div\u003e\n \u003cdiv class="w-100"\u003eLearn more about \u003ca href="https://docs.npmjs.com/about-semantic-versioning"\u003esemantic versioning\u003c/a\u003e and \u003ca href="https://docs.npmjs.com/cli/v6/using-npm/semver#advanced-range-syntax"\u003eadvanced range syntax\u003c/a\u003e.\u003c/div\u003e\n\u003c/div\u003e\n\u003ch2 id="update-npm-packages"\u003eUpdate npm packages\u003c/h2\u003e\n\u003cp\u003eBump the versions in the \u003ccode\u003edevDependencies\u003c/code\u003e section of \u003ccode\u003e./package.json\u003c/code\u003e to your liking, and run:\u003c/p\u003e\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm update\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e'},{id:7,href:"/docs/help/troubleshooting/",title:"Troubleshooting",description:"Solutions to common problems.",content:'\u003ch2 id="problems-updating-npm-packages"\u003eProblems updating npm packages\u003c/h2\u003e\n\u003cp\u003eDelete the \u003ccode\u003e./node_modules\u003c/code\u003e folder, and run again:\u003c/p\u003e\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm install\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003ch2 id="problems-with-cache"\u003eProblems with cache\u003c/h2\u003e\n\u003cp\u003eDelete the temporary directories:\u003c/p\u003e\n\u003cdiv class="highlight"\u003e\u003cpre class="chroma"\u003e\u003ccode class="language-bash" data-lang="bash"\u003enpm run clean\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e'},{id:8,href:"/docs/help/faq/",title:"FAQ",description:"Answers to frequently asked questions.",content:'\u003ch2 id="hyas"\u003eHyas?\u003c/h2\u003e\n\u003cp\u003eDoks is a \u003ca href="https://gethyas.com/themes/doks/"\u003eHyas theme\u003c/a\u003e build by the creator of Hyas.\u003c/p\u003e\n\u003ch2 id="footer-notice"\u003eFooter notice?\u003c/h2\u003e\n\u003cp\u003ePlease keep it in place.\u003c/p\u003e\n\u003ch2 id="keyboard-shortcuts-for-search"\u003eKeyboard shortcuts for search?\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003efocus: \u003ccode\u003e/\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eselect: \u003ccode\u003e↓\u003c/code\u003e and \u003ccode\u003e↑\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eopen: \u003ccode\u003eEnter\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003eclose: \u003ccode\u003eEsc\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id="other-documentation"\u003eOther documentation?\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href="https://docs.netlify.com/"\u003eNetlify\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href="https://gohugo.io/documentation/"\u003eHugo\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id="can-i-get-support"\u003eCan I get support?\u003c/h2\u003e\n\u003cp\u003eCreate a topic:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href="https://community.netlify.com/"\u003eNetlify Community\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href="https://discourse.gohugo.io/"\u003eHugo Forums\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id="contact-the-creator"\u003eContact the creator?\u003c/h2\u003e\n\u003cp\u003eSend \u003ccode\u003eh-enk\u003c/code\u003e a message:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href="https://community.netlify.com/"\u003eNetlify Community\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href="https://discourse.gohugo.io/"\u003eHugo Forums\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e\n'},{id:9,href:"/docs/help/",title:"Help",description:"Help Doks.",content:""},{id:10,href:"/docs/prologue/",title:"Prologue",description:"Prologue Doks.",content:""},{id:11,href:"/docs/api/",title:"API",description:"Docs Doks.",content:""},{id:12,href:"/docs/",title:"Docs",description:"Docs Doks.",content:""}];b.add(c),userinput.addEventListener('input',e,!0),suggestions.addEventListener('click',f,!0);function e(){var g=this.value,e=b.search(g,5),f=suggestions.childNodes,h=0,i=e.length,c;for(suggestions.classList.remove('d-none'),e.forEach(function(b){c=document.createElement('div'),c.innerHTML='<a href><span></span><span></span></a>',a=c.querySelector('a'),t=c.querySelector('span:first-child'),d=c.querySelector('span:nth-child(2)'),a.href=b.href,t.textContent=b.title,d.textContent=b.description,suggestions.appendChild(c)});f.length>i;)suggestions.removeChild(f[h])}function f(){while(suggestions.lastChild)suggestions.removeChild(suggestions.lastChild);return!1}})() |