{"id":16432679,"url":"https://github.com/2nthony/docute-demo-code","last_synced_at":"2026-03-01T16:31:13.509Z","repository":{"id":46081427,"uuid":"178687842","full_name":"2nthony/docute-demo-code","owner":"2nthony","description":"🔥Live code block for Docute","archived":false,"fork":false,"pushed_at":"2023-12-15T11:37:33.000Z","size":549,"stargazers_count":15,"open_issues_count":9,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-30T12:38:52.275Z","etag":null,"topics":["demo","document","documentation","docute","plugin","vue"],"latest_commit_sha":null,"homepage":"https://docute-demo-code.now.sh","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/2nthony.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,"zenodo":null},"funding":{"github":"2nthony","patreon":null,"open_collective":null,"ko_fi":"2nthony","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.paypal.com/paypalme/evillt"]}},"created_at":"2019-03-31T12:54:01.000Z","updated_at":"2024-05-20T11:10:32.000Z","dependencies_parsed_at":"2025-06-30T14:08:45.098Z","dependency_job_id":"ab916da6-e3e8-484d-b511-6926ee9c2ac5","html_url":"https://github.com/2nthony/docute-demo-code","commit_stats":null,"previous_names":["evillt/docute-demo-code"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/2nthony/docute-demo-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2nthony%2Fdocute-demo-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2nthony%2Fdocute-demo-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2nthony%2Fdocute-demo-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2nthony%2Fdocute-demo-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2nthony","download_url":"https://codeload.github.com/2nthony/docute-demo-code/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2nthony%2Fdocute-demo-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29974745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:18:32.386Z","status":"ssl_error","status_checked_at":"2026-03-01T16:18:04.258Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["demo","document","documentation","docute","plugin","vue"],"created_at":"2024-10-11T08:44:06.041Z","updated_at":"2026-03-01T16:31:13.465Z","avatar_url":"https://github.com/2nthony.png","language":"TypeScript","funding_links":["https://github.com/sponsors/2nthony","https://ko-fi.com/2nthony","https://www.paypal.com/paypalme/evillt","https://patreon.com/evillt"],"categories":[],"sub_categories":[],"readme":"# docute-demo-code\n\n\u003e 🔥Live code block for Docute\n\nPlease consider starring the project to show your ❤️ and support.\n\n\u003e Only support Vue SFC string!  \n\u003e For others you might want to try [docute-run-code](https://github.com/egoist/docute-plugins/tree/master/packages/run-code)\n\n[![NPM version](https://badgen.net/npm/v/docute-demo-code?icon=npm)](https://npmjs.com/package/docute-demo-code)\n[![NPM download](https://badgen.net/npm/dm/docute-demo-code?icon=npm)](https://npmjs.com/package/docute-demo-code)\n[![CircleCI](https://badgen.net/circleci/github/evillt/docute-demo-code?icon=circleci)](https://circleci.com/gh/evillt/docute-demo-code/tree/master)\n[![](https://badgen.net/jsdelivr/hits/npm/docute-demo-code)](https://www.jsdelivr.com/package/npm/docute-demo-code)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![License](https://badgen.net/npm/license/docute-demo-code)](./LICENSE)\n[![$donate](https://badgen.net/badge/suport%20me/donate/f2a)](https://patreon.com/evillt)\n\n### 🤗Checkout the [live demo](https://docute-demo-code.now.sh)\n\n## Usage\n\nFirst load this plugin via `\u003cscript\u003e` tag:\n\n```html\n\u003c!-- Load this plugin after docute.js --\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/docute-demo-code\"\u003e\u003c/script\u003e\n```\n\nThis plugin exposed as `window.docuteDemoCode`\n\n```js\nnew Docute({\n  ...\n  plugins: [\n    docuteDemoCode()\n  ]\n})\n```\n\nThen, you can write a demo code block with live demo in `.md` file:  \n(Don't forget to specify the code language to `html` or `vue`)\n\n    # Introduction\n\n    \u003e Showcase for demo code\n\n    :::demo\n    ```html\n    \u003ctemplate\u003e\n      \u003cdiv\u003e{{ msg }}\u003c/div\u003e\n    \u003c/template\u003e\n\n    \u003cscript\u003e\n    export default {\n      data() {\n        return {\n          msg: 'Hi, 😋'\n        }\n      }\n    }\n    \u003c/script\u003e\n    ```\n    :::\n\nSimilar to vuepress custom container huh?\n\n## Use With Bundlers\n\n```console\nyarn add docute-demo-code --dev\n```\n\n### Webpack\n\nIn your entry file:\n\n```js\nimport Docute from 'docute'\nimport docuteDemoCode from 'docute-demo-code'\n\nnew Docute({\n  ...\n  plugins: [\n    docuteDemoCode()\n  ]\n})\n```\n\n## API\n\n`docuteDemoCode(options: Options)`\n\n### showBorder\n\n- Type: `boolean`\n- Default: `true`\n\nUse docute style to wrap living demo block\n\n## Relate\n\n- [docute-custom-container](https://github.com/evillt/docute-custom-container)\n\n## 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. Submit a pull request :D\n\n## Author\n\n**docute-demo-code** © [evillt](https://github.com/evillt), Released under the [MIT](./LICENSE) License.\n\nAuthored and maintained by **EVILLT** with help from contributors ([list](https://github.com/evillt/docute-demo-code/contributors)).\n\n\u003e [evila.me](https://evila.me) · GitHub [@evillt](https://github.com/evillt) · Twitter [@evillt](https://twitter.com/evillt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2nthony%2Fdocute-demo-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2nthony%2Fdocute-demo-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2nthony%2Fdocute-demo-code/lists"}