-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* replace images with webp * fix profile image * cche contol headers * use display swap * use display swap * gzip * moar fast * thumbnails * theme * all thumbanils * theme * theme * fix blog files * smaller images
- Loading branch information
Showing
238 changed files
with
250 additions
and
169 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#! /bin/bash | ||
|
||
|
||
DIR=${1:-"src/content/blog"} | ||
CDIR=${2:-"/tmp/blog.edwardawebb.com/wp-content/uploads/"} | ||
for file in ${DIR}/*.md; do | ||
ign="${file##*/}" | ||
newdir="${DIR}/${ign%.md}" | ||
echo -e "\t>${newdir}" | ||
mkdir "${newdir}" | ||
mv "$file" "${newdir}/index.md" | ||
|
||
images=$(grep -oh "\(https://blog.edwardawebb.com/wp-content/uploads/[A-Za-z0-9/_-]*\.png\)" ${newdir}/index.md) | ||
for image in $images;do | ||
tnp="${image##*/}" | ||
target=$"${tnp%.png}.webp" | ||
echo -e "\t>${target}" | ||
#cp ${CDIR}/${image#"https://blog.edwardawebb.com/wp-content/uploads/"} "${newdir}/${target}" | ||
|
||
cwebp -q 50 "${CDIR}/${image#"https://blog.edwardawebb.com/wp-content/uploads/"}" -o "${newdir}/${target}"; | ||
sed -i '' "s#${image}#${target}#" ${newdir}/index.md | ||
done | ||
|
||
done | ||
|
||
|
||
#grep -oh "\(https://blog.edwardawebb.com/wp-content/uploads/[A-Za-z0-9/_-]*\.png\)" src/content/blog/keys-putty-cygwin-passwordless-login-ssh-scp.md |
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,13 @@ | ||
#! /bin/bash | ||
|
||
# | ||
# webp all the images! | ||
# | ||
DIR=${1:-"src/static/img"} | ||
CDIR=${2:-"src/content"} | ||
for file in ${DIR}/*; do | ||
newname="${file%.*}.webp" | ||
cwebp -q 50 "${file}" -o "${newname}"; | ||
cwebp -q 50 "${file}" -resize 300 0 -o "${file%.*}-thumb.webp"; | ||
find ${CDIR} -type f -name '*.md' | xargs sed -i '' 's#'${file#"src/static/img"}'#'${newname#"src/static/img"}'#g' | ||
done |
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
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