最後活躍 1761046729

travisshears's Avatar travisshears 已修改 1761046729. 還原成這個修訂版本

2 files changed, 48 insertions

now.astro(檔案已創建)

@@ -0,0 +1,28 @@
1 + ---
2 + import BasePage from "../layouts/BasePage.astro";
3 + import {frontmatter, Content } from '../content/now.md';
4 + import cache from '../backends/cache';
5 +
6 + const cacheKey = 'finger-content';
7 + let fingerContent = await cache.get<string>(cacheKey);
8 + if(!fingerContent){
9 + const res = await fetch('https://plan.cat/~travisshears');
10 + fingerContent = await res.text();
11 + await cache.set(cacheKey, fingerContent);
12 + await cache.expire(cacheKey, 60 * 60); // 1 hour
13 + }
14 +
15 + ---
16 +
17 +
18 + <BasePage title={frontmatter.title}>
19 + <Content />
20 + <pre><code>{fingerContent}</code></pre>
21 + </BasePage>
22 +
23 +
24 + <style>
25 + code {
26 + font-size: var(--font-xs);
27 + }
28 + </style>

now.md(檔案已創建)

@@ -0,0 +1,20 @@
1 + ---
2 + title: Now
3 + description: What I'm currently working on
4 + ---
5 +
6 + # Now / Finger Plan
7 +
8 + Hello internet,
9 +
10 + This is my /now page. Following suit with many other personal sites this page is
11 + a short summery of what I'm currently working on. It is also a finger "plan", more on
12 + finger protocol [here](https://en.wikipedia.org/wiki/Finger_(protocol)).
13 + In short the protocol defines a way to get info on other unix users using a server. The plan aspect
14 + of this protocol overlaps in many ways with more modern concept of a now page. So here is my finger plan / now.
15 +
16 + If you want to peek behind the curtain, I've posted the source code for how this page works [here]().
17 + Thanks again to [Joshua Stein](https://jcs.org/) for hosting [plan.cat](https://plan.cat), where my finger
18 + plan is hosted.
19 +
20 + ---
上一頁 下一頁