Sha256: 5f9e77fde58bb3dc6da98766663fe73a1cd2cf78f6c41561e61d398e0d084292
Contents?: true
Size: 1.01 KB
Versions: 2
Compression:
Stored size: 1.01 KB
Contents
### Reusable Text Use file inclusion to stay DRY (Don't Repeat Yourself). Maintain reusable text in a separate file, then include it wherever it's needed. #### Separate File Here's a file containing some text that can be included in more than one place: <code>reusable_text.md</code> ``` This is some useful text that can be included in more than one place (actually, in more than one file). ``` #### Template File Here's a template file that includes it: <code>includer.md</code> ``` This file includes the useful text. @[:verbatim](reusable_text.md) ``` #### Command Here's the command to perform the inclusion (```--pristine``` suppresses inclusion comments): ```sh ruby ../../../bin/include --pristine includer.md included.md ``` #### Included File Here's the finished file with the inclusion: <code>included.md</code> ``` This file includes the useful text. This is some useful text that can be included in more than one place (actually, in more than one file). ```
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
markdown_helper-1.6.1 | markdown/use_cases/reusable_text/use_case.md |
markdown_helper-1.6.0 | markdown/use_cases/reusable_text/use_case.md |