diff options
author | Yuchen Pei <me@ypei.me> | 2021-06-24 18:40:21 +1000 |
---|---|---|
committer | Yuchen Pei <me@ypei.me> | 2021-06-24 18:40:21 +1000 |
commit | e9383423398b1dda9a3d5be45c7a029d200f1d87 (patch) | |
tree | 173283389724b31ad689e1a402d2b29037075589 | |
parent | 0abcccc0c2283f2671b45bbd233f8a64eaef0cf0 (diff) |
Adding post-processing script and fix image size
- post-process.sh: fix paths
- image size: max width not exceeding div
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | css/default.css | 5 | ||||
-rwxr-xr-x | post-process.sh | 11 |
3 files changed, 17 insertions, 0 deletions
@@ -7,6 +7,7 @@ all: publish publish: publish.el @echo "Publishing... with current Emacs configurations." emacs --batch --load publish.el --funcall org-publish-all + ./post-process.sh python rss.py publish_no_init: publish.el diff --git a/css/default.css b/css/default.css index 672d469..705e792 100644 --- a/css/default.css +++ b/css/default.css @@ -93,3 +93,8 @@ footer center { margin: auto; line-height: 1.6; } + +img { + max-width: 100%; + height: auto; +} diff --git a/post-process.sh b/post-process.sh new file mode 100755 index 0000000..57b7a9a --- /dev/null +++ b/post-process.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +for post in $(ls site/posts); do + sed -i 's/src="file:\/\//src="/g' site/posts/$post + sed -i 's/href="file:\/\//href="/g' site/posts/$post +done + +for page in $(ls site/pages); do + sed -i 's/src="file:\/\//src="/g' site/pages/$page + sed -i 's/href="file:\/\//href="/g' site/pages/$page +done |