{"id":18263149,"url":"https://github.com/vanillawc/wc-markdown","last_synced_at":"2025-04-04T20:31:05.245Z","repository":{"id":101920821,"uuid":"171637103","full_name":"vanillawc/wc-markdown","owner":"vanillawc","description":"A vanilla Markdown Web Component with optional syntax highlighting support","archived":false,"fork":false,"pushed_at":"2021-11-11T20:03:24.000Z","size":800,"stargazers_count":65,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T12:32:37.414Z","etag":null,"topics":["markdown","syntax-highlighting","vanilla","web-components"],"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/vanillawc.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":"2019-02-20T08:59:34.000Z","updated_at":"2025-02-06T10:09:03.000Z","dependencies_parsed_at":"2023-05-19T03:30:57.945Z","dependency_job_id":null,"html_url":"https://github.com/vanillawc/wc-markdown","commit_stats":null,"previous_names":["evanplaice/wc-markdown"],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanillawc%2Fwc-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanillawc%2Fwc-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanillawc%2Fwc-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanillawc%2Fwc-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanillawc","download_url":"https://codeload.github.com/vanillawc/wc-markdown/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247246261,"owners_count":20907758,"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":["markdown","syntax-highlighting","vanilla","web-components"],"created_at":"2024-11-05T11:09:58.579Z","updated_at":"2025-04-04T20:31:03.594Z","avatar_url":"https://github.com/vanillawc.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\u0026lt;wc-markdown\u0026gt; Markdown with Syntax Highlighing\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/vanillawc/wc-markdown/releases\"\u003e\u003cimg src=\"https://badgen.net/github/tag/vanillawc/wc-markdown\" alt=\"GitHub Releases\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@vanillawc/wc-markdown\"\u003e\u003cimg src=\"https://badgen.net/npm/v/@vanillawc/wc-markdown\" alt=\"NPM Releases\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://bundlephobia.com/result?p=@vanillawc/wc-markdown\"\u003e\u003cimg src=\"https://badgen.net/bundlephobia/minzip/@vanillawc/wc-markdown\" alt=\"Bundlephobia\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/vanillawc/wc-markdown/actions\"\u003e\u003cimg src=\"https://github.com/vanillawc/wc-markdown/workflows/Latest/badge.svg\" alt=\"Latest Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/vanillawc/wc-markdown/actions\"\u003e\u003cimg src=\"https://github.com/vanillawc/wc-markdown/workflows/Release/badge.svg\" alt=\"Release Status\"\u003e\u003c/a\u003e\n\n  \u003ca href=\"https://discord.gg/aSWYgtybzV\"\u003e\u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/723296249121603604?color=%23738ADB\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.webcomponents.org/element/@vanillawc/wc-markdown\"\u003e\u003cimg src=\"https://img.shields.io/badge/webcomponents.org-published-blue.svg\" alt=\"Published on WebComponents.org\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Setup\n\n*Install and import from [NPM](https://www.npmjs.com/package/@vanillawc/wc-markdown)*\n\n```sh\nnpm i @vanillawc/wc-markdown\n```\n\n```html\n\u003cscript type=\"module\" src=\"[node_modules]/@vanillawc/wc-markdown/index.js\"\u003e\u003c/script\u003e\n```\n\n*Import from [SkyPack CDN](https://www.skypack.dev/view/@vanillawc/wc-markdown)*\n\n```html\n\u003cscript type=\"module\" src=\"https://cdn.skypack.dev/@vanillawc/wc-markdown\"\u003e\u003c/script\u003e\n```\n\n## Demo\n\nTry it on [WebComponents.dev](https://webcomponents.dev/edit/FxoojbLdYqBJVJj4Tsex?sv=1\u0026pm=1)\n\n## Usage\n\n**Attributes**\n\n- `src` - load an external source file\n- `highlight` - when present, syntax highlighting is applied to code\n\n**Properties**\n\n- `value` - get/set the source code\n\n### External Source\n\n```html\n\u003cwc-markdown src=\"sample.md\"\u003e\u003c/wc-markdown\u003e\n```\n\n### Inline Source\n\n```html\n\u003cwc-markdown\u003e\n  \u003cscript type=\"wc-content\"\u003e\n    ## Inline Markdown\n\n    This some sample markdown.\n  \u003c/script\u003e\n\u003c/wc-markdown\u003e\n```\n*Note: The `\u003c/script\u003e` word cannot be used inside here, you'll have to use the escaped `\u0026lt;/script\u0026gt;` version instead, you may also use `\u0026lt;script\u0026gt;` for the opening `\u003cscript\u003e` tag if you wish to*\n\n### Syntax Highlighting\n\nTo apply syntax highlighting, add the `highlight` attribute.\n\n```html\n\u003cwc-markdown src=\"sample2.md\" highlight\u003e\u003c/wc-markdown\u003e\n```\n\n### Syntax Highlighting - Theming\n\nHighlighting requires the import of a CSS theme. Themes can be found under `themes/`.\n\n```html\n\u003clink rel=\"stylesheet\" href=\"/node_modules/@vanillawc/wc-markdown/themes/prism-okaidia.css\"\u003e\n```\n\n### Syntax Highlighting - Languages\n\nThe PrismJS core includes the following languages `[html, xml, svg, mathml, css, javascript]`.\n\nAdditional language modules can be imported from `components/`.\n\n```html\n\u003cscript type=\"module\" src=\"/node_modules/@vanillawc/wc-markdown/index.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"module\" src=\"/node_modules/@vanillawc/wc-markdown/components/prism-typescript.js\"\u003e\u003c/script\u003e\n```\n\nSome languages extend others. Ex, `C++` extends `C` so both need to be imported in the correct order.\n\n```html\n\u003cscript type=\"module\" src=\"/node_modules/@vanillawc/wc-markdown/index.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"module\" src=\"/node_modules/@vanillawc/wc-markdown/components/prism-c.js\"\u003e\u003c/script\u003e\n\u003cscript type=\"module\" src=\"/node_modules/@vanillawc/wc-markdown/components/prism-cpp.js\"\u003e\u003c/script\u003e\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/vanillawc/vanillawc/blob/main/CONTRIBUTING.md)\n\n## Similar Projects\n\n- [`\u003czero-md\u003e` - Ridiculously simple zero-config markdown displayer](https://github.com/zerodevx/zero-md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanillawc%2Fwc-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanillawc%2Fwc-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanillawc%2Fwc-markdown/lists"}