Content Directory

This is a reference for the paths.input and paths.ignore fields in mdsite.yml. They control where MD-Site finds Markdown files and which files it publishes.

Important

Edit paths.input when Markdown files live in a subdirectory rather than next to mdsite.yml. Use paths.ignore to exclude Markdown from publication and content-derived features. The renderer reads both fields directly from mdsite.yml.

1. Default Behavior

If you omit paths.input, MD-Site treats the directory that contains mdsite.yml as the content directory. mdsite init leaves paths.input empty unless it finds a docs/ (or doc/) subdirectory, in which case it points paths.input there.

my-site/
├── mdsite.yml
├── index.md      ← homepage
├── guide.md
└── about.md

2. Pointing at a Subdirectory

When you want to keep mdsite.yml (and files like .nvmrc, .gitignore, your favicon source) at the project root but organize all Markdown in a dedicated folder, set paths.input to that folder. The path is resolved relative to the directory containing mdsite.yml.

paths:
  input: content

This reads Markdown from the content/ subdirectory, producing this layout:

my-site/
├── mdsite.yml     ← config lives here
├── .nvmrc
├── .gitignore
└── content/       ← Markdown lives here
    ├── index.md   ← homepage
    ├── about.md
    └── guide/
        └── intro.md

Note

mdsite init writes paths.input automatically when it finds a docs/ or doc/ subdirectory. For any other layout, add or edit the paths: block by hand.

3. The Homepage

The file named index.md at the root of the content directory becomes your site's homepage and is served at /.

  • With the default layout, that is index.md next to mdsite.yml.
  • With paths.input: content, that is content/index.md.

If the homepage is missing, check that an index.md exists at the content directory root. A common cause is a paths.input value that does not point at the folder actually holding index.md.

4. What Goes Where

LocationHolds
Config directory (where mdsite.yml lives)mdsite.yml, .nvmrc, .gitignore, favicon source
Content directory (where Markdown lives)all *.md files, including index.md

Keeping these concerns separate keeps your repository tidy when it also holds non-site files alongside mdsite.yml.


Tip

Output: With the correct paths.input value, every Markdown file in that directory becomes a page, and index.md becomes the homepage.

5. Ignoring Markdown files

Set paths.ignore to one rule or a list of rules:

paths:
  ignore:
    - internal/
    - "guides/*.private.md"
    - "**/notes.md"

Defaults and replacement

The default is ['AGENTS.md', 'CLAUDE.md']. When paths.ignore is omitted, both bare names are ignored at any directory depth.

A scalar or array replaces the defaults; it does not extend them:

paths:
  ignore: INTERNAL.md

Use an empty array to disable the default rules:

paths:
  ignore: []

README.md remains published.

Rule syntax

RuleExampleMatch
Bare namenotes.mdThat name at any depth
Relative pathguides/internal.mdThat path within the content directory
Directoryarchive/Markdown under that directory
* wildcardguides/*.private.mdMatching files at that path level
** wildcard**/notes.mdMatching files across directory levels

Negation with ! is not supported. Negated or malformed entries are rejected rather than ignored silently.

Scope and built-ins

Configured rules exclude matches from:

  • published content;
  • generated navigation, search, and metadata;
  • direct Markdown reads configured in menus and footers.

Built-in exclusions for hidden directories, node_modules, dist, and *.draft.md remain separate. paths.ignore: [] does not disable them, and they cannot be disabled through paths.ignore.