An included markdown file can itself include more files.
includee.md
:
Text for inclusion, and a nested inclusion.
@[:markdown](nested_includee.md)
nested_includee.md
:
Text for nested inclusion.
includer.md
:
File to do nested inclusion.
@[:markdown](includee.md)
CLI
markdown_helper include --pristine includer.md included.md
(Option --pristine
suppresses comment insertion.)
API
include.rb
:
require 'markdown_helper'
# Option :pristine suppresses comment insertion.
markdown_helper = MarkdownHelper.new(:pristine => true)
markdown_helper.include('includer.md', 'included.md')
Here's the finished file with the inclusion and nested inclusion:
included.md
:
File to do nested inclusion.
Text for inclusion, and a nested inclusion.
Text for nested inclusion.