diigo-week: draft a potluck issue from a week of diigo bookmarks
An EmDash plugin (native, content:write only) with one admin page: a diigo username and an ISO week. It reads diigo-cache's public page (?in=<week>&by=created) as microformats, follows rel=next, and creates a draft in issues shaped like seed/issues.json. Transport is a DIIGO_CACHE service binding rather than ctx.http.fetch: EmDash's SSRF guard refuses localhost, and the binding names one worker. Logic lives in src/week.ts with the fetcher passed in; tests read fixtures in diigo-cache's markup. The checklist's goal 2 now names potluck; DiigoBridge waits. Generated-by: Claude Opus 5.5
This commit is contained in:
1 parent
be796d9d0d
commit
94a059af25
17 files changed
+6705
-22
No files matched your search
@@ -9,6 +9,10 @@ potluck started as EmDash's `cloudflare:blog` template (`pnpm create emdash@late
|
||||
- **Microformats:** an issue list is an `h-feed` of `h-entry`s; an issue is an `h-entry` (`p-name`, `dt-published`, `p-summary`, `e-content`). In issue bodies, [CiteLink.astro](src/components/CiteLink.astro) marks off-site links as `h-cite` and `/tag/<tag>` links as rel-tag `p-category`.
|
||||
- **Look:** plain HTML, after kmjn.org's [Plain HTML with a few bureaucratic gestures](https://www.kmjn.org/notes/modern_plain_html.html): system fonts (no webfonts), one ~800px column, links in the text color with a dotted underline. Restyle in [src/styles/theme.css](src/styles/theme.css), which overrides the defaults in `tokens.css` (unlayered, so it always wins); don't edit `tokens.css` or `Base.astro` for visual changes. Colors use `light-dark(<light>, <dark>)`.
|
||||
|
||||
## Plugins
|
||||
|
||||
[diigo-week](../diigo-week/README.md) (Plugins → Draft from diigo in the admin) drafts an issue from a week of diigo bookmarks. It reads diigo-cache's public page as microformats over the `DIIGO_CACHE` service binding in [wrangler.jsonc](wrangler.jsonc); in dev, run diigo-cache's `pnpm dev` alongside. It's linked as `link:../diigo-week`, and registered in [astro.config.mjs](astro.config.mjs). After changing it, restart the dev server.
|
||||
|
||||
## Seeds
|
||||
|
||||
[seed/seed.json](seed/seed.json) (site settings, menus, widgets, the template's collections) is applied on the first request to an empty database. [seed/issues.json](seed/issues.json) is separate: `pnpm seed:issues` applies it to the local D1 database, which exists after the dev server's first request. Run it with the dev server stopped.
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ pnpm dev # → http://localhost:4321/issues
|
||||
|
||||
## Bookmarks in, a zine out
|
||||
|
||||
- **Your web, your site:** the bookmarks come from your own diigo account, so the web you read becomes something you publish ([PESOS](https://indieweb.org/PESOS)). For now issues are put together by hand. Pulling a week from diigo-cache is next.
|
||||
- **Your web, your site:** the bookmarks come from your own diigo account, so the web you read becomes something you publish ([PESOS](https://indieweb.org/PESOS)). The [diigo-week](../diigo-week/README.md) plugin drafts an issue from a week of them; you cut and comment.
|
||||
- **A week per issue:** `/issues/2026-w40`, by ISO week, UTC.
|
||||
- **Microformats:** feed readers and IndieWeb tools see each issue as an [h-entry](https://microformats.org/wiki/h-entry) and each bookmark as an [h-cite](https://microformats.org/wiki/h-cite).
|
||||
- **Plain HTML** that's easy to read: system fonts, one column.
|
||||
|
||||
@@ -16,6 +16,8 @@ export default defineConfig({
|
||||
emdash({
|
||||
database: d1({ binding: "DB", session: "auto" }),
|
||||
storage: r2({ binding: "MEDIA" }),
|
||||
// drafts an issue from a week of diigo bookmarks (../diigo-week)
|
||||
plugins: [{ id: "diigo-week", version: "0.1.0", entrypoint: "diigo-week" }],
|
||||
}),
|
||||
],
|
||||
devToolbar: { enabled: false },
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"@astrojs/react": "^6.0.5",
|
||||
"@emdash-cms/cloudflare": "^1.0.1",
|
||||
"astro": "^7.3.2",
|
||||
"diigo-week": "link:../diigo-week",
|
||||
"emdash": "^1.0.1",
|
||||
"react": "19.2.4",
|
||||
"react-dom": "19.2.4"
|
||||
|
||||
Generated
+3
@@ -20,6 +20,9 @@ importers:
|
||||
astro:
|
||||
specifier: ^7.3.2
|
||||
version: 7.3.6(@types/node@26.6.4)(yaml@2.9.1)
|
||||
diigo-week:
|
||||
specifier: link:../diigo-week
|
||||
version: link:../diigo-week
|
||||
emdash:
|
||||
specifier: ^1.0.1
|
||||
version: 1.2.0(@astrojs/react@6.0.6(@types/node@26.6.4)(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(esbuild@0.28.2)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(yaml@2.9.1))(@atcute/cbor@2.3.8(@atcute/cid@2.5.0))(@atcute/cid@2.5.0)(@atcute/identity@2.0.2(@atcute/lexicons@2.1.1)(typescript@6.0.3))(@date-fns/tz@1.5.0)(@floating-ui/dom@1.8.0)(@tiptap/extensions@3.31.4(@tiptap/core@3.31.4(@tiptap/pm@3.31.4))(@tiptap/pm@3.31.4))(@types/react-dom@19.3.0(@types/react@19.3.0))(@types/react@19.3.0)(astro@7.3.6(@types/node@26.6.4)(yaml@2.9.1))(date-fns@4.4.0)(echarts@6.1.0)(prosemirror-model@1.25.12)(prosemirror-state@1.4.4)(prosemirror-view@1.42.6)(react-dom@19.2.4(react@19.2.4))(react@19.2.4)(typescript@6.0.3)
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
"bucket_name": "my-emdash-media",
|
||||
},
|
||||
],
|
||||
// diigo-cache's public pages, for the diigo-week plugin (reads its
|
||||
// microformats; in dev, diigo-cache's own `pnpm dev` serves it)
|
||||
"services": [{ "binding": "DIIGO_CACHE", "service": "diigo-cache" }],
|
||||
// Sandboxed plugins require Worker Loader, available on Workers paid plans. Uncomment to enable:
|
||||
// "worker_loaders": [{ "binding": "LOADER" }],
|
||||
// General maintenance cron trigger
|
||||
|
||||
Reference in new issue
Block a user