diff --git a/_config.yml b/_config.yml index df87cb4..3f48ed4 100644 --- a/_config.yml +++ b/_config.yml @@ -9,7 +9,6 @@ host: 0.0.0.0 port: 4000 livereload: true - # URL baseurl: / url: https://ewpratten.com @@ -23,6 +22,16 @@ kramdown: plugins: - jekyll-feed +# Per-collection settings +collections_dir: _collections +collections: + posts: + output: true + permalink: /blog/:title + photos: + output: true + permalink: /photography/:title + # Exclusions exclude: - .sass-cache/ diff --git a/src/_collections/_photos/2017-06-21-old-quebec.md b/src/_collections/_photos/2017-06-21-old-quebec.md new file mode 100644 index 0000000..339e5b2 --- /dev/null +++ b/src/_collections/_photos/2017-06-21-old-quebec.md @@ -0,0 +1,6 @@ +--- +layout: photo +title: "Old Quebec" +date: 2017-06-21 +file: 2017-06-21-old-quebec.jpg +--- \ No newline at end of file diff --git a/src/_collections/_photos/2017-06-21-stormy-street-in-quebec.md b/src/_collections/_photos/2017-06-21-stormy-street-in-quebec.md new file mode 100644 index 0000000..9c53ffc --- /dev/null +++ b/src/_collections/_photos/2017-06-21-stormy-street-in-quebec.md @@ -0,0 +1,6 @@ +--- +layout: photo +title: "Stormy Street in Quebec" +date: 2017-06-21 +file: 2017-06-21-stormy-street-in-quebec.jpg +--- \ No newline at end of file diff --git a/src/_collections/_photos/2017-06-22-montmorency-falls.md b/src/_collections/_photos/2017-06-22-montmorency-falls.md new file mode 100644 index 0000000..5501267 --- /dev/null +++ b/src/_collections/_photos/2017-06-22-montmorency-falls.md @@ -0,0 +1,6 @@ +--- +layout: photo +title: "Montmorency Falls" +date: 2017-06-22 +file: 2017-06-22-montmorency-falls.jpg +--- \ No newline at end of file diff --git a/src/_collections/_photos/2019-08-04-halifax-port.md b/src/_collections/_photos/2019-08-04-halifax-port.md new file mode 100644 index 0000000..2bb89ac --- /dev/null +++ b/src/_collections/_photos/2019-08-04-halifax-port.md @@ -0,0 +1,6 @@ +--- +layout: photo +title: "Halifax Port" +date: 2019-08-04 +file: 2019-08-04-halifax-port.jpg +--- \ No newline at end of file diff --git a/src/_collections/_photos/2019-08-04-rocky-shore.md b/src/_collections/_photos/2019-08-04-rocky-shore.md new file mode 100644 index 0000000..b1853da --- /dev/null +++ b/src/_collections/_photos/2019-08-04-rocky-shore.md @@ -0,0 +1,6 @@ +--- +layout: photo +title: "Rocky Shore" +date: 2019-08-04 +file: 2019-08-04-rocky-shore.jpg +--- \ No newline at end of file diff --git a/src/_collections/_photos/2019-08-09-jacobs-ladder.md b/src/_collections/_photos/2019-08-09-jacobs-ladder.md new file mode 100644 index 0000000..257379c --- /dev/null +++ b/src/_collections/_photos/2019-08-09-jacobs-ladder.md @@ -0,0 +1,6 @@ +--- +layout: photo +title: "Jacob's Ladder" +date: 2019-08-09 +file: 2019-08-09-jacobs-ladder.jpg +--- \ No newline at end of file diff --git a/src/_collections/_photos/2020-07-19-my-desk.md b/src/_collections/_photos/2020-07-19-my-desk.md new file mode 100644 index 0000000..a68350d --- /dev/null +++ b/src/_collections/_photos/2020-07-19-my-desk.md @@ -0,0 +1,6 @@ +--- +layout: photo +title: "My Desk" +date: 2020-07-19 +file: 2020-07-19-my-desk.png +--- \ No newline at end of file diff --git a/src/_collections/_photos/2020-07-23-two-cars.md b/src/_collections/_photos/2020-07-23-two-cars.md new file mode 100644 index 0000000..fabc538 --- /dev/null +++ b/src/_collections/_photos/2020-07-23-two-cars.md @@ -0,0 +1,6 @@ +--- +layout: photo +title: "Two Cars" +date: 2020-07-23 +file: 2020-07-23-two-cars.png +--- \ No newline at end of file diff --git a/src/_collections/_photos/2020-07-24-above-the-thames.md b/src/_collections/_photos/2020-07-24-above-the-thames.md new file mode 100644 index 0000000..55a5974 --- /dev/null +++ b/src/_collections/_photos/2020-07-24-above-the-thames.md @@ -0,0 +1,6 @@ +--- +layout: photo +title: "Above the Thames" +date: 2020-07-24 +file: 2020-07-24-above-the-thames.jpg +--- \ No newline at end of file diff --git a/src/_collections/_photos/2022-01-18-snow-day-in-space.md b/src/_collections/_photos/2022-01-18-snow-day-in-space.md new file mode 100644 index 0000000..2f083e1 --- /dev/null +++ b/src/_collections/_photos/2022-01-18-snow-day-in-space.md @@ -0,0 +1,6 @@ +--- +layout: photo +title: "Snow Day in Space" +date: 2022-01-18 +file: 2022-01-18-snow-day-in-space.jpg +--- \ No newline at end of file diff --git a/src/_collections/_photos/2022-03-06-icy-shore.md b/src/_collections/_photos/2022-03-06-icy-shore.md new file mode 100644 index 0000000..58d816d --- /dev/null +++ b/src/_collections/_photos/2022-03-06-icy-shore.md @@ -0,0 +1,6 @@ +--- +layout: photo +title: "Icy Shore" +date: 2022-03-06 +file: 2022-03-06-icy-shore.jpg +--- \ No newline at end of file diff --git a/src/_layouts/default.html b/src/_layouts/default.html index 4bc7267..8b076e4 100644 --- a/src/_layouts/default.html +++ b/src/_layouts/default.html @@ -3,12 +3,30 @@ + - {% if page.override_title %}{{page.override_title}}{% else %}{{page.title}} | {{site.title}}{% endif %} + {% if page.override_title %}{{page.override_title}}{% else %}{{page.title}} | {{site.title}}{% endif %} + + -{{ content }} +
+ +
+
+ {{ content }} +
+
+ + \ No newline at end of file diff --git a/src/_layouts/photo.html b/src/_layouts/photo.html new file mode 100644 index 0000000..e7fa7d0 --- /dev/null +++ b/src/_layouts/photo.html @@ -0,0 +1,23 @@ +--- +--- + + + + + + + + "{{page.title}}" by {{site.title}} + + + +
+ A photo titled: {{ page.title }} +
+ {{ page.title }} + {{ page.date | date: "%Y-%m-%d" }} +
+
+ + + \ No newline at end of file diff --git a/src/_posts/_index.md b/src/_posts/_index.md deleted file mode 100644 index 0bd5832..0000000 --- a/src/_posts/_index.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: Blog -sort_by: date -template: "blog-timeline.html" ---- - -The following is a list of articles I've written. This is also available in [RSS](/rss.xml) format. - diff --git a/src/assets/photography/2017-06-21-old-quebec.jpeg b/src/assets/photography/2017-06-21-old-quebec.jpg similarity index 100% rename from src/assets/photography/2017-06-21-old-quebec.jpeg rename to src/assets/photography/2017-06-21-old-quebec.jpg diff --git a/src/assets/photography/2017-06-21-old-quebec.preview.jpeg b/src/assets/photography/2017-06-21-old-quebec.preview.jpeg deleted file mode 100644 index c8f42ed..0000000 Binary files a/src/assets/photography/2017-06-21-old-quebec.preview.jpeg and /dev/null differ diff --git a/src/assets/photography/2017-06-21-stormy-quebec-street.preview.jpeg b/src/assets/photography/2017-06-21-stormy-quebec-street.preview.jpeg deleted file mode 100644 index a44a8c2..0000000 Binary files a/src/assets/photography/2017-06-21-stormy-quebec-street.preview.jpeg and /dev/null differ diff --git a/src/assets/photography/2017-06-21-stormy-quebec-street.jpeg b/src/assets/photography/2017-06-21-stormy-street-in-quebec.jpg similarity index 100% rename from src/assets/photography/2017-06-21-stormy-quebec-street.jpeg rename to src/assets/photography/2017-06-21-stormy-street-in-quebec.jpg diff --git a/src/assets/photography/2017-06-22-montmorency-falls.jpeg b/src/assets/photography/2017-06-22-montmorency-falls.jpg similarity index 100% rename from src/assets/photography/2017-06-22-montmorency-falls.jpeg rename to src/assets/photography/2017-06-22-montmorency-falls.jpg diff --git a/src/assets/photography/2017-06-22-montmorency-falls.preview.jpeg b/src/assets/photography/2017-06-22-montmorency-falls.preview.jpeg deleted file mode 100644 index e172d74..0000000 Binary files a/src/assets/photography/2017-06-22-montmorency-falls.preview.jpeg and /dev/null differ diff --git a/src/assets/photography/2017-08-04-rocky-shore-halifax.preview.jpeg b/src/assets/photography/2017-08-04-rocky-shore-halifax.preview.jpeg deleted file mode 100644 index 45afbf0..0000000 Binary files a/src/assets/photography/2017-08-04-rocky-shore-halifax.preview.jpeg and /dev/null differ diff --git a/src/assets/photography/2019-08-04-halifax-port.jpeg b/src/assets/photography/2019-08-04-halifax-port.jpg similarity index 100% rename from src/assets/photography/2019-08-04-halifax-port.jpeg rename to src/assets/photography/2019-08-04-halifax-port.jpg diff --git a/src/assets/photography/2019-08-04-halifax-port.preview.jpeg b/src/assets/photography/2019-08-04-halifax-port.preview.jpeg deleted file mode 100644 index 44c8943..0000000 Binary files a/src/assets/photography/2019-08-04-halifax-port.preview.jpeg and /dev/null differ diff --git a/src/assets/photography/2017-08-04-rocky-shore-halifax.jpeg b/src/assets/photography/2019-08-04-rocky-shore.jpg similarity index 100% rename from src/assets/photography/2017-08-04-rocky-shore-halifax.jpeg rename to src/assets/photography/2019-08-04-rocky-shore.jpg diff --git a/src/assets/photography/2019-08-09-jacobs-ladder.jpeg b/src/assets/photography/2019-08-09-jacobs-ladder.jpg similarity index 100% rename from src/assets/photography/2019-08-09-jacobs-ladder.jpeg rename to src/assets/photography/2019-08-09-jacobs-ladder.jpg diff --git a/src/assets/photography/2019-08-09-jacobs-ladder.preview.jpeg b/src/assets/photography/2019-08-09-jacobs-ladder.preview.jpeg deleted file mode 100644 index c0d7a5e..0000000 Binary files a/src/assets/photography/2019-08-09-jacobs-ladder.preview.jpeg and /dev/null differ diff --git a/src/assets/photography/2020-07-19-my-desk.preview.png b/src/assets/photography/2020-07-19-my-desk.preview.png deleted file mode 100644 index effe1ce..0000000 Binary files a/src/assets/photography/2020-07-19-my-desk.preview.png and /dev/null differ diff --git a/src/assets/photography/2020-07-23-two-cars.preview.png b/src/assets/photography/2020-07-23-two-cars.preview.png deleted file mode 100644 index 5819948..0000000 Binary files a/src/assets/photography/2020-07-23-two-cars.preview.png and /dev/null differ diff --git a/src/assets/photography/2020-07-24-above-the-thames.preview.jpg b/src/assets/photography/2020-07-24-above-the-thames.preview.jpg deleted file mode 100644 index 1e3f319..0000000 Binary files a/src/assets/photography/2020-07-24-above-the-thames.preview.jpg and /dev/null differ diff --git a/src/assets/photography/2022-01-18-snow-day-in-space.preview.jpg b/src/assets/photography/2022-01-18-snow-day-in-space.preview.jpg deleted file mode 100644 index 1fd81f5..0000000 Binary files a/src/assets/photography/2022-01-18-snow-day-in-space.preview.jpg and /dev/null differ diff --git a/src/assets/photography/2022-03-06-icy-shore.preview.jpg b/src/assets/photography/2022-03-06-icy-shore.preview.jpg deleted file mode 100644 index 77dc11c..0000000 Binary files a/src/assets/photography/2022-03-06-icy-shore.preview.jpg and /dev/null differ diff --git a/src/assets/photography/generate_previews.sh b/src/assets/photography/generate_previews.sh deleted file mode 100644 index c8dabbc..0000000 --- a/src/assets/photography/generate_previews.sh +++ /dev/null @@ -1,45 +0,0 @@ -#! /bin/bash -set -ex - -# Check if ImageMagick is installed -if ! command -v convert &> /dev/null; then - echo "ImageMagick is not installed. Please install it before running this script." - exit 1 -fi - - -# Get the directory of this script -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" - -# Find all images with extension ".png", ".jpg", or ".jpeg" -# NOTE: Ignore any image containing ".preview." in the name -IMAGES=$(find $DIR -type f -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" | grep -v ".preview.") - -# Loop through all images -for IMAGE in $IMAGES; do - # Create the preview file name (file.preview.ext) - PREVIEW="${IMAGE%.*}.preview.${IMAGE##*.}" - - # If the file already exists, skip it - if [ -f "$PREVIEW" ]; then - echo "Preview already exists for: $IMAGE" - continue - fi - - # Check if the image is bigger than 1440x1440 - WIDTH=$(identify -format "%w" $IMAGE) - HEIGHT=$(identify -format "%h" $IMAGE) - - if [ $WIDTH -gt 1440 ] || [ $HEIGHT -gt 1440 ]; then - # Create the preview. This should be a 2 fifths resolution version of the original image - convert $IMAGE -resize 40% $PREVIEW - elif [ $WIDTH -gt 720 ] || [ $HEIGHT -gt 720 ]; then - # Create the preview. This should be a 3 quarters resolution version of the original image - convert $IMAGE -resize 75% $PREVIEW - else - # Create the preview. This should be the original image - cp $IMAGE $PREVIEW - fi - - echo "Created preview for: $IMAGE" -done \ No newline at end of file diff --git a/src/photography.html b/src/photography.html new file mode 100644 index 0000000..82332c0 --- /dev/null +++ b/src/photography.html @@ -0,0 +1,19 @@ +--- +layout: default +title: Photography +--- + +
+ {% assign photos_sorted = site.photos | sort: "date" | reverse %} + {% for photo in photos_sorted %} +
+ + A photo titled: {{ photo.name }} + +
+ {{ photo.name }} + {{ photo.date | date: "%Y-%m-%d" }} +
+
+ {% endfor %} +
\ No newline at end of file