]> git.otsuka.systems Git - cotsuka.github.io/commitdiff
add links category
authorCameron Otsuka <cameron@otsuka.haus>
Thu, 30 Jan 2025 02:55:43 +0000 (18:55 -0800)
committerCameron Otsuka <cameron@otsuka.haus>
Thu, 30 Jan 2025 02:55:43 +0000 (18:55 -0800)
_includes/components/activitylist.njk
_includes/components/linkslist.njk [new file with mode: 0644]
_includes/layouts/base.njk
_includes/layouts/link.njk [new file with mode: 0644]
content/links.njk [new file with mode: 0644]
content/links/links.json [new file with mode: 0644]
content/links/were-ripping-off-the-cuff-about-dollar-rallying-rates-stargate-and-deepseek-listen-in.md [new file with mode: 0644]
eleventy.config.js

index b92a70b5f909719c888354fb3cde3708cef7e6d1..b0a6788f9fa64d7239ace925a47e45f434461f9c 100644 (file)
@@ -12,6 +12,8 @@
             <small class="collectiontag">article</small>
         {% elseif "reviews" in item.data.tags %}
             <small class="collectiontag">review</small>
+        {% elseif "links" in item.data.tags %}
+            <small class="collectiontag">link</small>
         {% endif %}
         {{ item.data.description }}
     </dd>
diff --git a/_includes/components/linkslist.njk b/_includes/components/linkslist.njk
new file mode 100644 (file)
index 0000000..b7c921d
--- /dev/null
@@ -0,0 +1,14 @@
+<dl>
+{% if maxPosts %}
+    {% set numPosts = collections.links | length | min(maxPosts) %}
+    {% set linkslist = collections.links | reverse | head(numPosts) %}
+{% else %}
+    {% set linkslist = collections.links | reverse %}
+{% endif %}
+{%- for link in linkslist %}
+    <dt><a href="{{ link.url }}">{{ link.data.title }}</a></dt>
+    <dd>
+        {{ link.data.description }}
+    </dd>
+{%- endfor %}
+</dl>
\ No newline at end of file
index c695c71d99b646f6646e8335c30aa48a9fc94ba4..a2f2bbf387d569882ca4aa06c3c75ff21b7d14b8 100644 (file)
@@ -61,6 +61,7 @@
             <h1><a href="/">{{ metadata.title }}</a></h1>
             <menu>
                 <li><a href="/articles">Articles</a></li>
+                <li><a href="/links">Links</a></li>
                 <li><a href="/reviews">Reviews</a></li>
             </menu>
         </nav>
diff --git a/_includes/layouts/link.njk b/_includes/layouts/link.njk
new file mode 100644 (file)
index 0000000..a76c87c
--- /dev/null
@@ -0,0 +1,26 @@
+---
+layout: layouts/base.njk
+---
+
+<h1><a href="{{ href }}">{{ title }}</a></h1>
+
+<details>
+       <summary>Metadata</summary>
+       <ul>
+               <li>Published: <time datetime="{{ page.date | htmlDateString }}">{{ page.date | htmlDateString }}</time></li>
+               <li>Description: {{ description }}</li>
+               <li>Tags: {{ tags | reject("equalto", "links") | sort | join(", ") }}</li>
+               {% if posse %}
+                       <li>
+                               Also Posted To: 
+                               {% for posse_location, posse_url in posse %}
+                                       <a href="{{ posse_url }}">{{ posse_location }}</a>
+                               {% endfor %}
+                       </li>
+               {% endif %}
+       </ul>
+</details>
+
+<article>
+       {{ content | safe }}
+</article>
diff --git a/content/links.njk b/content/links.njk
new file mode 100644 (file)
index 0000000..c25782b
--- /dev/null
@@ -0,0 +1,8 @@
+---
+layout: layouts/base.njk
+title: Links
+---
+
+<h1>Links</h1>
+
+{% include "components/linkslist.njk" %}
diff --git a/content/links/links.json b/content/links/links.json
new file mode 100644 (file)
index 0000000..68d72f0
--- /dev/null
@@ -0,0 +1,5 @@
+{
+    "tags": ["links"],
+    "layout": "layouts/link.njk",
+    "permalink": "links/{{ date | htmlDateString }}-{{ title | slugify }}/"
+}
\ No newline at end of file
diff --git a/content/links/were-ripping-off-the-cuff-about-dollar-rallying-rates-stargate-and-deepseek-listen-in.md b/content/links/were-ripping-off-the-cuff-about-dollar-rallying-rates-stargate-and-deepseek-listen-in.md
new file mode 100644 (file)
index 0000000..e8d08c7
--- /dev/null
@@ -0,0 +1,17 @@
+---
+title: "we're ripping off-the-cuff about dollar rallying, rates, stargate, and deepseek. listen in 👇"
+href: "https://x.com/CameronOtsuka/status/1882563050374631488"
+date: 2025-01-23
+modified: 2025-01-23
+description: Build Weekly Roundup 2025-01-23
+tags:
+- ai
+- macro
+posse:
+  𝕏: https://x.com/CameronOtsuka/status/1882563050374631488
+---
+
+> BUILD WEEKLY ROUNDUP https://x.com/i/broadcasts/1YqGovvolLkKv
+>
+> — Matt Dines (@LeveredUSTs) [January 23, 2025](https://twitter.com/LeveredUSTs/status/1882561482535436387)
+
index 86e29236e94cd6b111e2093a602e47b2f58bb616..ff98001bc10887d55902b4addcf4f7db414b1cca 100644 (file)
@@ -10,8 +10,9 @@ const path = require("path");
 
 let markdownOptions = {
        html: true,
-       breaks: true,
+       breaks: false,
        linkify: true,
+       typographer: true,
 };
 let mdLibrary = markdownIt(markdownOptions).use(markdownItFootnote);
 
@@ -34,6 +35,7 @@ module.exports = function (eleventyConfig) {
        eleventyConfig.addCollection("activities", function(collectionApi) {
                let collectionSubset = [
                        ...collectionApi.getFilteredByTag("articles"),
+                       ...collectionApi.getFilteredByTag("links"),
                        ...collectionApi.getFilteredByTag("reviews"),
                ];
                let sortedSubset = collectionSubset.sort(function(a, b) {
@@ -126,6 +128,22 @@ module.exports = function (eleventyConfig) {
                        author: globalMetadata['author'],
                },
        });
+       eleventyConfig.addPlugin(feedPlugin, {
+               type: "atom",
+               outputPath: "/feeds/links.xml",
+               inputPath: "eleventy-plugin-feed-cameron-otsuka-links-atom.njk",
+               collection: {
+                       name: "links",
+                       limit: 10,
+               },
+               metadata: {
+                       language: globalMetadata['language'],
+                       title: globalMetadata['title'].concat(" - Links"),
+                       subtitle: globalMetadata['subtitle'],
+                       base: globalMetadata['base'],
+                       author: globalMetadata['author'],
+               },
+       });
        eleventyConfig.addPlugin(feedPlugin, {
                type: "atom",
                outputPath: "/feeds/reviews.xml",