{"name":"@mdit-vue/plugin-title","version":"2.1.4","keywords":["markdown-it","markdown-it-plugin","vue","title"],"author":"meteorlxy <meteor.lxy@foxmail.com>","license":"MIT","_id":"@mdit-vue/plugin-title@2.1.4","maintainers":[{"name":"meteorlxy","email":"meteor.lxy@foxmail.com"}],"homepage":"https://github.com/mdit-vue","bugs":{"url":"https://github.com/mdit-vue/mdit-vue/issues"},"dist":{"shasum":"e37f5123b664b4b15aa03adc6c89f1354d9f3cf4","tarball":"http://registry-npm.ywwl.com/@mdit-vue/plugin-title/download/@mdit-vue/plugin-title-2.1.4.tgz","fileCount":8,"integrity":"sha512-uuF24gJvvLVIWG/VBtCDRqMndfd5JzOXoBoHPdKKLk3PA4P84dsB0u0NnnBUEl/YBOumdCotasn7OfFMmco9uQ==","signatures":[{"sig":"MEUCIG2w9HsXfiM1xWRUGH6PT88x886pY3JX5ZetuDLO4v6OAiEAqu9uPzxZC+BjsVIuf/CBugBHOk1tIil/JhLOEOsjFJM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5348,"size":2166,"noattachment":false,"key":"/@mdit-vue/plugin-title/-/@mdit-vue/plugin-title-2.1.4.tgz"},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"01a6daa37fff48ea3992becfd4ba8c0f97a605ad","scripts":{"test":"vitest","build":"unbuild"},"_npmUser":{"name":"meteorlxy","email":"meteor.lxy@foxmail.com"},"repository":{"url":"git+https://github.com/mdit-vue/mdit-vue.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v20.12.2+arm64 (darwin)","description":"A markdown-it plugin to get markdown page title","directories":{},"_nodeVersion":"20.12.2","dependencies":{"markdown-it":"^14.1.0","@mdit-vue/types":"2.1.4","@mdit-vue/shared":"2.1.4","@types/markdown-it":"^14.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"markdown-it-emoji":"^3.0.0","@types/markdown-it-emoji":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/plugin-title_2.1.4_1744265851091_0.9935602431352462","host":"s3://npm-registry-packages-npm-production"},"readme":"# @mdit-vue/plugin-title\n\n[![npm](https://badgen.net/npm/v/@mdit-vue/plugin-title)](https://www.npmjs.com/package/@mdit-vue/plugin-title)\n[![license](https://badgen.net/github/license/mdit-vue/mdit-vue)](https://github.com/mdit-vue/mdit-vue/blob/main/LICENSE)\n\nA [markdown-it](https://github.com/markdown-it/markdown-it) plugin to get page title.\n\n- Extracts title (the content of the first level-1 heading) into markdown-it `env.title`.\n\n## Install\n\n```sh\nnpm i @mdit-vue/plugin-title\n```\n\n## Usage\n\n```ts\nimport { titlePlugin } from '@mdit-vue/plugin-title';\nimport type { MarkdownItEnv } from '@mdit-vue/types';\nimport MarkdownIt from 'markdown-it';\n\nconst md = MarkdownIt({ html: true }).use(titlePlugin);\nconst env: MarkdownItEnv = {};\n\nconst rendered = md.render(\n  `\\\n# h1\n## h2\n### h3\n`,\n  env,\n);\n\nconsole.log(env.title);\n```\n","publish_time":1744265851321,"_cnpm_publish_time":1744265851321,"dist-tags":{"latest":"4.0.0"}}