{"id":15065663,"url":"https://github.com/wobsoriano/unplugin-markdoc","last_synced_at":"2025-10-20T05:57:16.821Z","repository":{"id":65526116,"uuid":"491658374","full_name":"wobsoriano/unplugin-markdoc","owner":"wobsoriano","description":"Markdoc plugin for Vite/Webpack.","archived":false,"fork":false,"pushed_at":"2023-06-06T02:58:56.000Z","size":416,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T12:11:24.825Z","etag":null,"topics":["markdoc","markdown","plugin","react","unplugin","vite","vue","webpack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/wobsoriano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-05-12T20:27:57.000Z","updated_at":"2024-09-06T19:34:17.000Z","dependencies_parsed_at":"2024-10-13T01:22:00.449Z","dependency_job_id":"49eb8850-d5d6-4ecb-acd3-4dd3f36e1ba5","html_url":"https://github.com/wobsoriano/unplugin-markdoc","commit_stats":{"total_commits":64,"total_committers":1,"mean_commits":64.0,"dds":0.0,"last_synced_commit":"e1cfeacc17b538a485fd04322d1f6c16438d0fc7"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Funplugin-markdoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Funplugin-markdoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Funplugin-markdoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wobsoriano%2Funplugin-markdoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wobsoriano","download_url":"https://codeload.github.com/wobsoriano/unplugin-markdoc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248225707,"owners_count":21068078,"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","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":["markdoc","markdown","plugin","react","unplugin","vite","vue","webpack"],"created_at":"2024-09-25T00:44:39.001Z","updated_at":"2025-10-20T05:57:16.712Z","avatar_url":"https://github.com/wobsoriano.png","language":"TypeScript","readme":"# unplugin-markdoc\n\n[Markdoc](https://markdoc.io/) plugin for Vite/Webpack projects.\n\n## Install\n\n```bash\nnpm install @markdoc/markdoc unplugin-markdoc\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eVite\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// vite.config.ts\nimport MarkdocPlugin from 'unplugin-markdoc/vite'\n\nexport default defineConfig({\n  plugins: [\n    MarkdocPlugin({ /* options */ }),\n  ],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRollup\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// rollup.config.js\nimport MarkdocPlugin from 'unplugin-markdoc/rollup'\n\nexport default {\n  plugins: [\n    MarkdocPlugin({ /* options */ }),\n  ],\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\n\u003cdetails\u003e\n\u003csummary\u003eWebpack\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// webpack.config.js\nmodule.exports = {\n  /* ... */\n  plugins: [\n    require('unplugin-markdoc/webpack')({ /* options */ })\n  ]\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eNuxt\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// nuxt.config.js\nexport default {\n  buildModules: [\n    ['unplugin-markdoc/nuxt', { /* options */ }],\n  ],\n}\n```\n\n\u003e This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eVue CLI\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// vue.config.js\nmodule.exports = {\n  configureWebpack: {\n    plugins: [\n      require('unplugin-markdoc/webpack')({ /* options */ }),\n    ],\n  },\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eesbuild\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// esbuild.config.js\nimport { build } from 'esbuild'\nimport MarkdocPlugin from 'unplugin-markdoc/esbuild'\n\nbuild({\n  plugins: [MarkdocPlugin()],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n## Usage\n\n```md\n---\ntitle: What is Markdoc?\n---\n\n# {% $markdoc.frontmatter.title %} {% #overview %}\n\nMarkdoc is a Markdown-based syntax and toolchain for creating custom documentation sites. Stripe created Markdoc to power [our public docs](http://stripe.com/docs).\n\n{% callout type=\"check\" %}\nMarkdoc is open-source—check out its [source](http://github.com/markdoc/markdoc) to see how it works.\n{% /callout %}\n```\n\nExample with Vue\n\n```vue\n\u003cscript setup\u003e\nimport Markdoc from '@markdoc/markdoc'\nimport content from './contents/doc.md'\n\nconst html = Markdoc.renderers.html(content)\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cdiv v-html=\"html\" /\u003e\n\u003c/template\u003e\n```\n\nor to render a html directly...\n\n```vue\n\u003cscript setup\u003e\nimport html from './contents/doc.md?html'\n\u003c/script\u003e\n\n\u003ctemplate\u003e\n  \u003cdiv v-html=\"html\" /\u003e\n\u003c/template\u003e\n```\n\n## Configuration\n\nThe plugin accepts an optional [`Markdoc.transform`](https://markdoc.io/docs/syntax#config) config:\n\n```ts\n// vite.config.ts\nimport MarkdocPlugin from 'unplugin-markdoc/vite'\n\nexport default defineConfig({\n  plugins: [MarkdocPlugin({\n    nodes: {},\n    tags: {},\n  })]\n})\n```\n\n## TypeScript Shim\n\n```ts\ndeclare module '*.md' {\n  import type { RenderableTreeNode } from '@markdoc/markdoc'\n\n  const Node: RenderableTreeNode\n  export default Node\n}\n\ndeclare module '*.md?html' {\n  const html: string\n  export default html\n}\n```\n\nSave as `markdoc.d.ts` for instance.\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwobsoriano%2Funplugin-markdoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwobsoriano%2Funplugin-markdoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwobsoriano%2Funplugin-markdoc/lists"}