Skip to content

A text marking & annotation engine for presenting source code on the web.

License

Notifications You must be signed in to change notification settings

moatkon/expressive-code

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expressive Code

Expressive Code is an engine for presenting source code on the web, aiming to make your code easy to understand and visually stunning.

On top of accurate syntax highlighting powered by the same engine as VS Code, Expressive Code allows you to annotate code blocks using text markers, diff highlighting, code editor & terminal window frames, and more.

All annotations are based on a powerful plugin architecture that allows you to extend the functionality of Expressive Code with your own custom annotations.

Expressive Code doesn't depend on any client-side framework, is built with performance in mind and designed to be as lightweight as possible.

No matter if you’re writing a blog, guide, or a full documentation website, Expressive Code will help you make your code examples stand out.

Packages

Expressive Code is split into multiple packages, allowing you to include only the functionality you need for your site. Click on any of the packages below to learn more about them:

High-level integration packages

You will most likely want to install one of these packages to get started with Expressive Code. Pick the one that matches your site's setup:

  • remark-expressive-code NPM version - A remark plugin that processes all code blocks in markdown and MDX files with Expressive Code.
  • astro-expressive-code NPM version - An Astro integration to automatically render code blocks in any markdown / MDX content on your site with Expressive Code.

Default plugins

These plugins are automatically installed by the high-level integration packages above. You normally don't need to install them manually.

Additional plugins

These plugins provide more features that may be useful for your site. You can install them manually if you need them:

  • @expressive-code/plugin-collapsible-sections - Allows marking code sections as collapsed. The lines in collapsed sections will be hidden by default, replaced by a "X collapsed lines" line. When clicked, the collapsed section will be expanded, showing the previously hidden lines.

Low-level packages for integration authors

These packages are used by the high-level integration packages. You normally don't need to install them directly.

In advanced use cases, e.g. if you want to develop your own integration into a framework that is not supported by Expressive Code yet, you can use these packages to get started:

  • expressive-code NPM version - This bundle package provides convenient access to the Expressive Code core engine and all default plugins.
  • @expressive-code/core - The core engine that powers Expressive Code.

Installation, Configuration & Usage

You will most likely want to install one of our high-level integrations, depending on your site's setup.

Please have a look at the documentation of those packages for more information:

Contributing

We welcome all contributions! Please read our contributing guide to learn about our development process and how to propose bugfixes and improvements.

About

A text marking & annotation engine for presenting source code on the web.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.5%
  • Other 0.5%