An open API service indexing awesome lists of open source software.

https://github.com/wardbrian/quarto-show-code

A shortcode for including highlighted code from another file
https://github.com/wardbrian/quarto-show-code

Last synced: 9 months ago
JSON representation

A shortcode for including highlighted code from another file

Awesome Lists containing this project

README

          

# Quarto-show-code

This is a [quarto](https://quarto.org/) extension
for displaying source code from a file in a document. This allows you to
have a single source of truth for code examples and avoid duplication.

```
quarto install extension WardBrian/quarto-show-code
```

```
{{ showcode path/to/my/file.c }}
```

This also supports the optional arguments `language` to override the highlighting and
`skiplines` to skip the first `n` lines from the file (useful for skipping a preamble)

See the [example](https://brianward.dev/quarto-show-code/)