You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/markdown/embedMarkdownIncludes.sh
+17-6Lines changed: 17 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
#!/usr/bin/env bash
2
2
3
-
# Processes a template_markdown_file markdown file, replacing placeholders like "<!-- include:intro.md -->" with the contents of the specified markdown files. The files to include needs to be in the "includes" subdirectory.
3
+
# Processes template markdown (sysin) replacing placeholders like "<!-- include:intro.md -->" with the contents of the specified markdown files. The files to include needs to be in the "includes" subdirectory.
4
+
# Can take an optional input for the directory that contains the markdown files to be included/embedded (defaults to "includes").
4
5
5
6
# Fail on any error ("-e" = exit on first error, "-o pipefail" exist on errors within piped commands)
6
7
set -o errexit -o pipefail
@@ -12,10 +13,20 @@ set -o errexit -o pipefail
12
13
MARKDOWN_SCRIPTS_DIR=${MARKDOWN_SCRIPTS_DIR:-$( CDPATH=. cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P )}# Repository directory containing the shell scripts for markdown
0 commit comments