-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up templates and CSS handling 🧽
1. Create new, minimal `default-template.html` - when using for plain conversion (rather than preview), we don't need all that bulk (CSS) - this keeps the default output short and focused 2. Rename the previous default template to `preview-template.html` - this one is used for previews by the Vim plugin - it now includes the CSS directly 3. CSS insertion is removed from the command-line tool
- Loading branch information
1 parent
d44a23a
commit d11cb68
Showing
13 changed files
with
1,274 additions
and
1,245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
... | ||
</head> | ||
<body class="markdown-body"> | ||
<body> | ||
<p>Hello I/O!</p> | ||
</body> | ||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<head> | ||
... | ||
</head> | ||
<body class="markdown-body"> | ||
<body> | ||
<p>Just here for the input.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
cd "$(dirname "$0")/.." | ||
|
||
TEMPLATE="src/preview-template-template.html" | ||
OUTPUT="src/preview-template.html" | ||
|
||
CSS="$(script/get-github-markdown-css | sed '2,$s/^/ /' | sed 's/ *$//')" | ||
export CSS | ||
|
||
# shellcheck disable=SC2016 | ||
envsubst '${CSS}' < "$TEMPLATE" > "$OUTPUT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.