Skip to content

Commit

Permalink
feat: render issue screenshots (resolves #81) (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander authored Jul 22, 2024
1 parent 6c63a7f commit ce1b96c
Show file tree
Hide file tree
Showing 7 changed files with 663 additions and 44 deletions.
16 changes: 15 additions & 1 deletion eleventy.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { RenderPlugin } from "@11ty/eleventy";
import fetch from "@11ty/eleventy-fetch";
import { eleventyImageTransformPlugin } from "@11ty/eleventy-img";
import syntaxHighlightPlugin from "@11ty/eleventy-plugin-syntaxhighlight";
// Import {$} from 'execa';
import newIssueUrl from "./src/_utils/new-issue-url.js";
Expand Down Expand Up @@ -43,6 +44,16 @@ export default function eleventy(eleventyConfig) {

eleventyConfig.addPlugin(RenderPlugin);
eleventyConfig.addPlugin(syntaxHighlightPlugin);
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
extensions: "html",
formats: ["webp", "jpeg"],
urlPath: "/assets/images/processed/",
outputDir: "./_site/assets/images/processed/",
defaultAttributes: {
loading: "lazy",
decoding: "async"
}
});

eleventyConfig.addFilter("withoutTips", (issues) => issues.filter((item) => Object.hasOwn(item, "sc") && item.sc !== ""));

Expand All @@ -69,7 +80,10 @@ export default function eleventy(eleventyConfig) {
});

eleventyConfig.addPassthroughCopy({
"src/assets": "assets"
"src/assets/fonts": "assets/fonts",
"src/assets/images": "assets/images",
"src/assets/scripts": "assets/scripts",
"src/assets/styles": "assets/styles"
});

eleventyConfig.addPassthroughCopy({
Expand Down
Loading

0 comments on commit ce1b96c

Please sign in to comment.