Skip to content

Commit

Permalink
docs: eleventy configuration so I don't need to check the online doc …
Browse files Browse the repository at this point in the history
…too often
  • Loading branch information
marc-bouvier committed Jul 29, 2024
1 parent 62976fe commit 1c565ce
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,36 @@ import {EleventyI18nPlugin} from "@11ty/eleventy";
import {feedPlugin} from "@11ty/eleventy-plugin-rss";

export default function (eleventyConfig) {

// Copy static styles as is
eleventyConfig.addPassthroughCopy("public/css");

eleventyConfig.addPlugin(EleventyI18nPlugin, {

// Internationalization
eleventyConfig.addPlugin(EleventyI18nPlugin, {
defaultLanguage: "fr",

});

// RSS feed
eleventyConfig.addPlugin(feedPlugin, {
type: "rss",
outputPath: "/feed.xml",
collection: {
name: "blog"
}
})
eleventyConfig.addPlugin(syntaxHighlight);

// Code snippets with syntax highlighting
eleventyConfig.addPlugin(syntaxHighlight,{
lineSeparator: "\n",
errorOnInvalidLanguage: true,
alwaysWrapLineHighlights: true,
preAttributes: {},
codeAttributes: {}
});

// Create images variants of different dimensions and different formats.
// They will be loaded depending on the viewport
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
outputDir: "./_site/public/img/",
urlPath: "/public/img/",
Expand Down

0 comments on commit 1c565ce

Please sign in to comment.