Framework for layouts/partials

This commit is contained in:
Gil 2025-02-18 14:12:10 -06:00
parent 44c7a6cd65
commit f32019b525
12 changed files with 74 additions and 29 deletions

View file

@ -3,18 +3,19 @@ import markdownIt from "markdown-it";
import markdownItFootnote from "markdown-it-footnote";
import markdownItAnchor from "markdown-it-anchor";
const MARKDOWN_OPTIONS = {
html: true,
breaks: true,
linkify: true,
typographer: true,
};
const md = new markdownIt(MARKDOWN_OPTIONS)
.use(markdownItFootnote)
.use(markdownItAnchor);
export default function (eleventyConfig) {
const MARKDOWN_OPTIONS = {
html: true,
breaks: true,
linkify: true,
typographer: true,
};
let md = markdownIt(MARKDOWN_OPTIONS)
.use(markdownItFootnote)
.use(markdownItAnchor);
// Libraries
eleventyConfig.setLibrary("md", md);
@ -22,13 +23,18 @@ export default function (eleventyConfig) {
eleventyConfig.addPlugin(eleventyNavigationPlugin);
// Passthrough copies
eleventyConfig.addPassthroughCopy({ "./src/assets": "assets" });
["src/assets"].forEach((path) => {
eleventyConfig.addPassthroughCopy(path);
});
eleventyConfig.addWatchTarget("./src/assets/css");
return {
dir: {
input: "src",
output: "_site",
input: 'src',
output: 'public',
includes: '_includes',
layouts: '_layouts',
},
};
}

2
.gitignore vendored
View file

@ -1,3 +1,3 @@
node_modules/
_site/
public/
.directory

View file

@ -5,3 +5,7 @@ GIL.INK CHANGELOG
- Created site/project scaffolding & Eleventy boilerplate
- Added CSS reset (from https://piccalil.li/blog/a-more-modern-css-reset/)
- Added index.md
2025-02-## (0.0.2)
==================
- Basic layouts and includes

View file

@ -1,7 +1,7 @@
{
"name": "gil",
"name": "gil.ink",
"version": "0.0.1",
"description": "",
"description": "Test",
"scripts": {
"watch:sass": "sass --watch scss:src/assets/css",
"build:sass": "sass scss:src/assets/css",

8
src/_data/meta.js Normal file
View file

@ -0,0 +1,8 @@
export default function () {
return {
name: "Gil.Ink",
description: "Gil's personal website",
author: "Gil Caley",
fediverseAuthor: "@gil@hol.ogra.ph",
};
}

0
src/_includes/footer.njk Normal file
View file

View file

@ -0,0 +1,11 @@
<meta charset="UTF-8" >
<meta name="viewport" content="width=device-width">
<meta name="generator" content="{{ eleventy.generator }}">
<title>{{ title or metaTitle | safe }}{% if title !== meta.name %} • {{ meta.name }}{% endif %}</title>
<meta property="og:title" content="{{ title or metaTitle | safe }}{% if title !== meta.name %} • {{ meta.name }}{% endif %}">
<meta name="author" content="{{ meta.author }}">
<meta name="description" content="{% if excerpt %}{{ excerpt }}{% else %}{{ meta.description }}{% endif %}">
<meta property="og:description" content="{% if excerpt %}{{ excerpt }}{% else %}{{ meta.description }}{% endif %}">
<meta property="og:type" content="article">
<meta property="og:url" content="https://gil.ink{{ page.url }}">
<meta name="fediverse:creator" content="{{ meta.fediverseAuthor }}">

0
src/_includes/header.njk Normal file
View file

0
src/_includes/nav.njk Normal file
View file

14
src/_layouts/base.njk Normal file
View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
{% include 'head/meta.njk' %}
<link rel="stylesheet" href="/assets/css/reset.css" type="text/css" media="screen" title="no title">
</head>
<body>
{% include 'header.njk' %}
{% include 'nav.njk' %}
<main>{{ content | safe }}</main>
{% include 'footer.njk' %}
</body>
</html>

View file

@ -47,12 +47,6 @@ h3, h4 {
text-wrap: balance;
}
/* A elements that don't have a class get default styles */
a:not([class]) {
text-decoration-skip-ink: auto;
color: currentColor;
}
/* Make images easier to work with */
img,
picture {

View file

@ -1,12 +1,16 @@
# gil.ink
---
title: 'Gil.Ink'
layout: base.njk
---
# {{ meta.name }}
---
Howdy! I'm Gil ([he/they](https://en.pronouns.page/@kalanggam)).
Howdy!
I write things, make games, and study engineering.
My name's Gil ([he/they](https://en.pronouns.page/@kalanggam)). I write things, make games, and study engineering. I like building community offline and online.
I like building community offline and online. Find me here:
Find me:
- Microblog: <a href="https://hol.ogra.ph/@gil" rel="me">@gil@hol.ogra.ph</a>
- Code: [ide.ogra.ph/gil](https://ide.ogra.ph/gil)
@ -14,6 +18,10 @@ I like building community offline and online. Find me here:
- Photos: [pixelfed.social/kalanggam](https://pixelfed.social/kalanggam)
- Reads: [bookwyrm.social/user/kalanggam](https://bookwyrm.social/user/kalanggam)
Or you can subscribe to my (upcoming) newsletter: [gilosophies.ghost.io](https://gilosophies.ghost.io)
Subscribe to my (upcoming) newsletter: [gilosophies.ghost.io](https://gilosophies.ghost.io)
---
## Publications
2022 Jul 28: ["Dear Mom, Akong Tanan"](https://www.mahalayasf.org/reflections/dear-mom-akong-tanan), _Mahalaya_