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"
}

snippet source | anchor

For SourceTransform

{
  "$schema": "https://raw.githubusercontent.com/SimonCropp/MarkdownSnippets/master/schema.json",
  "Convention": "SourceTransform"
}

snippet source | anchor

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
}

snippet source | anchor

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.

IDE schema code completion

The schema also includes enum values for constrained value types.

IDE schema code completion

More Info