IncludeShortcode Class
Includes a file from the virtual file system.
Namespace
Statiq.Core
Interfaces
Base Types
graph BT Type-->Base0["Shortcode"] click Base0 "/api/Statiq.Common/Shortcode" Base0-->Base1["object"] Type-.->Interface0["IShortcode"] click Interface0 "/api/Statiq.Common/IShortcode" Type["IncludeShortcode"] class Type type-node

Syntax

public class IncludeShortcode : Shortcode, IShortcode

Examples

Example usage to show the contents of test-include.html in the output.

<?# Include "test-include.html" /?>

If the included file contains Markdown syntax, you can even include it before the Markdown engine runs with a slight syntax change:

<?! Include "test-include.md" /?>?

You can also include HTTP/HTTPS resources.

<?# Include "https://raw.githubusercontent.com/statiqdev/Statiq.Framework/master/README.md" /?>

Remarks

The raw content of the file will be rendered where the shortcode appears. If the file does not exist nothing will be rendered.

Methods

Extension Methods