-[
- {
+{
+ "x": {
"title": "𝕏",
- "url": "https://x.com/CameronOtsuka"
+ "url": "https://x.com/CameronOtsuka",
+ "username": "@CameronOtsuka"
},
- {
+ "activitypub": {
"title": "ActivityPub",
- "url": "https://otsuka.social/@cameron"
+ "url": "https://otsuka.social/@cameron",
+ "username": "@cameron@otsuka.social"
},
- {
+ "bluesky": {
"title": "Bluesky",
- "url": "https://bsky.app/profile/otsuka.haus"
+ "url": "https://bsky.app/profile/otsuka.haus",
+ "username": "@otsuka.haus"
},
- {
+ "nostr": {
"title": "Nostr",
- "url": "https://primal.net/profile/npub1hzssq7wewjztvglpdvku92htx3sv2x5r9ycvqhvl9xrtt5fn629s3np693"
+ "url": "https://primal.net/profile/npub1hzssq7wewjztvglpdvku92htx3sv2x5r9ycvqhvl9xrtt5fn629s3np693",
+ "username": "cameron@otsuka.haus"
},
- {
+ "linkedin": {
"title": "LinkedIn",
- "url": "https://www.linkedin.com/in/cotsuka"
+ "url": "https://www.linkedin.com/in/cotsuka",
+ "username": "cotsuka"
},
- {
+ "github": {
"title": "GitHub",
- "url": "https://github.com/cotsuka"
+ "url": "https://github.com/cotsuka",
+ "username": "cotsuka"
}
-]
\ No newline at end of file
+}
\ No newline at end of file
<meta name="description" property="og:description" content="{{ description or metadata.subtitle }}" />
<meta name="author" content="{{ metadata.author.name }}" />
<meta name="generator" content="{{ eleventy.generator }}" />
- <meta name="fediverse:creator" content="@cameron@otsuka.social" />
+ <meta name="fediverse:creator" content="{{ socials.activitypub.username }}" />
<meta name="twitter:card" content="summary" />
- <meta name="twitter:creator" content="@CameronOtsuka" />
+ <meta name="twitter:creator" content="{{ socials.x.username }}" />
<meta name="twitter:title" content="{{ title }}" />
<meta name="twitter:description" content="{{ description or metadata.subtitle }}" />
<meta name="twitter:image" property="og:image" content="https://v1.screenshot.11ty.dev/{{ metadata.base | urlencode }}{{ page.url | urlencode }}/opengraph/9:16/" />
<meta property="og:url" content="{{ metadata.base }}{{ page.url }}" />
<meta property="og:site_name" content="{{ metadata.title }}" />
<meta property="og:updated_time" content="{{ updated | isoDate }}" />
+ {%- set categories = metadata.categories | keys %}
{%- if tags %}
<meta property="og:type" content="article" />
<meta property="article:published_time" content="{{ date | isoDate }}" />
<meta property="article:modified_time" content="{{ updated | isoDate }}" />
<meta property="article:author" content="{{ metadata.author.name }}" />
- {%- for tag in tags | reject("equalto", "articles") | reject("equalto", "links") | reject("equalto", "reviews") %}
+ {%- for tag in tags | notIn(categories) %}
<meta property="article:tag" content="{{ tag }}" />
{%- endfor %}
{%- else %}
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<link rel="canonical" href="{{ metadata.base }}{{ page.url }}" />
<link rel="alternate" href="/feed.xml" type="application/atom+xml" title="{{ metadata.title }}" />
- <link rel="alternate" href="/feeds/articles.xml" type="application/atom+xml" title="{{ metadata.title }} - Articles" />
- <link rel="alternate" href="/feeds/links.xml" type="application/atom+xml" title="{{ metadata.title }} - Links" />
- <link rel="alternate" href="/feeds/reviews.xml" type="application/atom+xml" title="{{ metadata.title }} - Reviews" />
+ {%- for category in categories %}
+ <link rel="alternate" href="/feeds/{{ category }}.xml" type="application/atom+xml" title="{{ metadata.title }} - {{ category | capitalize }}" />
+ {%- endfor %}
<link rel="preload" href="/fonts/PublicSans-Bold.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="/fonts/PublicSans-BoldItalic.woff2" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="/fonts/PublicSans-Italic.woff2" as="font" type="font/woff2" crossorigin />
<footer>
<address>
<menu>
- {%- for social in socials %}
+ {%- for _, social in socials %}
<li><a href="{{ social.url }}" rel="me">{{ social.title }}</a></li>
{%- endfor %}
</menu>
eleventyConfig.addFilter("isoDate", (dateObj) => {
return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toISO();
});
+ eleventyConfig.addFilter("keys", function (obj) {
+ return Object.keys(obj);
+ });
eleventyConfig.addFilter("min", (...numbers) => {
return Math.min.apply(null, numbers);
});
+ eleventyConfig.addFilter("notIn", (stringList, rejectList) => {
+ return stringList.filter(str => !rejectList.includes(str));
+ });
eleventyConfig.addFilter("startsWith", (str, prefix) => {
return str.startsWith(prefix);
});