{"name":"@mdit-vue/plugin-title","version":"3.0.2","description":"A markdown-it plugin to get markdown page title","keywords":["markdown-it","markdown-it-plugin","vue","title"],"homepage":"https://github.com/mdit-vue","bugs":{"url":"https://github.com/mdit-vue/mdit-vue/issues"},"repository":{"type":"git","url":"git+https://github.com/mdit-vue/mdit-vue.git"},"license":"MIT","author":{"name":"meteorlxy","email":"meteor.lxy@foxmail.com"},"type":"module","exports":{".":"./dist/index.js","./package.json":"./package.json"},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsdown","clean":"rimraf ./dist","test":"vitest"},"dependencies":{"@mdit-vue/shared":"3.0.2","@mdit-vue/types":"3.0.2","@types/markdown-it":"^14.1.2","markdown-it":"^14.1.0"},"devDependencies":{"@types/markdown-it-emoji":"^3.0.1","markdown-it-emoji":"^3.0.0","tsdown":"^0.14.1","vitest":"^3.2.4"},"engines":{"node":">=20.0.0"},"publishConfig":{"access":"public"},"gitHead":"3b5332d09fbd927319bd8be3ba3b86b3d12d1ec8","_id":"@mdit-vue/plugin-title@3.0.2","_nodeVersion":"22.17.0","_npmVersion":"lerna/4.7.0/node@v22.17.0+arm64 (darwin)","dist":{"integrity":"sha512-KTDP7s68eKTwy4iYp5UauQuVJf+tDMdJZMO6K4feWYS8TX95ItmcxyX7RprfBWLTUwNXBYOifsL6CkIGlWcNjA==","shasum":"265f942794466105a680a327c69503e43e34630d","tarball":"http://registry-npm.ywwl.com/@mdit-vue/plugin-title/download/@mdit-vue/plugin-title-3.0.2.tgz","fileCount":5,"unpackedSize":4222,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFKG7IZ3ibZu1C6+K9BE+P7t3HFjvbXqea1stBoS2oEjAiAYQooLJ2t4YTVA0SVZyn/Mwk18h5s/MW7f+sjQEpkwLw=="}],"size":2117,"noattachment":false,"key":"/@mdit-vue/plugin-title/-/@mdit-vue/plugin-title-3.0.2.tgz"},"_npmUser":{"name":"meteorlxy","email":"meteor.lxy@foxmail.com"},"directories":{},"maintainers":[{"name":"meteorlxy","email":"meteor.lxy@foxmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/plugin-title_3.0.2_1754927615342_0.5617502893310169"},"_hasShrinkwrap":false,"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":1754927615580,"_cnpm_publish_time":1754927615580,"dist-tags":{"latest":"4.0.0"}}