Skip to content

Commit

Permalink
Optimize (#11)
Browse files Browse the repository at this point in the history
* 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
eddiewebb authored Feb 10, 2020
1 parent 2c38a1f commit c51370a
Show file tree
Hide file tree
Showing 238 changed files with 250 additions and 169 deletions.
27 changes: 27 additions & 0 deletions .circleci/localize-images.bash
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
13 changes: 13 additions & 0 deletions .circleci/optimize-images.bash
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
2 changes: 1 addition & 1 deletion src/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pygmentsCodeFencesGuessSyntax = true
[params]
firstName = "Eddie"
lastName = "Webb"
profileImage = "img/TechChat.png"
profileImage = "img/TechChat.webp"
phone = "603-463-0447"
contactNote = "DevTools Engineer and DevOps Culture advocate"
address = "Peru, NY"
Expand Down
2 changes: 1 addition & 1 deletion src/content/atlassian_eula.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Any personal information required for licensing and billing is collected and pro
This information can be used for analysis and improvement of the Eddie's products and services. It may also be used to contact you regarding product or service related topics, as you have listed yourself as a contact for the plugin at Atlassian’s Marketplace.

### Google Analytics
Google Analytics is used by Atlassian to collect usage information on the Atlassian Marketplace add-on listing pages. Any private information collected by Atlassian or third party partners on the Atlassian Marketplace website is governed by the Atlassian Privacy Policy. Eddie does receive Google Analytics data from the Atlassian Marketplace website but has no control over their collection, storage and processing.
Google Analytics is used by Atlassian to collect usage information on the Atlassian Marketplace add-on listing pages. Any private information collected by Atlassian or third party partners on the Atlassian Marketplace website is governed by the Atlassian Privacy Policy. Eddie does receive Google Analytics data from the Atlassian Marketplace website but has no control over their collection, storage and processing.
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ sitemap:
---
This section contains articles migrated from my old Wordpress site. Forgive the formatting please :)

The "featured" articles are those with highest comment count from WP.
The "featured" articles are those with highest comment count from WP.
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@ Yes, you'll notice an additional route there for [dynamic sitemaps](https://blog
Dr. Neil Hair comments on the Virtual Workforce of the
future.
http://www.democratandchronicle.com/apps/pbcs.dll/article?AID=2008810050343
Mon, 06 Oct 2008 09:03:36 -0400
Mon, 06 Oct 2008 09:03:36 -0400
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Next we tell each entity to use the SEQUENCE id generation strategy to generate

### Sample Persistence.xml to declare the custome id generator

The only secret here is to set the system property for our custom class. Again this is only if you have one custom sequencer. To use multiple classes you will need to specify the fully qualified class name (including "()" even if not required) with each entity for the Sequencer name. If you do specify one here it will be available under the name "system" for any entity that declares it.
The only secret here is to set the system property for our custom class. Again this is only if you have one custom sequencer. To use multiple classes you will need to specify the fully qualified class name (including "()" even if not required) with each entity for the Sequencer name. If you do specify one here it will be available under the name "system" for any entity that declares it.
2 changes: 1 addition & 1 deletion