{"id":24536233,"url":"https://github.com/easydevv/astro-shiki-transformers","last_synced_at":"2026-05-10T10:23:37.303Z","repository":{"id":251826637,"uuid":"838562653","full_name":"EasyDevv/astro-shiki-transformers","owner":"EasyDevv","description":"An example of using the advanced codeblock theme with shiki-transformers in the Astro framework.","archived":false,"fork":false,"pushed_at":"2024-08-05T23:21:01.000Z","size":96,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T13:52:50.092Z","etag":null,"topics":["astro","astrojs","framework","javascript","shiki","shiki-transformers","ssg","static-site-generator","template"],"latest_commit_sha":null,"homepage":"https://stackblitz.com/edit/astro-shiki-transformers","language":"CSS","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/EasyDevv.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":"2024-08-05T22:49:39.000Z","updated_at":"2025-01-13T11:37:25.000Z","dependencies_parsed_at":"2024-08-07T08:46:52.263Z","dependency_job_id":null,"html_url":"https://github.com/EasyDevv/astro-shiki-transformers","commit_stats":null,"previous_names":["easydevv/astro-rehype-shiki-transformers"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyDevv%2Fastro-shiki-transformers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyDevv%2Fastro-shiki-transformers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyDevv%2Fastro-shiki-transformers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EasyDevv%2Fastro-shiki-transformers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EasyDevv","download_url":"https://codeload.github.com/EasyDevv/astro-shiki-transformers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809889,"owners_count":20351407,"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":["astro","astrojs","framework","javascript","shiki","shiki-transformers","ssg","static-site-generator","template"],"created_at":"2025-01-22T13:52:35.910Z","updated_at":"2026-05-10T10:23:32.279Z","avatar_url":"https://github.com/EasyDevv.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Astro with @shikijs/transformers\n\nThis project is based on the Astro framework and uses @shikijs/transformers for advanced code highlighting and formatting.\n\n## Tech Stack\n\n- [Astro.js](https://astro.build/)\n- [@shikijs/transformers](https://shiki.style/guide/transformers)\n\n## Project Overview\n\nThis project combines Astro's powerful static site generation capabilities with Shiki's advanced code highlighting features. By adding @shikijs/transformers, you can create richer and more interactive code blocks compared to plain Shiki.\n\n## Quick Start\n\nYou can run this project directly in your browser without any local setup:\n\n[Run on StackBlitz](https://stackblitz.com/edit/astro-shiki-transformers)\n\nThis StackBlitz link allows you to instantly explore and experiment with the project in a live development environment.\n\n## Key Features\n\nUsing @shikijs/transformers, you can leverage advanced code representation features such as:\n\n- **Diff Highlighting**: Visually display code changes\n- **Line Highlighting**: Emphasize specific code lines\n- **Focus**: Draw attention to important parts of the code\n\nThese features make code examples clearer and easier to understand.\n\n## Local Installation\n\nIf you prefer to run the project locally:\n\n1. Clone this repository:\n\n   ```bash\n   git clone https://github.com/EasyDevv/astro-shiki-transformers.git\n   ```\n\n2. Navigate to the project directory:\n\n   ```bash\n   cd astro-shiki-transformers\n   ```\n\n3. Install dependencies:\n   ```bash\n   npm install\n   ```\n\n## Usage\n\n1. Run the development server:\n\n   ```bash\n   npm run dev\n   ```\n\n2. Open `http://localhost:4321` in your browser to view the project.\n\n## Shiki Transformers Configuration and Usage Examples\n\nShiki Transformers are configured in the `astro.config.mjs` file. Here's an example of setting up some useful transformers:\n\n```js\nimport { defineConfig } from 'astro/config';\nimport {\n  transformerNotationDiff,\n  transformerNotationHighlight,\n  transformerNotationWordHighlight,\n  transformerNotationFocus,\n  transformerNotationErrorLevel,\n  transformerMetaHighlight,\n  transformerMetaWordHighlight,\n  transformerRenderWhitespace,\n} from '@shikijs/transformers';\n\nexport default defineConfig({\n  markdown: {\n    syntaxHighlight: 'shiki',\n    shikiConfig: {\n      theme: 'github-dark',\n      transformers: [\n        transformerNotationDiff(),\n        transformerNotationHighlight(),\n        transformerNotationWordHighlight(),\n        transformerNotationFocus(),\n        transformerNotationErrorLevel(),\n        transformerMetaHighlight(),\n        transformerMetaWordHighlight(),\n        transformerRenderWhitespace(),\n      ],\n    },\n  },\n});\n```\n\nAfter this configuration, you can use it in your markdown files like this:\n\n````markdown\n```ts\nconsole.log('hewwo') // [!code --]\nconsole.log('hello') // [!code ++]\nconsole.log('goodbye')\n```\n````\n\n## License\n\nThis project is distributed under the MIT License. See the `LICENSE` file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasydevv%2Fastro-shiki-transformers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasydevv%2Fastro-shiki-transformers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasydevv%2Fastro-shiki-transformers/lists"}