diff options
| author | yctct <yctct@yctct.com> | 2025-08-12 21:07:42 +0200 |
|---|---|---|
| committer | yctct <yctct@yctct.com> | 2025-08-12 21:07:42 +0200 |
| commit | 4f4d5ca2d5bf0ee55910ae2e0704bb33e27c1416 (patch) | |
| tree | 5e22936465501327e8fd493e71615482ddf75825 /build.sh | |
First commit
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..281ea19 --- /dev/null +++ b/build.sh @@ -0,0 +1,22 @@ +#!/bin/bash +echo Welcome to the markdown to html converter. +markdown_file="$1" +echo file is "$markdown_file" + +if [[ -z "$markdown_file" ]]; then + printf "Usage: %s <markdown_file>\n" "$0" + exit 1 + fi + + output_file="${markdown_file%%.*}.html" + + pandoc "$markdown_file" -f markdown+hard_line_breaks \ + -t html5 -H "header.html" \ + --template="default.html5" \ + -o "$output_file" --verbose --highlight-style=breezedark + + + printf "markdown_file: %s\n" "$markdown_file" + printf "output_file: %s\n" "$output_file" + + echo We did it capitan, we converted to html. |
