feat: version initiale du style
This commit is contained in:
parent
51d7c0ecec
commit
57fa4ec869
|
@ -0,0 +1,32 @@
|
|||
kind: pipeline
|
||||
name: production
|
||||
when:
|
||||
event: [ push ]
|
||||
branch: [ main ]
|
||||
|
||||
clone:
|
||||
git:
|
||||
image: plugins/git
|
||||
pull: true
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: node:latest
|
||||
commands:
|
||||
- npm i
|
||||
- npx @11ty/eleventy
|
||||
|
||||
- name: deploy
|
||||
image: drillster/drone-rsync
|
||||
settings:
|
||||
hosts:
|
||||
from_secret: deploy_host
|
||||
target: /var/www/korrigan.fanstuff.garden
|
||||
source: _site/*
|
||||
user:
|
||||
from_secret: deploy_user
|
||||
key:
|
||||
from_secret: deploy_key
|
||||
when:
|
||||
branch: main
|
||||
delete: true
|
|
@ -0,0 +1,25 @@
|
|||
# Generated files
|
||||
package/generated*
|
||||
|
||||
# Ignore installed npm modules
|
||||
node_modules/
|
||||
|
||||
# Ignore build tool output, e.g. code coverage
|
||||
.nyc_output/
|
||||
coverage/
|
||||
|
||||
# Ignore API documentation
|
||||
api-docs/
|
||||
|
||||
# Ignore folders from source code editors
|
||||
.vscode
|
||||
.idea
|
||||
|
||||
# Ignore eleventy output when doing manual tests
|
||||
_site/
|
||||
|
||||
package-lock.json
|
||||
|
||||
# Ignore test files
|
||||
.cache
|
||||
test/stubs-layout-cache/_includes/*.js
|
|
@ -0,0 +1,11 @@
|
|||
module.exports = {
|
||||
title: "Korrigan",
|
||||
url: "https://korrigan.fanstuff.garden/",
|
||||
language: "fr",
|
||||
description: "Un petit fansite sur l'environnement de bureau GNOME",
|
||||
author: {
|
||||
name: "Kazhnuz",
|
||||
email: "kazhnuz@kobold.cafe",
|
||||
url: "https://kazhnuz.space/"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
layout: layouts/parent.njk
|
||||
---
|
||||
<main id="skip">
|
||||
<div>
|
||||
{{ content | safe }}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<aside>
|
||||
<div id="more-info">
|
||||
<h2>Sommaire</h2>
|
||||
{{ content | toc | safe }}
|
||||
</div>
|
||||
</aside>
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
layout: layouts/parent.njk
|
||||
---
|
||||
<main id="skip">
|
||||
<div>
|
||||
{{ content | safe }}
|
||||
</div>
|
||||
</main>
|
|
@ -0,0 +1,35 @@
|
|||
<!doctype html>
|
||||
<html lang="{{ metadata.language }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ title or metadata.title }}</title>
|
||||
<meta name="description" content="{{ description or metadata.description }}">
|
||||
|
||||
{#- Atom and JSON feeds included by default #}
|
||||
<link rel="alternate" href="/feed/feed.xml" type="application/atom+xml" title="{{ metadata.title }}">
|
||||
<link rel="alternate" href="/feed/feed.json" type="application/json" title="{{ metadata.title }}">
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.png">
|
||||
|
||||
{#- Uncomment this if you’d like folks to know that you used Eleventy to build your site! #}
|
||||
<meta name="generator" content="{{ eleventy.generator }}">
|
||||
|
||||
{%- css %}{% include "public/css/index.css" %}{% endcss %}
|
||||
<style>{% getBundle "css" %}</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<a href="#skip" class="visually-hidden">Skip to main content</a>
|
||||
<nav id="sidebar">
|
||||
{{ collections.all | eleventyNavigation | eleventyNavigationToHtml({anchorClass: "itemLink",activeAnchorClass: "active",activeListItemClass: "active",activeKey: eleventyNavigation.key, listClass: "nav", listItemClass: "item"}) | safe }}
|
||||
</nav>
|
||||
|
||||
<div class="wrapper">
|
||||
{{ content | safe }}
|
||||
</div>
|
||||
|
||||
<footer><a href="https://fanstuff.garden/"><img src="/img/fanstuffgarden.gif" alt="" /><span class="visually-hidden">Site hébergé par Fanstuff Garden.</span></a> <a href="https://creativecommons.org/licenses/by-sa/4.0/"><img src="/img/cc-by-sa.png" alt="" /><span class="visually-hidden">Tout le contenu de cette page est sous licence Creatve Common Attribution - Partage à l'identique.</span></a></footer>
|
||||
|
||||
<!-- Current page: {{ page.url | htmlBaseUrl }} -->
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
layout: layouts/parent.njk
|
||||
---
|
||||
{# Only include the syntax highlighter CSS on blog posts #}
|
||||
{%- css %}{% include "node_modules/prismjs/themes/prism-okaidia.css" %}{% endcss %}
|
||||
{%- css %}{% include "public/css/prism-diff.css" %}{%- endcss %}
|
||||
<h1>{{ title }}</h1>
|
||||
|
||||
<ul class="post-metadata">
|
||||
<li><time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time></li>
|
||||
{%- for tag in tags | filterTagList %}
|
||||
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
|
||||
<li><a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a>{%- if not loop.last %}, {% endif %}</li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
|
||||
{{ content | safe }}
|
||||
|
||||
{%- if collections.posts %}
|
||||
{%- set previousPost = collections.posts | getPreviousCollectionItem %}
|
||||
{%- set nextPost = collections.posts | getNextCollectionItem %}
|
||||
{%- if nextPost or previousPost %}
|
||||
<ul class="links-nextprev">
|
||||
{%- if previousPost %}<li>Previous: <a href="{{ previousPost.url }}">{{ previousPost.data.title }}</a></li>{% endif %}
|
||||
{%- if nextPost %}<li>Next: <a href="{{ nextPost.url }}">{{ nextPost.data.title }}</a></li>{% endif %}
|
||||
</ul>
|
||||
{%- endif %}
|
||||
{%- endif %}
|
|
@ -0,0 +1,9 @@
|
|||
{%- css %}.postlist { counter-reset: start-from {{ (postslistCounter or postslist.length) + 1 }} }{% endcss %}
|
||||
<ol reversed class="postlist">
|
||||
{% for post in postslist | reverse %}
|
||||
<li class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}">
|
||||
<a href="{{ post.url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a>
|
||||
<time class="postlist-date" datetime="{{ post.date | htmlDateString }}">{{ post.date | readableDate("LLLL yyyy") }}</time>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
|
@ -0,0 +1,4 @@
|
|||
- Réseau
|
||||
- [Press Garden](https://press.fanstuff.garden)
|
||||
- <a href="https://piaille.fr/@breezemedia" rel="me">Breeze Media (fedi)</a>
|
||||
- <a href="https://bsky.app/profile/breezemedia.bsky.social" rel="me">Breeze Media (bsky)</a>
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
layout: layouts/base.njk
|
||||
permalink: 404.html
|
||||
eleventyExcludeFromCollections: true
|
||||
---
|
||||
# Contenu non trouvé.
|
||||
|
||||
Retournez sur <a href="/">la page d'accueil</a> et tentez une autre page.
|
||||
|
||||
<!--
|
||||
|
||||
Read more: https://www.11ty.dev/docs/quicktips/not-found/
|
||||
|
||||
This will work for both GitHub pages and Netlify:
|
||||
|
||||
* https://help.github.com/articles/creating-a-custom-404-page-for-your-github-pages-site/
|
||||
* https://www.netlify.com/docs/redirects/#custom-404
|
||||
|
||||
-->
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
layout: layouts/base.njk
|
||||
---
|
||||
|
||||
# À propos
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
eleventyExcludeFromCollections: true
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
# Metadata comes from _data/metadata.js
|
||||
permalink: /feed/feed.xml
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="{{ metadata.language }}">
|
||||
<title>{{ metadata.title }}</title>
|
||||
<subtitle>{{ metadata.description }}</subtitle>
|
||||
<link href="{{ permalink | htmlBaseUrl(metadata.url) }}" rel="self"/>
|
||||
<link href="{{ metadata.url | addPathPrefixToFullUrl }}"/>
|
||||
<updated>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
|
||||
<id>{{ metadata.url }}</id>
|
||||
<author>
|
||||
<name>{{ metadata.author.name }}</name>
|
||||
<email>{{ metadata.author.email }}</email>
|
||||
</author>
|
||||
{%- for post in collections.posts | reverse %}
|
||||
{% set absolutePostUrl %}{{ post.url | htmlBaseUrl(metadata.url) }}{% endset %}
|
||||
<entry>
|
||||
<title>{{ post.data.title }}</title>
|
||||
<link href="{{ absolutePostUrl }}"/>
|
||||
<updated>{{ post.date | dateToRfc3339 }}</updated>
|
||||
<id>{{ absolutePostUrl }}</id>
|
||||
<content type="html">{{ post.templateContent | transformWithHtmlBase(absolutePostUrl, post.url) }}</content>
|
||||
</entry>
|
||||
{%- endfor %}
|
||||
</feed>
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
# Metadata comes from _data/metadata.js
|
||||
permalink: /feed/feed.json
|
||||
---
|
||||
{
|
||||
"version": "https://jsonfeed.org/version/1.1",
|
||||
"title": "{{ metadata.title }}",
|
||||
"language": "{{ metadata.language }}",
|
||||
"home_page_url": "{{ metadata.url | addPathPrefixToFullUrl }}",
|
||||
"feed_url": "{{ permalink | htmlBaseUrl(metadata.url) }}",
|
||||
"description": "{{ metadata.description }}",
|
||||
"author": {
|
||||
"name": "{{ metadata.author.name }}",
|
||||
"url": "{{ metadata.author.url }}"
|
||||
},
|
||||
"items": [
|
||||
{%- for post in collections.posts | reverse %}
|
||||
{%- set absolutePostUrl = post.url | htmlBaseUrl(metadata.url) %}
|
||||
{
|
||||
"id": "{{ absolutePostUrl }}",
|
||||
"url": "{{ absolutePostUrl }}",
|
||||
"title": "{{ post.data.title }}",
|
||||
"content_html": {% if post.templateContent %}{{ post.templateContent | transformWithHtmlBase(absolutePostUrl, post.url) | dump | safe }}{% else %}""{% endif %},
|
||||
"date_published": "{{ post.date | dateToRfc3339 }}"
|
||||
}
|
||||
{% if not loop.last %},{% endif %}
|
||||
{%- endfor %}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
layout: layouts/base.njk
|
||||
eleventyNavigation:
|
||||
key: GNOME
|
||||
order: 1
|
||||
---
|
||||
|
||||
# GNOME
|
||||
|
||||
GNOME est un environnement de bureau libre, utilisé principalement par des système d'exploitation Linux, qui vise à créer une plateforme cohérante, libre et conçue selon des critères éthiques. Ce projet accorde une grande importance à la cohérance visuelle et esthétique, et à avoir un fort travail sur le design et l'utilisabilité.
|
||||
|
||||
![](https://www.gnome.org/wp-content/uploads/2023/09/GNOME45-workspace.webp)
|
||||
|
||||
GNOME est également connu pour ne pas forcément être orienté sur avoir énormément de fonctionnalités dédiées aux power-users, mais plutôt pour fournir un environnement utilisables par le plus grand nombre, quitte à dévier un peu des habitudes des grands environnements de bureaux.
|
||||
|
||||
## GNOME est…
|
||||
|
||||
- **Libre** : GNOME respecte les 4 libertée fondée sur le projet GNU, et utilise une licence Copyleft.
|
||||
- **Orienté UX** : GNOME possède une équipe de design et procède à des études pour définir certains de leurs choix UX
|
||||
- **Distraction Free** : GNOME vise à éliminer les distractions, afin de fournir un environnement plus "calme", notamment utile pour les personnes neurodivergeantes
|
||||
- **Communautaire** : GNOME est réalisé par une communautée diversifiée, travaillant à tout les niveaux du stack
|
||||
- **Accessible** : GNOME réalise un travail d'accessibilité sur son bureau, et de faire avancer l'accessibilité en général sur le monde du libre
|
||||
- **Internationnal** : GNOME est traduit dans de nombreuses langue, et ses devs et autres viennent de très nombreux pays.
|
||||
- **Moderne** : GNOME vise à rester à jour en terme de technologie et d'UX
|
||||
|
||||
## La fondation GNOME
|
||||
|
||||
Le projet GNOME est supervisé par une fondation, la [fondation GNOME](https://foundation.gnome.org/). Cependant, ce n'est pas elle qui dirige son développement, et elle ne forme pas une hiérarchie verticale disant aux développeurs ce qu'ils doivent faire. Elle s'occupe surtout d'organiser le développement et de faire en sorte de fournir de l'aide et du support à des initiatives, souvent avec l'aide de fonds.
|
||||
|
||||
Parmis les initiatives récentes ayant pu aider le projet GNOME, il y a eut l'[application d'un projet à la Sovereign Tech Fund](https://foundation.gnome.org/2023/11/09/gnome-recognized-as-public-interest-infrastructure/) afin de faire avancer de nombreuses parties du projet, notamment en terme d'accessibilité.
|
||||
|
||||
## Crédit et source
|
||||
|
||||
Cette page est en grande partie reprise de
|
||||
- La page [GNOME de feu gnomefr.org](https://web.archive.org/web/20190506135822/http://gnomefr.org/apropos)
|
||||
- Le [site officiel de GNOME](https://gnome.org)
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
layout: layouts/base.njk
|
||||
eleventyNavigation:
|
||||
key: Obtenir GNOME
|
||||
parent: GNOME
|
||||
order: 1
|
||||
---
|
||||
|
||||
# Obtenir GNOME
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
layout: layouts/home.njk
|
||||
eleventyNavigation:
|
||||
key: Accueil
|
||||
order: 0
|
||||
---
|
||||
|
||||
<header>
|
||||
<h1>
|
||||
<a href="/" class="home-link">{{ metadata.title }}</a>
|
||||
</h1>
|
||||
</header>
|
||||
|
||||
## Bienvenue sur {{ metadata.title }} !
|
||||
|
||||
Ce site est un petit site **non-officiel** francophone parlant de l'environnement de bureau GNOME, pour permettre aux gens intéressé par ce projet d'en découvrir plus, ainsi que de rappeller l'importance de ce genre de petit site non-officiel. Il est inspiré d'anciens sites francophones tel que [gnomefr.org](https://web.archive.org/web/20170610001247/http://gnomefr.org/) (aujourd'hui disparu)
|
||||
|
||||
<div class="quadrillage">
|
||||
|
||||
<div>
|
||||
|
||||
## GNOME
|
||||
|
||||
Le projet GNOME vise à créer une interface complète, libre et simple, ainsi qu'un ecosystème d'application intéressant à la fois pour les développeur⋅euse et les utilisateur⋅ices. GNOME est un Logiciel Libre et vise à offrir à ses utilisateurs une interface simple et un système qui ne contrôle pas leurs données.
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
## Un univers riche
|
||||
|
||||
Le projet GNOME à inspiré par mal de développeur⋅euse à créer des logiciels à l'aide de ses technologies et règles de design, créant un écosystème riche et pleins de surprises. Mettant le focus sur des applications simple d'utilisation et légère, vous y trouverez notamment beaucoup de petit utilitaires.
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
## Dernière publication officielles
|
||||
|
||||
Lorem ipsum
|
||||
|
||||
## Dernières publications sur Planet-GNOME
|
||||
|
||||
Lorem ipsum
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
permalink: /sitemap.xml
|
||||
eleventyExcludeFromCollections: true
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{%- for page in collections.all %}
|
||||
{% set absoluteUrl %}{{ page.url | htmlBaseUrl(metadata.url) }}{% endset %}
|
||||
<url>
|
||||
<loc>{{ absoluteUrl }}</loc>
|
||||
<lastmod>{{ page.date | htmlDateString }}</lastmod>
|
||||
</url>
|
||||
{%- endfor %}
|
||||
</urlset>
|
|
@ -0,0 +1,50 @@
|
|||
function eleventyComputedPermalink() {
|
||||
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
|
||||
// `addGlobalData` acts like a global data file and runs the top level function it receives.
|
||||
return (data) => {
|
||||
// Always skip during non-watch/serve builds
|
||||
if(data.draft && !process.env.BUILD_DRAFTS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return data.permalink;
|
||||
}
|
||||
};
|
||||
|
||||
function eleventyComputedExcludeFromCollections() {
|
||||
// When using `addGlobalData` and you *want* to return a function, you must nest functions like this.
|
||||
// `addGlobalData` acts like a global data file and runs the top level function it receives.
|
||||
return (data) => {
|
||||
// Always exclude from non-watch/serve builds
|
||||
if(data.draft && !process.env.BUILD_DRAFTS) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return data.eleventyExcludeFromCollections;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports.eleventyComputedPermalink = eleventyComputedPermalink;
|
||||
module.exports.eleventyComputedExcludeFromCollections = eleventyComputedExcludeFromCollections;
|
||||
|
||||
module.exports = eleventyConfig => {
|
||||
eleventyConfig.addGlobalData("eleventyComputed.permalink", eleventyComputedPermalink);
|
||||
eleventyConfig.addGlobalData("eleventyComputed.eleventyExcludeFromCollections", eleventyComputedExcludeFromCollections);
|
||||
|
||||
let logged = false;
|
||||
eleventyConfig.on("eleventy.before", ({runMode}) => {
|
||||
let text = "Excluding";
|
||||
// Only show drafts in serve/watch modes
|
||||
if(runMode === "serve" || runMode === "watch") {
|
||||
process.env.BUILD_DRAFTS = true;
|
||||
text = "Including";
|
||||
}
|
||||
|
||||
// Only log once.
|
||||
if(!logged) {
|
||||
console.log( `[11ty/eleventy-base-blog] ${text} drafts.` );
|
||||
}
|
||||
|
||||
logged = true;
|
||||
});
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
const path = require("path");
|
||||
const eleventyImage = require("@11ty/eleventy-img");
|
||||
|
||||
module.exports = eleventyConfig => {
|
||||
function relativeToInputPath(inputPath, relativeFilePath) {
|
||||
let split = inputPath.split("/");
|
||||
split.pop();
|
||||
|
||||
return path.resolve(split.join(path.sep), relativeFilePath);
|
||||
}
|
||||
|
||||
// Eleventy Image shortcode
|
||||
// https://www.11ty.dev/docs/plugins/image/
|
||||
eleventyConfig.addAsyncShortcode("image", async function imageShortcode(src, alt, widths, sizes) {
|
||||
// Full list of formats here: https://www.11ty.dev/docs/plugins/image/#output-formats
|
||||
// Warning: Avif can be resource-intensive so take care!
|
||||
let formats = ["avif", "webp", "auto"];
|
||||
let file = relativeToInputPath(this.page.inputPath, src);
|
||||
let metadata = await eleventyImage(file, {
|
||||
widths: widths || ["auto"],
|
||||
formats,
|
||||
outputDir: path.join(eleventyConfig.dir.output, "img"), // Advanced usage note: `eleventyConfig.dir` works here because we’re using addPlugin.
|
||||
});
|
||||
|
||||
// TODO loading=eager and fetchpriority=high
|
||||
let imageAttributes = {
|
||||
alt,
|
||||
sizes,
|
||||
loading: "lazy",
|
||||
decoding: "async",
|
||||
};
|
||||
return eleventyImage.generateHTML(metadata, imageAttributes);
|
||||
});
|
||||
};
|
|
@ -0,0 +1,146 @@
|
|||
const { DateTime } = require("luxon");
|
||||
const markdownItAnchor = require("markdown-it-anchor");
|
||||
|
||||
const pluginRss = require("@11ty/eleventy-plugin-rss");
|
||||
const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
|
||||
const pluginBundle = require("@11ty/eleventy-plugin-bundle");
|
||||
const pluginNavigation = require("@11ty/eleventy-navigation");
|
||||
const { EleventyRenderPlugin } = require("@11ty/eleventy");
|
||||
const { EleventyHtmlBasePlugin } = require("@11ty/eleventy");
|
||||
|
||||
const pluginDrafts = require("./eleventy.config.drafts.js");
|
||||
const pluginImages = require("./eleventy.config.images.js");
|
||||
const pluginTOC = require('eleventy-plugin-toc');
|
||||
|
||||
module.exports = function(eleventyConfig) {
|
||||
// Copy the contents of the `public` folder to the output folder
|
||||
// For example, `./public/css/` ends up in `_site/css/`
|
||||
eleventyConfig.addPassthroughCopy({
|
||||
"./public/": "/",
|
||||
"./node_modules/prismjs/themes/prism-okaidia.css": "/css/prism-okaidia.css"
|
||||
});
|
||||
|
||||
// Run Eleventy when these files change:
|
||||
// https://www.11ty.dev/docs/watch-serve/#add-your-own-watch-targets
|
||||
|
||||
// Watch content images for the image pipeline.
|
||||
eleventyConfig.addWatchTarget("content/**/*.{svg,webp,png,jpeg}");
|
||||
|
||||
// App plugins
|
||||
eleventyConfig.addPlugin(pluginDrafts);
|
||||
eleventyConfig.addPlugin(pluginImages);
|
||||
|
||||
// Official plugins
|
||||
eleventyConfig.addPlugin(pluginRss);
|
||||
eleventyConfig.addPlugin(pluginSyntaxHighlight, {
|
||||
preAttributes: { tabindex: 0 }
|
||||
});
|
||||
eleventyConfig.addPlugin(pluginNavigation);
|
||||
eleventyConfig.addPlugin(EleventyHtmlBasePlugin);
|
||||
eleventyConfig.addPlugin(EleventyRenderPlugin);
|
||||
eleventyConfig.addPlugin(pluginBundle);
|
||||
eleventyConfig.addPlugin(pluginTOC, {
|
||||
tags: ['h2'],
|
||||
wrapper: 'div'
|
||||
});
|
||||
|
||||
// Filters
|
||||
eleventyConfig.addFilter("readableDate", (dateObj, format, zone) => {
|
||||
// Formatting tokens for Luxon: https://moment.github.io/luxon/#/formatting?id=table-of-tokens
|
||||
return DateTime.fromJSDate(dateObj, { zone: zone || "utc" }).toFormat(format || "dd LLLL yyyy");
|
||||
});
|
||||
|
||||
eleventyConfig.addFilter('htmlDateString', (dateObj) => {
|
||||
// dateObj input: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string
|
||||
return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toFormat('yyyy-LL-dd');
|
||||
});
|
||||
|
||||
// Get the first `n` elements of a collection.
|
||||
eleventyConfig.addFilter("head", (array, n) => {
|
||||
if(!Array.isArray(array) || array.length === 0) {
|
||||
return [];
|
||||
}
|
||||
if( n < 0 ) {
|
||||
return array.slice(n);
|
||||
}
|
||||
|
||||
return array.slice(0, n);
|
||||
});
|
||||
|
||||
// Return the smallest number argument
|
||||
eleventyConfig.addFilter("min", (...numbers) => {
|
||||
return Math.min.apply(null, numbers);
|
||||
});
|
||||
|
||||
// Return all the tags used in a collection
|
||||
eleventyConfig.addFilter("getAllTags", collection => {
|
||||
let tagSet = new Set();
|
||||
for(let item of collection) {
|
||||
(item.data.tags || []).forEach(tag => tagSet.add(tag));
|
||||
}
|
||||
return Array.from(tagSet);
|
||||
});
|
||||
|
||||
eleventyConfig.addFilter("filterTagList", function filterTagList(tags) {
|
||||
return (tags || []).filter(tag => ["all", "nav", "post", "posts"].indexOf(tag) === -1);
|
||||
});
|
||||
|
||||
// Customize Markdown library settings:
|
||||
eleventyConfig.amendLibrary("md", mdLib => {
|
||||
mdLib.use(markdownItAnchor, {
|
||||
permalink: markdownItAnchor.permalink.ariaHidden({
|
||||
placement: "after",
|
||||
class: "header-anchor",
|
||||
symbol: "#",
|
||||
ariaHidden: false,
|
||||
}),
|
||||
level: [1,2,3,4],
|
||||
slugify: eleventyConfig.getFilter("slugify")
|
||||
});
|
||||
});
|
||||
|
||||
// Features to make your build faster (when you need them)
|
||||
|
||||
// If your passthrough copy gets heavy and cumbersome, add this line
|
||||
// to emulate the file copy on the dev server. Learn more:
|
||||
// https://www.11ty.dev/docs/copy/#emulate-passthrough-copy-during-serve
|
||||
|
||||
// eleventyConfig.setServerPassthroughCopyBehavior("passthrough");
|
||||
|
||||
return {
|
||||
// Control which files Eleventy will process
|
||||
// e.g.: *.md, *.njk, *.html, *.liquid
|
||||
templateFormats: [
|
||||
"md",
|
||||
"njk",
|
||||
"html",
|
||||
"liquid",
|
||||
],
|
||||
|
||||
// Pre-process *.md files with: (default: `liquid`)
|
||||
markdownTemplateEngine: "njk",
|
||||
|
||||
// Pre-process *.html files with: (default: `liquid`)
|
||||
htmlTemplateEngine: "njk",
|
||||
|
||||
// These are all optional:
|
||||
dir: {
|
||||
input: "content", // default: "."
|
||||
includes: "../_includes", // default: "_includes"
|
||||
data: "../_data", // default: "_data"
|
||||
output: "_site"
|
||||
},
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// Optional items:
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
// If your site deploys to a subdirectory, change `pathPrefix`.
|
||||
// Read more: https://www.11ty.dev/docs/config/#deploy-to-a-subdirectory-with-a-path-prefix
|
||||
|
||||
// When paired with the HTML <base> plugin https://www.11ty.dev/docs/plugins/html-base/
|
||||
// it will transform any absolute URLs in your HTML to include this
|
||||
// folder name and does **not** affect where things go in the output folder.
|
||||
pathPrefix: "/",
|
||||
};
|
||||
};
|
|
@ -0,0 +1,24 @@
|
|||
[build]
|
||||
publish = "_site"
|
||||
command = "npm run build"
|
||||
|
||||
[[plugins]]
|
||||
|
||||
# Opt-in to the Netlify Lighthouse plugin (choose one):
|
||||
|
||||
# 1. Go to your site on https://app.netlify.com and navigate to the Integrations tab, search for the `Lighthouse` plugin
|
||||
# 2. Or via `npm install -D @netlify/plugin-lighthouse`
|
||||
|
||||
# Read more: https://github.com/netlify/netlify-plugin-lighthouse
|
||||
|
||||
package = "@netlify/plugin-lighthouse"
|
||||
|
||||
# optional, fails build when a category is below a threshold
|
||||
[plugins.inputs.thresholds]
|
||||
performance = 1.0
|
||||
accessibility = 1.0
|
||||
best-practices = 1.0
|
||||
seo = 1.0
|
||||
|
||||
[plugins.inputs]
|
||||
output_path = "reports/lighthouse/index.html"
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
"name": "eleventy-base-blog",
|
||||
"version": "8.0.0",
|
||||
"description": "A starter repository for a blog web site using the Eleventy site generator.",
|
||||
"scripts": {
|
||||
"build": "npx @11ty/eleventy",
|
||||
"build-ghpages": "npx @11ty/eleventy --pathprefix=/eleventy-base-blog/",
|
||||
"start": "npx @11ty/eleventy --serve --quiet",
|
||||
"debug": "DEBUG=Eleventy* npx @11ty/eleventy",
|
||||
"debugstart": "DEBUG=Eleventy* npx @11ty/eleventy --serve --quiet",
|
||||
"benchmark": "DEBUG=Eleventy:Benchmark* npx @11ty/eleventy"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/11ty/eleventy-base-blog.git"
|
||||
},
|
||||
"author": {
|
||||
"name": "Zach Leatherman",
|
||||
"email": "zachleatherman@gmail.com",
|
||||
"url": "https://zachleat.com/"
|
||||
},
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/11ty"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/11ty/eleventy-base-blog/issues"
|
||||
},
|
||||
"homepage": "https://github.com/11ty/eleventy-base-blog#readme",
|
||||
"devDependencies": {
|
||||
"@11ty/eleventy": "^2.0.1",
|
||||
"@11ty/eleventy-img": "^3.1.0",
|
||||
"@11ty/eleventy-navigation": "^0.3.5",
|
||||
"@11ty/eleventy-plugin-bundle": "^1.0.4",
|
||||
"@11ty/eleventy-plugin-rss": "^1.2.0",
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
|
||||
"luxon": "^3.3.0",
|
||||
"markdown-it-anchor": "^8.6.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"eleventy-plugin-toc": "^1.1.5"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,280 @@
|
|||
@font-face {
|
||||
font-family: "NiseSegaSonic";
|
||||
src: local("NiseSegaSonic"),
|
||||
url("/fonts/NiseSegaSonic.ttf") format("truetype");
|
||||
}
|
||||
|
||||
:root {
|
||||
--color-gray-20: #e0e0e0;
|
||||
--color-gray-50: #C0C0C0;
|
||||
--color-gray-90: #2f2f2f;
|
||||
|
||||
/* --text-color is assigned to --color-gray-_ above */
|
||||
--text-color-link: #1c71d8;
|
||||
--text-color-link-active: #1c71d8;
|
||||
--text-color-link-visited: #1c71d8;
|
||||
|
||||
--background-color: #fafafa;
|
||||
--background-menu: #ebebeb;
|
||||
|
||||
--text-color: var(--color-gray-90);
|
||||
|
||||
--font-family: -apple-system, "Cantarell", system-ui, sans-serif;
|
||||
--font-family-monospace: Consolas, Menlo, Monaco, Andale Mono WT, Andale Mono, Lucida Console, Lucida Sans Typewriter, DejaVu Sans Mono, Bitstream Vera Sans Mono, Liberation Mono, Nimbus Mono L, Courier New, Courier, monospace;
|
||||
--font-family-logo:"NiseSegaSonic", system-ui, sans-serif;
|
||||
--font-family-title:vipnagorgialla, system-ui, sans-serif;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0 auto;
|
||||
min-height:100%;
|
||||
font-family: var(--font-family);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
body {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 800px;
|
||||
margin: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
html {
|
||||
overflow-y: scroll;
|
||||
background-color: var(--background-color);
|
||||
}
|
||||
|
||||
/* https://www.a11yproject.com/posts/how-to-hide-content/ */
|
||||
.visually-hidden {
|
||||
clip: rect(0 0 0 0);
|
||||
clip-path: inset(50%);
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
a[href] {
|
||||
color: var(--text-color-link);
|
||||
text-decoration: underline dashed 1px;
|
||||
border-radius: 0.1rem;
|
||||
text-decoration: underline dashed 1px;
|
||||
text-underline-offset: 0.1rem;
|
||||
}
|
||||
a[href]:visited {
|
||||
color: var(--text-color-link-visited);
|
||||
}
|
||||
a[href]:hover,
|
||||
a[href]:active {
|
||||
color: var(--text-color-link-active);
|
||||
background-color: rgba(0,0,0,0.1);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
opacity: 75%;
|
||||
border-left: 3px solid currentColor;
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
/* Direct Links / Markdown Headers */
|
||||
.header-anchor {
|
||||
text-decoration: none;
|
||||
font-style: normal;
|
||||
font-size: 1em;
|
||||
margin-left: .1em;
|
||||
}
|
||||
a[href].header-anchor,
|
||||
a[href].header-anchor:visited {
|
||||
color: transparent;
|
||||
}
|
||||
a[href].header-anchor:focus,
|
||||
a[href].header-anchor:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
a[href].header-anchor:focus,
|
||||
:hover > a[href].header-anchor {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
header {
|
||||
background:center center url("/img/back2.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
border-radius:3px;
|
||||
height:240px;
|
||||
box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.8);
|
||||
display:flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
header h1 a[href] {
|
||||
font-size:4rem;
|
||||
text-shadow: 0px 2px 3px rgba(0,0,0,0.3);
|
||||
font-weight: 900;
|
||||
color:white!important;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
display: block;
|
||||
font-family: var(--font-family);
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.quadrillage {
|
||||
display:grid;
|
||||
grid-template-columns : 1fr 1fr;
|
||||
column-gap: 1rem;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
position: fixed;
|
||||
top: 24px;
|
||||
left: 24px;
|
||||
border:1px solid #dbdbdb;
|
||||
background-color: var(--background-menu);
|
||||
border-radius:9px;
|
||||
padding:12px;
|
||||
}
|
||||
|
||||
#sidebar > ul > li {
|
||||
margin:0;
|
||||
padding:3px;
|
||||
}
|
||||
|
||||
main {
|
||||
background-color: var(--background-color);
|
||||
line-height:1.5rem;
|
||||
width: 800px;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
main img {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.card,
|
||||
#sidebar ul>li,
|
||||
#links ul>li {
|
||||
background-color: var(--background-menu);
|
||||
}
|
||||
|
||||
#sidebar ul > li,
|
||||
#links ul > li {
|
||||
list-style: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
#more-info ol > li,
|
||||
#more-info ul > li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#sidebar ul > li li,
|
||||
#links ul>li li,
|
||||
#more-info li {
|
||||
border-radius:0px;
|
||||
padding:0px;
|
||||
margin:0px;
|
||||
font-weight: normal;
|
||||
border:0;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
ul.nav,
|
||||
#sidebar ul li ul,
|
||||
#links ul li ul,
|
||||
#more-info ol {
|
||||
padding:0;
|
||||
margin:0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#sidebar ul li a,
|
||||
#links ul li a,
|
||||
#more-info ol li a {
|
||||
display:block;
|
||||
width:100%;
|
||||
text-decoration:dashed;
|
||||
color:var(--text-color);
|
||||
border-radius:3px;
|
||||
padding:6px;
|
||||
}
|
||||
|
||||
#links ul li > p {
|
||||
padding: 3px;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
#more-info h2 {
|
||||
padding: 3px;
|
||||
margin: 0;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
#sidebar ul li li a,
|
||||
#links ul li li a,
|
||||
#more-info ol li a {
|
||||
padding-left:18px;
|
||||
}
|
||||
|
||||
#sidebar ul li a.active,
|
||||
#more-info ol li a.active {
|
||||
background-color:rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
#sidebar ul li a:hover,
|
||||
#links ul li a:hover,
|
||||
#more-info ol li a:hover {
|
||||
background-color:rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
aside {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: -264px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#more-info {
|
||||
position: sticky;
|
||||
top:12px;
|
||||
border-left: 3px solid #3584e4;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
#more-info,
|
||||
#sidebar {
|
||||
min-width:240px;
|
||||
width:240px;
|
||||
}
|
||||
|
||||
footer {
|
||||
text-align:right;
|
||||
margin: auto;
|
||||
width: 800px;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: none;
|
||||
}
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 626 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in New Issue