{"id":13903028,"url":"https://github.com/f3rno/serve-markdown-it","last_synced_at":"2025-09-21T17:30:25.774Z","repository":{"id":43335542,"uuid":"275454966","full_name":"f3rno/serve-markdown-it","owner":"f3rno","description":"Configurable static file server with markdown-it for parsing Markdown","archived":false,"fork":false,"pushed_at":"2025-09-01T03:59:58.000Z","size":1090,"stargazers_count":3,"open_issues_count":29,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-01T05:57:10.339Z","etag":null,"topics":["cli","configurable","devtool","markdown-it","nodejs","static-site-generator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f3rno.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-06-27T21:19:44.000Z","updated_at":"2024-01-27T09:57:48.000Z","dependencies_parsed_at":"2023-02-05T21:46:23.408Z","dependency_job_id":"877c5322-4168-4ca4-b9a8-5e650ac67f21","html_url":"https://github.com/f3rno/serve-markdown-it","commit_stats":{"total_commits":30,"total_committers":2,"mean_commits":15.0,"dds":"0.033333333333333326","last_synced_commit":"64ae96637254fea40fca7ddd9024a1ddbd8d4e70"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/f3rno/serve-markdown-it","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f3rno%2Fserve-markdown-it","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f3rno%2Fserve-markdown-it/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f3rno%2Fserve-markdown-it/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f3rno%2Fserve-markdown-it/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f3rno","download_url":"https://codeload.github.com/f3rno/serve-markdown-it/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f3rno%2Fserve-markdown-it/sbom","scorecard":{"id":113348,"data":{"date":"2025-08-11","repo":{"name":"github.com/f3rno/serve-markdown-it","commit":"64ae96637254fea40fca7ddd9024a1ddbd8d4e70"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"86 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-257v-vj4p-3w2h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-vfrc-7r7c-w9mx","Warn: Project is vulnerable to: GHSA-7wwv-vh3v-89cq","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-pfq8-rq6v-vf5m","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q","Warn: Project is vulnerable to: GHSA-593f-38f6-jp5m","Warn: Project is vulnerable to: GHSA-x2rg-q646-7m2v","Warn: Project is vulnerable to: GHSA-jgmv-j7ww-jx2x","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-6vfc-qv3f-vr6c","Warn: Project is vulnerable to: GHSA-f246-xrrj-g8j6","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-4xcv-9jjx-gfj3","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-93f3-23rq-pjfp","Warn: Project is vulnerable to: GHSA-pw54-mh39-w3hc","Warn: Project is vulnerable to: GHSA-xgh6-85xh-479p","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-x77j-w7wf-fjmw","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx","Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch","Warn: Project is vulnerable to: GHSA-hxcc-f52p-wc94","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq","Warn: Project is vulnerable to: GHSA-7xcx-6wjh-7xp2","Warn: Project is vulnerable to: GHSA-mxhp-79qh-mcx6","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc","Warn: Project is vulnerable to: GHSA-h6q6-9hqw-rwfv","Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q","Warn: Project is vulnerable to: GHSA-crh6-fp67-6883","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T17:45:36.247Z","repository_id":43335542,"created_at":"2025-08-15T17:45:36.248Z","updated_at":"2025-08-15T17:45:36.248Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276274425,"owners_count":25614410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-21T02:00:07.055Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","configurable","devtool","markdown-it","nodejs","static-site-generator"],"created_at":"2024-08-06T22:01:34.205Z","updated_at":"2025-09-21T17:30:25.719Z","avatar_url":"https://github.com/f3rno.png","language":"JavaScript","funding_links":[],"categories":["cli"],"sub_categories":[],"readme":"# serve-markdown-it - sermit\n\n[![NPM Version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Downloads Stats][npm-downloads]][npm-url]\n\nConfigurable static file server with markdown-it for parsing Markdown.\n\n\u003e README \u0026 DOCS TODO\n\n### [Installation](#installation)\n![npm badge](https://nodei.co/npm/serve-markdown-it.png?downloads=true\u0026downloadRank=true\u0026stars=true)\n\n```bash\nyarn global add serve-markdown-it\n```\n\n### [Developing](#developing)\n\n```bash\nyarn gen-readme // update README.md\nyarn docs // update DOCUMENTATION.md\nyarn test // lint \u0026 mocha\nyarn update-deps // bump all deps\n```\n\n### [Release History](#release_history)\n\nSee *[CHANGELOG.md](CHANGELOG.md)* for more information.\n\n### [License](#license)\n\nDistributed under the **MIT** license. See [LICENSE.md](LICENSE.md) for more information.\n\n### [Contributing](#contributing)\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n---\n\n## [API Reference](#api_reference)\n\n\u003e The standalone JSDoc reference can be found in [DOCUMENTATION.md](DOCUMENTATION.md)\n\n## Modules\n\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#module_serve-markdown-it\"\u003eserve-markdown-it\u003c/a\u003e\u003c/dt\u003e\n\u003cdd\u003e\u003ch1 id=\"sermit---serve-markdown-it\"\u003esermit - \u003ccode\u003eserve-markdown-it\u003c/code\u003e.\u003c/h1\u003e\n\u003cp\u003eDescription TODO.\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eConfigurable static file server with markdown-it for parsing Markdown.\u003c/p\u003e\n\u003c/blockquote\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\n## Functions\n\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#getConfig\"\u003egetConfig(params)\u003c/a\u003e ⇒ \u003ccode\u003ePromise\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eResolve the runtime configuration, loading the first user config file found.\nSearches directories up the path for any of the following files:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ccode\u003e.sermitrc\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e.sermitrc.js\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e.sermitrc.json\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e.sermitrc.yaml\u003c/code\u003e\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e.sermitrc.yml\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eAny discovered user config file is merged with the default\n\u003ca href=\"#Sermit..DefaultConfig\"\u003eDefaultConfig\u003c/a\u003e object.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003ca href=\"#mergeConfig\"\u003emergeConfig(params)\u003c/a\u003e ⇒ \u003ccode\u003ePromise\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eOverrides the default configuration with a user config object. Deep options\nare replaced, shallow ones merged (i.e. \u003ccode\u003emarkdown-it\u003c/code\u003e constructor defaults).\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003ca href=\"#createServer\"\u003ecreateServer(params)\u003c/a\u003e ⇒ \u003ccode\u003ePromise\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eStarts an HTTP server on the configured port, and serves static files out of\nthe specified \u003ccode\u003ebasePath\u003c/code\u003e. If the \u003ccode\u003ebasePath\u003c/code\u003e is a file, only that file will\nbe rendered, excluding any resolved assets.\u003c/p\u003e\n\u003cp\u003eFiles provided by the configured template are rendered from disk. Any URLs\nending in \u003ccode\u003e/raw\u003c/code\u003e have the suffix removed and cause any matching file in\n\u003ccode\u003ebasePath\u003c/code\u003e to be rendered like an asset. This allows file contents to be\nrendered with a link to the file itself.\u003c/p\u003e\n\u003cp\u003eIf a URL is not an asset or raw file, it is checked against the\n\u003ccode\u003ematchMarkdownFileNames\u003c/code\u003e regex on the provided \u003ca href=\"Config\"\u003eConfig\u003c/a\u003e object. Files\nthat match are passed through \u003ccode\u003emarkdown-it\u003c/code\u003e.\u003c/p\u003e\n\u003cp\u003eAny remaining URLs are assumed to map to the \u003ccode\u003ebasePath\u003c/code\u003e; if they are files,\nthey are rendered as source within markdown code fences. Directories trigger\nthe file explorer if allowed by the configuration.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\n\u003ca name=\"module_serve-markdown-it\"\u003e\u003c/a\u003e\n\n## serve-markdown-it\n# sermit - `serve-markdown-it`.\n\nDescription TODO.\n\n\u003e Configurable static file server with markdown-it for parsing Markdown.\n\n**License**: MIT  \n**Example** *(sermit help)*  \n```js\nsermit [path] [options]\n\nServe local files\n\nCommands:\n  sermit print-config            Log the merged configuration to the console\n  sermit gen-config              Generate a new configuration file\n  sermit render                  Render local files to static HTML\n  sermit serve [path] [options]  Serve local files                     [default]\n\nOptions:\n  --log-level, -l  Log level, increase to debug\n         [string] [choices: 'error', 'info', 'warn', 'debug'] [default: 'error']\n  --path, -p       Root directory\n    [string] [required] [default: '/home/user/code/personal/serve-markdown-it']\n  --help           Show help                                           [boolean]\n  --version        Show version number                                 [boolean]\n  --port           Port number to spawn HTTP server on\n                                             [number] [required] [default: 8960]\n\nExamples:\n  sermit gen-config \u003e .sermitrc.json  Generate basic configuration\n```\n**Example** *(sermit)*  \n```js\n[cli] › ★  star      read config from /.sermitrc.json\n[cli] › ★  star      using template default\n[cli] › ★  star      using md plugin markdown-it-smartarrows\n[cli] › ★  star      using md plugin markdown-it-anchor\n[cli] › ★  star      using md plugin markdown-it-highlightjs\n[cli] › ★  star      serving content from /home/user/code/personal/serve-markdown-it\n[cli] › ★  star      listening at http://localhost:8960\n```\n**Example** *(sermit gen-config \u0026gt; .sermitrc.json)*  \n```js\n{\n  minify: true,\n  excludeGitIgnore: true,\n  template: {\n    name: 'serve-markdown-it-template-default',\n    config: {\n      maxWidth: '960px',\n      sections: {\n        contentHeader: true,\n        settings: true,\n        debug: true,\n        content: true,\n        order: [\n          'settings',\n          'content',\n          'debug'\n        ]\n      },\n      explorer: {\n        icons: true,\n        columns: [\n          'name',\n          'user',\n          'group',\n          'mode',\n          'type',\n          'size'\n        ],\n        dataTable: {\n          searchable: true,\n          sortable: true,\n          perPage: 25,\n          perPageSelect: [\n            10,\n            25,\n            50,\n            100\n          ],\n          fixedHeight: false,\n          layout: {\n            top: '{select}{search}',\n            bottom: '{pager}'\n          }\n        }\n      },\n      headerBar: false,\n      settingsBar: false,\n      dataTable: false\n    }\n  },\n  md: {\n    typographer: true,\n    linkify: true,\n    html: true,\n    plugins: [\n      {\n        name: 'markdown-it-smartarrows',\n        init: 'after',\n        config: {\n          auto: true,\n          code: true\n        }\n      },\n      {\n        name: 'markdown-it-anchor',\n        config: {\n          permalink: true,\n          permalinkBefore: true,\n          permalinkSymbol: '§'\n        },\n        init: 'after'\n      },\n      {\n        name: 'markdown-it-highlightjs',\n        config: {\n          auto: true,\n          code: true\n        },\n        init: 'after'\n      }\n    ]\n  }\n}\n```\n\u003ca name=\"getConfig\"\u003e\u003c/a\u003e\n\n## getConfig(params) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nResolve the runtime configuration, loading the first user config file found.\nSearches directories up the path for any of the following files:\n\n- `.sermitrc`\n- `.sermitrc.js`\n- `.sermitrc.json`\n- `.sermitrc.yaml`\n- `.sermitrc.yml`\n\nAny discovered user config file is merged with the default\n[DefaultConfig](#Sermit..DefaultConfig) object.\n\n**Kind**: global function  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - p - resolves with the final [Config](Config) object.  \n**Todo**\n\n- [ ] consider including `basePath` in search\n\n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| params | \u003ccode\u003eobject\u003c/code\u003e |  | params. |\n| [params.basePath] | \u003ccode\u003estring\u003c/code\u003e | \u003ccode\u003e\u0026quot;cwd\u0026quot;\u003c/code\u003e | path to start searching in. |\n| [params.configPath] | \u003ccode\u003estring\u003c/code\u003e |  | path to pre-loaded user config file,   required if `config` is provided. |\n| [params.config] | \u003ccode\u003eobject\u003c/code\u003e |  | user config file if already found, search   is skipped if provided. |\n\n**Example**  \n```js\nconst config = await getConfig({ basePath: basePath })\nconst { state } = config\nconst { md, configPath, template } = state\n\nif (configPath) {\n  l.star('read config from %s', colors.bgGreen.black(configPath))\n}\n\nif (_isEmpty(command) || command === 'serve' || command === 'render') {\n  l.star('using template %s', colors.cyan(template.name))\n\n  md.pluginNames.forEach((name) =\u003e {\n    l.star('using md plugin %s', colors.yellow(name))\n  })\n}\n```\n\u003ca name=\"mergeConfig\"\u003e\u003c/a\u003e\n\n## mergeConfig(params) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nOverrides the default configuration with a user config object. Deep options\nare replaced, shallow ones merged (i.e. `markdown-it` constructor defaults).\n\n**Kind**: global function  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - p - resolves with final config object.  \n**See**: [getConfig](#getConfig)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| params | \u003ccode\u003eArray\u003c/code\u003e | `[userConfig, userConfigPath, basePath]` |\n\n**Example** *(usage within getConfig)*  \n```js\nconst getConfig = ({ basePath, configPath, config: userConfig }) =\u003e (\n  (userConfig\n    ? Bluebird.resolve({ config: userConfig, filepath: configPath })\n    : EXPLORER.search(basePath))\n    .then(({ config, filepath }) =\u003e [config, filepath, basePath])\n    .catch(() =\u003e [DEFAULT_CONFIG, null, basePath])\n    .then(mergeConfig)\n    .then(normalizeConfig)\n    .then(validateConfig)\n    .then(loadTemplate)\n)\n```\n\u003ca name=\"createServer\"\u003e\u003c/a\u003e\n\n## createServer(params) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nStarts an HTTP server on the configured port, and serves static files out of\nthe specified `basePath`. If the `basePath` is a file, only that file will\nbe rendered, excluding any resolved assets.\n\nFiles provided by the configured template are rendered from disk. Any URLs\nending in `/raw` have the suffix removed and cause any matching file in\n`basePath` to be rendered like an asset. This allows file contents to be\nrendered with a link to the file itself.\n\nIf a URL is not an asset or raw file, it is checked against the\n`matchMarkdownFileNames` regex on the provided [Config](Config) object. Files\nthat match are passed through `markdown-it`.\n\nAny remaining URLs are assumed to map to the `basePath`; if they are files,\nthey are rendered as source within markdown code fences. Directories trigger\nthe file explorer if allowed by the configuration.\n\n**Kind**: global function  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - p - resolves to [koa](https://github.com/koajs/koa) instance.  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| params | \u003ccode\u003eobject\u003c/code\u003e | params. |\n| params.basePath | \u003ccode\u003estring\u003c/code\u003e | absolute path to the root content   directory. |\n| params.config | \u003ccode\u003eConfig\u003c/code\u003e | config data. |\n\n**Example**  \n```js\nconst SERVE_HANDLER = async (argv) =\u003e {\n  const { l, port, config, path } = argv\n  const server = await createServer({ basePath: path, config })\n\n  server.listen(port)\n\n  l.star('serving content from %s', colors.underline(path))\n  l.star(\n    '%s',\n    colors.cyan.underline(\n      `listening at ${colors.bold(`http://localhost:${port}`)}`\n    )\n  )\n}\n```\n\n\n\u003c!-- Markdown link \u0026 img dfn's --\u003e\n[npm-image]: https://img.shields.io/npm/v/serve-markdown-it.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/serve-markdown-it\n[npm-downloads]: https://img.shields.io/npm/dm/serve-markdown-it.svg?style=flat-square\n[travis-image]: https://img.shields.io/travis/f3rno/serve-markdown-it/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/f3rno/serve-markdown-it\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff3rno%2Fserve-markdown-it","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff3rno%2Fserve-markdown-it","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff3rno%2Fserve-markdown-it/lists"}