Config File
July 6, 2026 · View on GitHub
The dotnet tool and the MSBuild Task support a config file convention.
Add a file named mdsnippets.json at the target directory with the following content:
For InPlaceOverwrite
{
"$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json",
"Convention": "InPlaceOverwrite"
}
For SourceTransform
{
"$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json",
"Convention": "SourceTransform"
}
All Settings
{
"$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json",
"ReadOnly": false,
"LinkFormat": "Tfs",
"TocLevel": 3,
"ExcludeDirectories": [ "Dir1", "Dir2" ],
"ExcludeMarkdownDirectories": [ "Dir2", "Dir3" ],
"ExcludeSnippetDirectories": [ "Dir4", "Dir5" ],
"ExcludeSnippetFiles": [ "*.verified.txt", "*.received.txt" ],
"ExcludeMarkdownFiles": [ "*.draft.md", "changelog.source.md" ],
"UrlsAsSnippets": [ "Url1", "Url2" ],
"TocExcludes": [ "Exclude Heading1", "Exclude Heading2" ],
"Convention": "InPlaceOverwrite",
"WriteHeader": true,
"MaxWidth": 80,
"Header": "GENERATED FILE - Source File: {relativePath}",
"UrlPrefix": "TheUrlPrefix",
"TreatMissingAsWarning": true,
"ValidateContent": true,
"OmitSnippetLinks": true
}
JSON Schema
Editor help is available by adding the $schema field to the mdsnippets.json file.
{
"$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json"
}
In the screenshot, JetBrains Rider, is able to offer code completion support.

The schema also includes enum values for constrained value types.

More Info
- ReadOnly: Mark resulting files as read only
- LinkFormat.
- Convention.
- TocLevel: Heading level.
- TocExcludes: Ignore headings.
- Exclude: Exclude directories from discovery.
- WriteHeader: Disable Header.
- UrlPrefix.
- UrlsAsSnippets: Urls to files to be included as snippets.
- TreatMissingAsWarning: The default behavior for a missing snippet/include is to log an error (or throw an exception). To change that behavior to a warning set TreatMissingAsWarning to true.
- ValidateContent: Runs a set of technical-writing style checks over the content of processed markdown. When enabled, each line is validated and any problem is reported as an error. Defaults to false. The checks flag: exclamation marks (
!); a list of discouraged words (such asyou,your,we,our,please,just,simply,easy, and archaic terms likeaforementionedorhenceforth); and wordy phrases that have a simpler equivalent (for examplein order to→to,prior to→before,due to the fact that→because). Lines that start with>(block quotes) are skipped.