Commit f0c00131 authored by James Fenn's avatar James Fenn
Browse files

lots of metadata things

parent dce7da85
const _fs = require("fs");
const _markdown = require("markdown-it");
const _markdownAnchor = require("markdown-it-anchor");
const _yaml = require("js-yaml");
const _moment = require("moment");
......@@ -13,22 +12,22 @@ module.exports = function(eleventyConfig) {
eleventyConfig.addLayoutAlias("base", "layouts/base.liquid");
eleventyConfig.addLayoutAlias("page", "layouts/page.liquid");
eleventyConfig.addPassthroughCopy("favicon.ico");
eleventyConfig.addPassthroughCopy("assets");
eleventyConfig.addPassthroughCopy({"assets/images": "images"});
eleventyConfig.addPassthroughCopy({"assets/files": "files"});
eleventyConfig.addPassthroughCopy("browserconfig.xml");
eleventyConfig.addPassthroughCopy("manifest.json");
eleventyConfig.addPassthroughCopy("favicon.ico");
const markdownItRenderer = new _markdown({ html: true }).use(
require('markdown-it-highlightjs')
);
const markdownItRenderer = new _markdown({ html: true })
.use(require('markdown-it-prism'), { plugins: ["autoloader"] })
.use(require("markdown-it-anchor"));
eleventyConfig.addFilter("markdownify", function(str) {
if (typeof str === 'string')
return markdownItRenderer.render(str);
});
eleventyConfig.setLibrary("md", markdownItRenderer);
eleventyConfig.addFilter("where", function(array, prop, value) {
return (array || []).filter((item) => item[prop] == value);
});
......
......@@ -53,11 +53,13 @@ async function getRepoProject(repo) {
} catch (e) {}
let screenshots = (meta.screenshots || []).map((url) => `${rawUrl}/${url}`);
let icon = meta.icon ? `${rawUrl}/${meta.icon}` : null;
let project = {
id: id.toLowerCase(),
repo,
title,
icon,
screenshots,
readme,
hasWiki: false
......
{
"domainurl": "https://jfenn.me",
"name": "James Fenn",
"email": "me@jfenn.me",
"description": "Writer of bad puns and slightly better software. This website contains information about my adventures in programming, current projects, and me.",
"icon": "/assets/images/logo.png",
"icon": "/images/me.jpg",
"image": "/images/headers/snowytrees.jpg",
"links": {
"twitter": "https://twitter.com/fennifith",
"fediverse": "https://is.a.horrific.dev/@james",
......
<footer class="footer">
<div class="container">
<a class="footer-link" href="https://code.horrific.dev/james/jfenn.me">Website Source Code</a>
<a class="footer-link" href="/policies/">Privacy Policy</a>
<a class="footer-link" href="/licenses/">Open Source Licenses</a>
<a class="footer-link" href="/contact/">Contact Me</a>
<a class="footer-link" href="/policies/?web">Privacy Policy</a>
</div>
</footer>
......@@ -10,11 +10,17 @@
{% assign head_description = meta.description %}
{% if description %}
{% assign head_description = description %}
{% assign head_description = description | xml_escape %}
{% elsif renderData.description %}
{% assign head_description = renderData.description %}
{% assign head_description = renderData.description | xml_escape %}
{% endif %}
{% assign head_icon = meta.domainurl | append: meta.icon %}
{% if icon %}{% assign head_icon = icon %}{% endif %}
{% assign head_image = meta.domainurl | append: meta.image %}
{% if image %}{% assign head_image = image %}{% endif %}
<meta name="description" content="{{ head_description }}">
<meta name="author" content="{{ meta.author }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
......@@ -26,23 +32,18 @@
<meta name="application-name" content="{{ meta.name }}">
<meta name="msapplication-TileColor" content="#FFFFFF">
<meta name="msapplication-TileImage" content="/assets/images/ms-icon-144x144.png">
<meta name="msapplication-TileImage" content="/images/favicon-144.png">
<meta name="msapplication-tooltip" content="{{ meta.description }}">
<meta name="msapplication-config" content="/ieconfig.xml">
<link rel="apple-touch-icon" sizes="57x57" href="/assets/images/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/assets/images/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/assets/images/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/assets/images/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/assets/images/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/assets/images/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/assets/images/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/assets/images/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/images/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/assets/images/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="/assets/images/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/images/favicon-16x16.png">
<link rel="apple-touch-icon" sizes="70x70" href="/images/favicon-70.png">
<link rel="apple-touch-icon" sizes="144x144" href="/images/favicon-144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/images/favicon-152.png">
<link rel="icon" type="image/png" sizes="192x192" href="{{ icon | default: '/images/favicon-192.png' }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ icon | default: '/images/favicon-32.png' }}">
<link rel="icon" type="image/png" sizes="96x96" href="{{ icon | default: '/images/favicon-96.png' }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ icon | default: '/images/favicon-16.png' }}">
<link rel="shortcut icon" href="{{ icon | default: '/favicon.ico' }}">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="white">
......@@ -55,11 +56,19 @@
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{{ head_title }}">
<meta name="twitter:description" content="{{ head_description }}">
<meta name="twitter:image" content="https://jfenn.me{{ meta.icon }}">
<meta name="twitter:image" content="{{ head_icon }}">
<meta name="twitter:creator" content="@fennifith">
<meta name="twitter:site" content="@fennifith">
<meta name="og:title" content="{{ head_title }}">
<meta name="og:type" content="website">
<meta name="og:image" content="https://jfenn.me{{ meta.icon }}">
<meta name="profile:first_name" content="James">
<meta name="profile:last_name" content="Fenn">
<meta name="profile:username" content="fennifith">
<meta name="og:image" content="{{ head_image }}">
<meta name="og:url" content="{{ meta.domainurl }}{{ page.url | url }}">
<meta name="og:description" content="{{ head_description }}">
<meta name="og:locale" content="en_US">
<meta name="og:site_name" content="{{ meta.name }}">
<link href="//unpkg.com/prism-themes@1.5.0/themes/prism-ghcolors.css" rel="stylesheet">
......@@ -3,15 +3,8 @@
<html lang="en">
<head>
{% include head.liquid %}
<link href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/styles/atelier-cave-dark.min.css" rel="stylesheet">
</head>
<body class="{% if nav %}nav-container {% endif %}footer-container">
{{ content | safe }}
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/highlight.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/languages/kotlin.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/languages/java.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/languages/shell.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</body>
</html>
---
layout: base
---
<!DOCTYPE html>
{% assign project = git.projects | where: 'id', page.fileSlug | first %}
<html lang="en">
<head>
{% assign project = git.projects | where: 'id', page.fileSlug | first %}
{% include head, title: project.title, description: project.repo.description, icon: project.icon %}
</head>
<body class="nav-container footer-container">
{% include nav %}
<div class="bg-secondary py-5">
<div class="container text-center">
......@@ -62,7 +68,7 @@ layout: base
</div>
{% if project.hasWiki %}
<div class="bg-lighter py-5">
<div class="bg-lighter py-4">
<div class="container pb-2">
<div class="row">
<div class="col-12 col-md-auto align-self-center text-center">
......@@ -78,11 +84,64 @@ layout: base
</div>
{% endif %}
{% assign sections = content | split: '<hr>' %}
{% for section in sections %}
<div class="bg-{% cycle 'neutral', 'lighter' %} py-4">
<div class="container">
{{ section | safe }}
{% if tags contains "project-deprecated" %}
<div class="bg-danger-5 py-5">
<div class="container">
<div class="row">
<div class="col-12 col-md-auto align-self-center text-center">
<i class="material-icons text-danger" style="font-size: 100px;">error_outline</i>
</div>
<div class="col-12 col-md-8 align-self-center text-center text-md-left">
<h5 class="text-tertiary-1">This project is deprecated!</h5>
<p>Pull requests may still be accepted, but I am no longer actively maintaining it and proper functionality is not guaranteed.</p>
<p>If you would like to fork this project and continue development, please <a href="/contact/">contact me</a> so I can link to your fork from this page.</p>
</div>
</div>
</div>
</div>
{% endif %}
{% capture lastSection %}
<div class="row">
<div class="col-12 col-md-auto align-self-center text-center">
<i class="material-icons" style="font-size: 100px;">source</i>
</div>
<div class="col-12 col-md-8 align-self-center text-center text-md-left">
<h3 class="mb-2">Open Source</h3>
<p class="mt-0 mb-4">Browse the source code, suggest changes, or <a href="/community/">develop it yourself</a>!</p>
<a class="btn btn-primary" href="{{ project.repo.url }}">Git Repo <i class="material-icons" style="padding-bottom: 0.1rem;">chevron_right</i></a>
</div>
</div>
<div id="readme" class="card bg-light border-dark mt-5">
<div class="py-2 px-4 bg-dark">
<a class="link" href="{{ project.repo.url }}">
<i class="link-img material-icons">book</i>
<span class="link-title">README.md</span>
</a>
</div>
<div class="py-2 px-4 text">
{{ project.readme | markdownify }}
</div>
</div>
{% endcapture %}
{% assign contents = content | split: '===' %}
{% if contents.size > 1 %}
{% assign sections = content | append: '===' | append: lastSection | split: '===' %}
{% else %}
{% assign sections = lastSection | split: '===' %}
{% endif %}
{% for section in sections %}
<div class="bg-{% cycle 'neutral', 'lighter' %} py-4">
<div class="container">
{{ section | safe }}
</div>
</div>
{% endfor %}
{% include footer %}
</body>
</html>
<div class="bg-accent-5">
<div class="container my-5 text-center">
<h3 class="mb-2">Stay up to date!</h3>
<!-- TODO: insert socials -->
</div>
</div>
......@@ -33,6 +33,14 @@ a:focus > code {
filter: contrast(0) brightness(2);
}
pre > code {
line-height: 1.25rem !important;
}
pre > code * {
font-size: 0.8571428571rem !important;
}
* {
animation: none !important;
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24">
<path fill="#606060" d="M20.56 18H3.44C2.65 18 2 17.37 2 16.59V7.41C2 6.63 2.65 6 3.44 6H20.56C21.35 6 22 6.63 22 7.41V16.59C22 17.37 21.35 18 20.56 18M3.44 6.94C3.18 6.94 2.96 7.15 2.96 7.41V16.6C2.96 16.85 3.18 17.06 3.44 17.06H20.56C20.82 17.06 21.04 16.85 21.04 16.6V7.41C21.04 7.15 20.82 6.94 20.56 6.94H3.44M4.89 15.19V8.81H6.81L8.73 11.16L10.65 8.81H12.58V15.19H10.65V11.53L8.73 13.88L6.81 11.53V15.19H4.89M16.9 15.19L14 12.09H15.94V8.81H17.86V12.09H19.79L16.9 15.19" />
</svg>
favicon.ico

1.12 KB

---
permalink: /ieconfig.xml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="/images/favicon-70.png"/>
<square150x150logo src="/images/favicon-150.png"/>
<TileColor>#FFFFFF</TileColor>
</tile>
</msapplication>
</browserconfig>
---
permalink: /keybase.txt
eleventyExcludeFromCollections: true
---
==================================================================
https://keybase.io/jafenn
--------------------------------------------------------------------
I hereby claim:
* I am an admin of https://jfenn.me
* I am jafenn (https://keybase.io/jafenn) on keybase.
* I have a public key ASAqbtXJuDtfshrI2lXMoTYs_cTyYm_RQzLAKySvcfRS1Ao
To do so, I am signing this object:
{
"body": {
"key": {
"eldest_kid": "01202a6ed5c9b83b5fb21ac8da55cca1362cfdc4f2626fd14332c02b24af71f452d40a",
"host": "keybase.io",
"kid": "01202a6ed5c9b83b5fb21ac8da55cca1362cfdc4f2626fd14332c02b24af71f452d40a",
"uid": "e6494057cbb6c22d574adfd416516a19",
"username": "jafenn"
},
"merkle_root": {
"ctime": 1533769511,
"hash": "aea95ec3905ce46e2b9a61f5e7db541dae328e76ee19906f1f56f77a9a39ad2a86302bf4e353bc6432520eaf7772db293a8f4b1d6698473f74101c2ab049cfa3",
"hash_meta": "dcee4f3e0ee1753dd71013901dc84b1ee1d03ca9b049a890ac1371b022f247cf",
"seqno": 3429213
},
"service": {
"entropy": "LQFOrJFJvKWCupiCN7DT8NEe",
"hostname": "jfenn.me",
"protocol": "https:"
},
"type": "web_service_binding",
"version": 2
},
"client": {
"name": "keybase.io go client",
"version": "2.3.0"
},
"ctime": 1533769536,
"expire_in": 504576000,
"prev": "4f89596d003467aadd9d20385d17be293fb955c3d45bb00d2657a23bb9fa99d0",
"seqno": 9,
"tag": "signature"
}
which yields the signature:
hKRib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEgKm7Vybg7X7IayNpVzKE2LP3E8mJv0UMywCskr3H0UtQKp3BheWxvYWTESpcCCcQgT4lZbQA0Z6rdnSA4XRe+KT+5VcPUW7ANJleiO7n6mdDEIPdFYV0ArW3Bwf1tjHExw/2mdCDNwhB8V4mGc7uVBy2DAgHCo3NpZ8RAY4GFT1Vm3SAuveWp/kYx7QWBBPrYF5JH9KWD1DPOHthHvoBsL7gcqtfnXV25QFaKnoSnM4YMv/D4/juUFog+BahzaWdfdHlwZSCkaGFzaIKkdHlwZQildmFsdWXEIFJHLG3y/i8AdDuvEz6LYH8f8x5mLRZDmxTe9V/UJRJXo3RhZ80CAqd2ZXJzaW9uAQ==
And finally, I am proving ownership of this host by posting or
appending to this document.
View my publicly-auditable identity here: https://keybase.io/jafenn
==================================================================
\ No newline at end of file
---
permalink: /manifest.json
eleventyExcludeFromCollections: true
---
{
"name": "James Fenn",
"short_name": "James Fenn",
"icons": [{
"src": "/images/favicon-96.png",
"sizes": "96x96",
"type": "image/png"
}, {
"src": "/images/favicon-144.png",
"sizes": "144x144",
"type": "image/png"
}, {
"src": "/images/favicon-192.png",
"sizes": "192x192",
"type": "image/png"
}],
"start_url": "/",
"background_color": "#FFFFFF",
"display": "standalone",
......
---
permalink: /robots.txt
eleventyExcludeFromCollections: true
---
User-agent: *
Disallow:
Disallow: /links/*
Disallow: /redirects/*
Disallow: /about/*
Sitemap: https://jfenn.me/sitemap.xml
---
permalink: /sitemap.xml
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for page in collections.all %}
<url>
<loc>{{ site.url }}{{ page.url | url }}</loc>
<lastmod>{{ page.date.toISOString() }}</lastmod>
<changefreq>{{ page.data.changeFreq if page.data.changeFreq else "monthly" }}</changefreq>
</url>
{% endfor %}
</urlset>
---
permalink: /sw.js
eleventyExcludeFromCollections: true
---
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.6.1/workbox-sw.js');
if (workbox) {
workbox.precaching.precacheAndRoute([]);
// Cache the Google Fonts stylesheets with a stale while revalidate strategy.
workbox.routing.registerRoute(
/^https:\/\/fonts\.googleapis\.com/,
workbox.strategies.staleWhileRevalidate({
cacheName: 'google-fonts-stylesheets',
}),
);
// Cache the Google Fonts webfont files with a cache first strategy for 1 year.
workbox.routing.registerRoute(
/^https:\/\/fonts\.gstatic\.com/,
workbox.strategies.cacheFirst({
cacheName: 'google-fonts-webfonts',
plugins: [
new workbox.cacheableResponse.Plugin({
statuses: [0, 200],
}),
new workbox.expiration.Plugin({
maxAgeSeconds: 60 * 60 * 24 * 365,
}),
],
}),
);
workbox.routing.registerRoute(
// Cache CSS files
/.*\.css/,
workbox.strategies.staleWhileRevalidate({
cacheName: 'css-cache',
})
);
workbox.routing.registerRoute(
// Cache image files
/.*\.(?:png|jpg|jpeg|svg|gif)/,
workbox.strategies.cacheFirst({
cacheName: 'image-cache',
plugins: [
new workbox.expiration.Plugin({
maxEntries: 100,
maxAgeSeconds: 7 * 24 * 60 * 60,
})
],
})
);
} else {
console.log("Workbox didn't load...");
}
---
layout: default
title: FOUR HUNDRED AND FOUR
permalink: /404.html
---
<main class="container text text-center pt-5">
<h1>Error 404</h1>
<p>Unfortunately, the page you're looking for doesn't exist. Maybe you made a typo, or maybe the page was moved or deleted.</p>
<p class="mt-5"><a class="btn btn-accent" href="/">Homepage</a></p>
</main>
......@@ -24,7 +24,7 @@ permalink: /blog/
</div>
{% assign year = "" %}
{% for blog in collections.blog %}
{% for blog in collections.blog reversed %}
{% assign year2 = blog.date | date: "%Y" %}
{% if year != year2 %}
{% assign year = year2 %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment