mirror of
https://github.com/ckaczor/Blog.git
synced 2026-01-13 17:22:16 -05:00
Add more customization
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
export default {
|
export default {
|
||||||
title: "Eleventy Base Blog v9",
|
title: "Chris Kaczor",
|
||||||
url: "https://example.com/",
|
url: "https://chriskaczor.com/",
|
||||||
language: "en",
|
language: "en",
|
||||||
description: "I am writing about my experiences as a naval navel-gazer.",
|
description: "Code, Critters, and whatever I feel like writing about.",
|
||||||
author: {
|
author: {
|
||||||
name: "Your Name Here",
|
name: "Chris Kaczor",
|
||||||
email: "youremailaddress@example.com",
|
email: "chris@kaczor.us",
|
||||||
url: "https://example.com/about-me/"
|
url: "https://chriskaczor.com/about/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,5 @@
|
|||||||
---
|
---
|
||||||
layout: layouts/base.njk
|
layout: layouts/base.njk
|
||||||
---
|
---
|
||||||
<!-- Delete this block, which will also remove the component CSS from the bundle -->
|
|
||||||
{%- css %}{% include "public/css/message-box.css" %}{% endcss %}
|
|
||||||
<div class="message-box">
|
|
||||||
<ol>
|
|
||||||
<li>Edit <code>_data/metadata.js</code> with your blog’s information.</li>
|
|
||||||
<li>(Optional) Edit <code>eleventy.config.js</code> with your <a href="https://www.11ty.dev/docs/config/">configuration preferences</a>.</li>
|
|
||||||
<li>Delete this message from <code>_includes/layouts/home.njk</code>.</li>
|
|
||||||
</ol>
|
|
||||||
<p><em>This is an <a href="https://www.11ty.dev/">Eleventy project</a> created from the <a href="https://github.com/11ty/eleventy-base-blog"><code>eleventy-base-blog</code> repo</a>.</em></p>
|
|
||||||
</div>
|
|
||||||
<!-- Stop deleting -->
|
|
||||||
|
|
||||||
{{ content | safe }}
|
{{ content | safe }}
|
||||||
|
|||||||
@@ -64,11 +64,11 @@ export default async function(eleventyConfig) {
|
|||||||
},
|
},
|
||||||
metadata: {
|
metadata: {
|
||||||
language: "en",
|
language: "en",
|
||||||
title: "Blog Title",
|
title: "Chris Kaczor",
|
||||||
subtitle: "This is a longer description about your blog.",
|
subtitle: "Code, Critters, and whatever I feel like writing about.",
|
||||||
base: "https://example.com/",
|
base: "https://chriskaczor.com/",
|
||||||
author: {
|
author: {
|
||||||
name: "Your Name"
|
name: "Chris Kaczor"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -103,6 +103,23 @@ export default async function(eleventyConfig) {
|
|||||||
return (new Date()).toISOString();
|
return (new Date()).toISOString();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Categories
|
||||||
|
eleventyConfig.addCollection('categoryList', collection => {
|
||||||
|
let catSet = {};
|
||||||
|
collection.getAll().forEach(item => {
|
||||||
|
if (!item.data.categories) return;
|
||||||
|
item.data.categories.filter(
|
||||||
|
cat => !['posts', 'all'].includes(cat)
|
||||||
|
).forEach(
|
||||||
|
cat => {
|
||||||
|
if (!catSet[cat]) { catSet[cat] = []; }
|
||||||
|
catSet[cat].push(item)
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
return catSet;
|
||||||
|
});
|
||||||
|
|
||||||
// Features to make your build faster (when you need them)
|
// Features to make your build faster (when you need them)
|
||||||
|
|
||||||
// If your passthrough copy gets heavy and cumbersome, add this line
|
// If your passthrough copy gets heavy and cumbersome, add this line
|
||||||
|
|||||||
Reference in New Issue
Block a user