Overview
The CodeFile
component is an alternative to
code blocks within a document. This will
import an external file as a source code block. This file can be outside the
project root, such as a file located somewhere else in parent project.
Syntax highlighting will be applied based on the file extension.
Fields
A path, relative to the project, to the file to render. This file is not included in the final site. It is injected directly into the current page.
If true the maximum height of the code block will be limited and allow for the content to scroll. This is useful for particularly large files.
Example
<CodeFile "../somefile.rs" />