chore: only generate og images locally
|
@ -48,6 +48,9 @@ export default async function (eleventyConfig) {
|
||||||
jsTruthy: true,
|
jsTruthy: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// watch ignores
|
||||||
|
eleventyConfig.watchIgnores.add('src/assets/social-preview/**/*')
|
||||||
|
|
||||||
// passthrough
|
// passthrough
|
||||||
eleventyConfig.addPassthroughCopy('src/assets')
|
eleventyConfig.addPassthroughCopy('src/assets')
|
||||||
eleventyConfig.addPassthroughCopy('_redirects')
|
eleventyConfig.addPassthroughCopy('_redirects')
|
||||||
|
|
|
@ -3,15 +3,17 @@ import Image from '@11ty/eleventy-img'
|
||||||
import { minify } from 'terser'
|
import { minify } from 'terser'
|
||||||
|
|
||||||
export const svgToJpeg = () => {
|
export const svgToJpeg = () => {
|
||||||
const socialPreviewImagesDir = '_site/assets/img/social-preview/'
|
if (process.env.ELEVENTY_RUN_MODE !== 'build') {
|
||||||
fs.readdir(socialPreviewImagesDir, (err, files) => {
|
const socialPreviewImagesInputDir = '_site/assets/img/social-preview/'
|
||||||
|
const socialPreviewImagesOutputDir = 'src/assets/img/social-preview/'
|
||||||
|
fs.readdir(socialPreviewImagesInputDir, (err, files) => {
|
||||||
if (!!files && files.length > 0) {
|
if (!!files && files.length > 0) {
|
||||||
files.forEach((fileName) => {
|
files.forEach((fileName) => {
|
||||||
if (fileName.endsWith('.svg')) {
|
if (fileName.endsWith('.svg')) {
|
||||||
let imageUrl = socialPreviewImagesDir + fileName
|
let imageUrl = socialPreviewImagesInputDir + fileName
|
||||||
Image(imageUrl, {
|
Image(imageUrl, {
|
||||||
formats: ['jpeg'],
|
formats: ['jpeg'],
|
||||||
outputDir: './' + socialPreviewImagesDir,
|
outputDir: './' + socialPreviewImagesOutputDir,
|
||||||
filenameFormat: function (id, src, width, format) {
|
filenameFormat: function (id, src, width, format) {
|
||||||
let outputFileName = fileName.substring(0, fileName.length - 4)
|
let outputFileName = fileName.substring(0, fileName.length - 4)
|
||||||
return `${outputFileName}.${format}`
|
return `${outputFileName}.${format}`
|
||||||
|
@ -24,6 +26,7 @@ export const svgToJpeg = () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export const minifyJsComponents = async () => {
|
export const minifyJsComponents = async () => {
|
||||||
const jsComponentsDir = '_site/assets/scripts/components';
|
const jsComponentsDir = '_site/assets/scripts/components';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "13.4.3",
|
"version": "13.5.0",
|
||||||
"description": "The source for my personal site. Built using 11ty.",
|
"description": "The source for my personal site. Built using 11ty.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
export default async function () {
|
export default async function () {
|
||||||
return process.env.NODE_ENV
|
return {
|
||||||
|
production: process.env.ELEVENTY_RUN_MODE === 'build'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
BIN
src/assets/img/social-preview/2021-reading-list-preview.jpeg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/social-preview/2022-reading-list-preview.jpeg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/social-preview/2023-in-review-preview.jpeg
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
src/assets/img/social-preview/a-brief-intro-to-git-preview.jpeg
Normal file
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 29 KiB |
BIN
src/assets/img/social-preview/an-indie-web-primer-preview.jpeg
Normal file
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/social-preview/arcade-fire-reflektor-preview.jpeg
Normal file
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 28 KiB |
BIN
src/assets/img/social-preview/avoiding-phishing-preview.jpeg
Normal file
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 26 KiB |
BIN
src/assets/img/social-preview/castro-v23-released-preview.jpeg
Normal file
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 25 KiB |
BIN
src/assets/img/social-preview/currently-reading-preview.jpeg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/assets/img/social-preview/damien-jurado-2014-preview.jpeg
Normal file
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 19 KiB |
BIN
src/assets/img/social-preview/data-is-a-toxic-asset-preview.jpeg
Normal file
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 15 KiB |
BIN
src/assets/img/social-preview/dawes-most-people-preview.jpeg
Normal file
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/img/social-preview/digital-privacy-tools-preview.jpeg
Normal file
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/img/social-preview/dumb-pipes-preview.jpeg
Normal file
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 20 KiB |
BIN
src/assets/img/social-preview/env-files-in-eleventy-preview.jpeg
Normal file
After Width: | Height: | Size: 13 KiB |