From cd1e0883aaf29889eab74f5150890d672ea3e6e5 Mon Sep 17 00:00:00 2001 From: Ole Eskild Steensen Date: Thu, 18 Jan 2024 07:42:44 +0100 Subject: [PATCH] Allow using full resolution images --- .eleventy.js | 3 +++ src/site/_data/meta.js | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 2d46b37eb..604f32c08 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -432,6 +432,9 @@ module.exports = function (eleventyConfig) { eleventyConfig.addTransform("picture", function (str) { + if(process.env.USE_FULL_RESOLUTION_IMAGES === "true"){ + return str; + } const parsed = parse(str); for (const imageTag of parsed.querySelectorAll(".cm-s-obsidian img")) { const src = imageTag.getAttribute("src"); diff --git a/src/site/_data/meta.js b/src/site/_data/meta.js index a90724746..9df754a04 100644 --- a/src/site/_data/meta.js +++ b/src/site/_data/meta.js @@ -1,7 +1,4 @@ require("dotenv").config(); -const axios = require("axios"); -const fs = require("fs"); -const crypto = require("crypto"); const { globSync } = require("glob"); module.exports = async (data) => {