Skip to content

Commit

Permalink
v1.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
holger1411 committed Sep 23, 2022
1 parent 6f87a6b commit 22a46ba
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 22 deletions.
15 changes: 0 additions & 15 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@ const rssPlugin = require('@11ty/eleventy-plugin-rss');
const Image = require("@11ty/eleventy-img");
const EleventyFetch = require("@11ty/eleventy-fetch");

(async () => {
let url = "https://images.unsplash.com/photo-1535882686-b1332af6f51e";
let stats = await Image(url, {
widths: [1980],
formats: ["jpeg"],
outputDir: "./src/img",
cacheOptions: {
duration: "1d",
directory: ".cache",
removeUrlQueryParams: false,
}
});
console.log( stats );
})();

module.exports = function(eleventyConfig) {
// Universal Shortcodes (Adds to Liquid, Nunjucks, Handlebars)
eleventyConfig.addShortcode("bgImg", function(imgName, test) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Brook",
"version": "1.0.0",
"version": "1.1.0",
"description": "A ultra clean Eleventy Blogging template",
"license": "MIT",
"private": "true",
Expand Down
7 changes: 1 addition & 6 deletions src/_includes/layouts/post.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,7 @@
{% if img %}
<div class="row">
<div class="col-12">
<img src="./img/webp/{{img}}.webp" class="img-fluid">

<picture class="img-fluid">
<source srcset="./img/webp/{{img}}.webp" type="image/webp">
<source srcset="./img/{{img}}.jpg" type="image/jpeg">
</picture>
<img src="/img/webp/{{img}}.webp" class="img-fluid" alt="{{imgAlt}}">
</div>
</div>
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions src/posts/post1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Why Zombies are slow
date: 2022-10-31
author: John Doe
img: colorful
imgAlt: This is the image alt tag
summary: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat diam voluptua.
---

Expand Down

0 comments on commit 22a46ba

Please sign in to comment.