Sidecar

Extracts the content of a Sidecar file for each document and sends it to a child module for processing.
This module is typically used in conjunction with the Yaml module to enable putting YAML in a Sidecar file. First, an attempt is made to find the specified sidecar file for each input document. Once found, the content in this file is passed to the specified child module(s). Any metadata from the child module output document(s) is added to the input document. Note that if the child module(s) result in more than one output document, multiple clones of the input document will be made for each one. The output document content is set to the original input document content.

Usage

  • Sidecar(DocumentConfig sidecarPath, IEnumerable<IModule> modules)

    Uses a delegate to describe where to find the sidecar file for each input document. If a sidecar file is found, it's content is passed to the specified child modules for processing.

    • sidecarPath

      A delegate that returns a Wyam.Common.IO.FilePath with the desired sidecar path.

    • modules

      The modules to execute against the sidecar file.

  • Sidecar(DocumentConfig sidecarPath, params IModule[] modules)

    Uses a delegate to describe where to find the sidecar file for each input document. If a sidecar file is found, it's content is passed to the specified child modules for processing.

    • sidecarPath

      A delegate that returns a Wyam.Common.IO.FilePath with the desired sidecar path.

    • modules

      The modules to execute against the sidecar file.

  • Sidecar(IEnumerable<IModule> modules)

    Searches for sidecar files at the same path as the input document SourceFilePath with the additional extension .meta. If a sidecar file is found, it's content is passed to the specified child modules for processing.

    • modules

      The modules to execute against the sidecar file.

  • Sidecar(params IModule[] modules)

    Searches for sidecar files at the same path as the input document SourceFilePath with the additional extension .meta. If a sidecar file is found, it's content is passed to the specified child modules for processing.

    • modules

      The modules to execute against the sidecar file.

  • Sidecar(string extension, IEnumerable<IModule> modules)

    Searches for sidecar files at the same path as the input document SourceFilePath with the specified additional extension. If a sidecar file is found, it's content is passed to the specified child modules for processing.

    • extension

      The extension to search.

    • modules

      The modules to execute against the sidecar file.

  • Sidecar(string extension, params IModule[] modules)

    Searches for sidecar files at the same path as the input document SourceFilePath with the specified additional extension. If a sidecar file is found, it's content is passed to the specified child modules for processing.

    • extension

      The extension to search.

    • modules

      The modules to execute against the sidecar file.

Input Metadata

The metadata values listed below apply to individual documents and are typically set from front matter (with just the name of the key) and used as inputs to the module to control behavior.

  • Keys.SourceFilePath: Wyam.Common.IO.FilePath

    Used as the default location at which to search for sidecar files for a given document.

GitHub