Oh my god, so much configuration!
This commit is contained in:
parent
071e8c09f4
commit
a56b614037
6 changed files with 2407 additions and 2513 deletions
|
@ -1,4 +1,5 @@
|
|||
import * as eleventyAsciidoc from 'eleventy-plugin-asciidoc';
|
||||
import { default as dumpFilter } from '@jamshop/eleventy-filter-dump';
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
export default async function (config) {
|
||||
config.setInputDirectory('src');
|
||||
|
@ -7,7 +8,7 @@ export default async function (config) {
|
|||
config.setIncludesDirectory('src/_includes');
|
||||
config.setLayoutsDirectory('src/_layouts');
|
||||
|
||||
config.setTemplateFormats(['adoc', 'md', 'liquid', 'html']);
|
||||
config.setTemplateFormats(['md', 'liquid', 'html']);
|
||||
config.addPassthroughCopy('src/styles.css');
|
||||
config.addPassthroughCopy('src/styles/**/*.css');
|
||||
|
||||
|
@ -15,5 +16,6 @@ export default async function (config) {
|
|||
watch: ['src/styles/**/*.css'],
|
||||
});
|
||||
|
||||
config.addPlugin(eleventyAsciidoc);
|
||||
config.addFilter('dump', dumpFilter);
|
||||
config.addFilter('formatDate', dateObj => DateTime.fromJSDate(dateObj).toLocaleString(DateTime.DATE_MED));
|
||||
}
|
||||
|
|
4863
package-lock.json
generated
4863
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -14,6 +14,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@11ty/eleventy": "^3.0.0",
|
||||
"eleventy-plugin-asciidoc": "^4.0.3"
|
||||
"@jamshop/eleventy-filter-dump": "^1.0.4",
|
||||
"luxon": "^3.6.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
---
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
@ -18,13 +15,16 @@
|
|||
</header>
|
||||
|
||||
<main>
|
||||
<div class="posts">
|
||||
{%- for post in collections.all -%}
|
||||
<div class="post">
|
||||
<h2 class="post__title">{{ post.data.title }}</h2>
|
||||
</div>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
{%- for post in collections.all -%}
|
||||
{%- if post.data.type == "post" -%}
|
||||
<section class="post">
|
||||
<header>
|
||||
<span>Posted on {{ post.date | formatDate }}</span>
|
||||
</header>
|
||||
{{ post.content }}
|
||||
</section>
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
title: A Test Post
|
||||
date: git Created
|
||||
---
|
||||
|
||||
== {{ title }}
|
||||
|
||||
Hello, I am a test post!
|
|
@ -18,27 +18,37 @@ body {
|
|||
max-width: 1200px;
|
||||
}
|
||||
|
||||
header {
|
||||
body > header {
|
||||
border: 2px solid var(--color-bg);
|
||||
grid-area: nav;
|
||||
height: max-content;
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
header > .header__title {
|
||||
body > header > .header__title {
|
||||
padding: var(--size-md) var(--size-xl);
|
||||
}
|
||||
|
||||
header > .header__title {
|
||||
body > header > .header__title {
|
||||
background-color: var(--color-bg);
|
||||
color: var(--color-on-bg);
|
||||
}
|
||||
|
||||
header > .header__title > h1 {
|
||||
body > header > .header__title > h1 {
|
||||
font-weight: 300;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
main {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
grid-area: content;
|
||||
}
|
||||
|
||||
main > .post {
|
||||
width: 66%;
|
||||
}
|
||||
|
||||
main > .post > p {
|
||||
margin: 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue