{"id":15015746,"url":"https://github.com/ignacemaes/ember-showdown-shiki","last_synced_at":"2026-05-13T21:35:06.100Z","repository":{"id":217568556,"uuid":"744202687","full_name":"IgnaceMaes/ember-showdown-shiki","owner":"IgnaceMaes","description":"Adds Shiki syntax highlighting for showdown-based markdown code blocks.","archived":false,"fork":false,"pushed_at":"2024-06-29T14:37:48.000Z","size":545,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-21T07:35:10.035Z","etag":null,"topics":["ember","shiki","showdown"],"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/IgnaceMaes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2024-01-16T20:26:23.000Z","updated_at":"2025-02-19T19:29:15.000Z","dependencies_parsed_at":"2024-06-26T17:10:27.066Z","dependency_job_id":"757414ba-cbdf-4253-ab32-b085d22b35f9","html_url":"https://github.com/IgnaceMaes/ember-showdown-shiki","commit_stats":{"total_commits":109,"total_committers":4,"mean_commits":27.25,"dds":0.4678899082568807,"last_synced_commit":"373a048a77631b48c9ef24d864a27826f9f81b5c"},"previous_names":["ignacemaes/ember-showdown-shikiji","ignacemaes/ember-showdown-shiki"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgnaceMaes%2Fember-showdown-shiki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgnaceMaes%2Fember-showdown-shiki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgnaceMaes%2Fember-showdown-shiki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IgnaceMaes%2Fember-showdown-shiki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IgnaceMaes","download_url":"https://codeload.github.com/IgnaceMaes/ember-showdown-shiki/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240409174,"owners_count":19796789,"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":["ember","shiki","showdown"],"created_at":"2024-09-24T19:47:52.467Z","updated_at":"2026-03-02T06:04:08.119Z","avatar_url":"https://github.com/IgnaceMaes.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-showdown-shiki\n\nember-showdown-shiki is a drop-in addon that automatically adds [Shiki](https://github.com/shikijs/shiki) syntax highlighting to code blocks if you are using [showdown](https://github.com/showdownjs/showdown) to render your Markdown.\n\nThis addon also provides filename wrappers to the code block if a code block is marked with a `data-filename` attribute:\n\n```markdown\n````gjs {data-filename=app/components/blog-post.gjs}\n\u003ctemplate\u003e\n  \u003ch1\u003e{{@model.title}}\u003c/h1\u003e\n  \u003ch2\u003eby {{@model.author}}\u003c/h2\u003e\n\n  \u003cdiv class=\"intro\"\u003e\n    {{@model.intro}}\n  \u003c/div\u003e\n  \u003chr\u003e\n  \u003cdiv class=\"body\"\u003e\n    {{@model.body}}\n  \u003c/div\u003e\n\u003c/template\u003e\n``` \n```\n\nYou will also notice that the code sample has line numbers, this is built-in behaviour and they will be added to all code blocks.\n\nThis is also specifically designed to work in Node environments so that it can run effectively in Fastboot and prember 🎉 and as it is a drop-in addon it will automatically start working if added to any Empress projects, so it can be used to add syntax highlighting to your empress-blog if your template doesn't already provide syntax highlighting.\n\nThis addon is inspired by the great work of [ember-showdown-prism](https://github.com/empress/ember-showdown-prism).\n\n\n## Compatibility\n\n- Ember.js v4.8 or above\n- Embroider or ember-auto-import v2\n- Fastboot v4 or above\n- Prember v2 or above\n- Ember-cli-showdown v7 or above\n\n## Installation\n\n```\nember install ember-showdown-shiki\n```\n\n## Usage\n\nWhen running this addon in Fastboot you have to configure the environment to make the globals used by Shiki available. To do this, create a `config/fastboot.js` with the following contents:\n\n```js\nmodule.exports = function () {\n  return {\n    buildSandboxGlobals(defaultGlobals) {\n      return Object.assign({}, defaultGlobals, {\n        atob: atob,\n      });\n    },\n  };\n};\n```\n\n### Configuration\n\nIn `config/environment.js` you can configure the following options:\n\n```js\nmodule.exports = function (environment) {\n  const ENV = {\n    // Other options ...\n    'ember-showdown-shiki': {\n      theme: 'github-dark', // The theme to use for highlighting\n      languages: ['javascript', 'handlebars'], // The languages to highlight\n      colorReplacements: {\n        '#24292e': '#1c1e24',\n      }, // A map of colors to replace in the theme (see https://shiki.style/guide/theme-colors#color-replacements)\n    },\n  };\n  return ENV;\n};\n```\n\nBy default the theme used is `github-dark` and all languages are loaded.\n\n## Contributing\n\nSee the [Contributing](CONTRIBUTING.md) guide for details.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fignacemaes%2Fember-showdown-shiki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fignacemaes%2Fember-showdown-shiki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fignacemaes%2Fember-showdown-shiki/lists"}