meowpress 0.3.0-alpha.4 → 0.3.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/src/site.js +18 -7
- package/dist/src/theme.js +11 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
Meowpress builds a static blog from Markdown and MDX, with a built-in Journal-based theme for posts, short notes
|
|
4
4
|
and public skills. A project can supply its own theme or page map through `meowpress/build`.
|
|
5
5
|
|
|
6
|
+
The built-in theme renders functional icons as inline SVG through Meowtail's Lucide-backed
|
|
7
|
+
`Icon`, not font glyphs. Custom pages can use `Icon` or `IconSource` from `meowtail/icons`
|
|
8
|
+
and the full Lucide set from `meowtail/icons/lucide`; brand artwork such as `GithubIcon`
|
|
9
|
+
stays separate. Icons render at build time and need no browser script or icon font.
|
|
10
|
+
|
|
6
11
|
## Build and preview a site
|
|
7
12
|
|
|
8
13
|
Use Bun and install this version of `meowpress` with compatible `meowcss` and `meowjsx` peers.
|
package/dist/src/site.js
CHANGED
|
@@ -2,6 +2,7 @@ import { themeAttributes } from "meowcss";
|
|
|
2
2
|
import { createRuntime, Fragment, h } from "meowjsx";
|
|
3
3
|
import { renderToHtmlWithRuntime } from "meowjsx/web";
|
|
4
4
|
import { Button, Container, Entry, EntryList, Inline, MetaRow, Page, PageHeader, Prose, Section, Tag, Text, createMeowUI, } from "meowtail";
|
|
5
|
+
import { GithubIcon, Icon } from "meowtail/icons";
|
|
5
6
|
import { blogTheme } from "./theme.js";
|
|
6
7
|
import { withoutLeadingHeading } from "./content.js";
|
|
7
8
|
import { DEFAULT_SITE } from "./identity.js";
|
|
@@ -199,8 +200,12 @@ function PostNavigation({ item, posts }) {
|
|
|
199
200
|
const older = index >= 0 ? posts[index + 1] : undefined;
|
|
200
201
|
const newer = index > 0 ? posts[index - 1] : undefined;
|
|
201
202
|
return (h("nav", { className: "post-nav", "aria-label": "Post navigation" },
|
|
202
|
-
older ? (h(Entry, { eyebrow:
|
|
203
|
-
|
|
203
|
+
older ? (h(Entry, { eyebrow: h("span", { className: "site-icon-label" },
|
|
204
|
+
h(Icon, { name: "chevron-left", size: 14 }),
|
|
205
|
+
" Previous post (older)"), title: older.title, href: itemUrl(older) })) : (h("span", null)),
|
|
206
|
+
newer ? (h(Entry, { eyebrow: h("span", { className: "site-icon-label" },
|
|
207
|
+
"Next post (newer) ",
|
|
208
|
+
h(Icon, { name: "chevron-right", size: 14 })), title: newer.title, href: itemUrl(newer) })) : (h(Text, { variant: "caption" }, "Nothing newer \u2014 this is the latest post."))));
|
|
204
209
|
}
|
|
205
210
|
function RelatedThoughts({ item, thoughts, }) {
|
|
206
211
|
const related = thoughts.filter((thought) => thought.dateKey === item.dateKey).slice(0, 3);
|
|
@@ -254,9 +259,10 @@ export function aboutPage(theme = blogTheme, site = DEFAULT_SITE, stylesheet = D
|
|
|
254
259
|
h("div", { className: "site-avatar", "aria-hidden": "true" }, site.images?.about ? (h("img", { src: `../${site.images.about}`, alt: "", decoding: "async" })) : (h("span", { className: "avatar-initial" }, Array.from(site.name.trim())[0] ?? "M"))),
|
|
255
260
|
about ? (h(Prose, null, about.paragraphs.map((paragraph) => (h("p", null, paragraph))))) : null,
|
|
256
261
|
about?.links?.length ? (h(Section, { title: about.linksHeading ?? "Find me" },
|
|
257
|
-
h(EntryList, null, about.links.map((link) => (h(Entry, { title: h("a", { href: link.href, target: "_blank", rel: "me noopener noreferrer" },
|
|
262
|
+
h(EntryList, null, about.links.map((link) => (h(Entry, { title: h("a", { className: "site-icon-label", href: link.href, target: "_blank", rel: "me noopener noreferrer" },
|
|
258
263
|
link.handle,
|
|
259
|
-
"
|
|
264
|
+
" ",
|
|
265
|
+
h(Icon, { name: "arrow-up-right", size: 16 })), eyebrow: link.label })))))) : null)),
|
|
260
266
|
});
|
|
261
267
|
}
|
|
262
268
|
function skillUrl(skill) {
|
|
@@ -366,7 +372,7 @@ function SkillRelations({ skill }) {
|
|
|
366
372
|
return (h("li", { className: sourceFile?.reachable ? "" : "unreachable" },
|
|
367
373
|
h("span", { className: "skill-reading-edge" },
|
|
368
374
|
h("code", { title: relation.source }, relation.source),
|
|
369
|
-
h(
|
|
375
|
+
h(Icon, { name: "arrow-right", size: 14 }),
|
|
370
376
|
h("code", { title: relation.target }, relation.target)),
|
|
371
377
|
h("span", { className: "skill-reading-context" }, relation.contexts.map((context) => (h("span", null,
|
|
372
378
|
context.section,
|
|
@@ -514,14 +520,19 @@ export function skillPage(skill, theme = blogTheme, site = DEFAULT_SITE, stylesh
|
|
|
514
520
|
? styleHref(1 + slugDepth(skill.slug), stylesheet)
|
|
515
521
|
: styleHref(2 + slugDepth(skill.slug), stylesheet),
|
|
516
522
|
children: (h(Page, { width: "full", className: "skill-page", title: skill.name, eyebrow: "Skill", description: skill.description },
|
|
517
|
-
h("a", { className: "skill-back", href: "/skills/" },
|
|
523
|
+
h("a", { className: "skill-back site-icon-label", href: "/skills/" },
|
|
524
|
+
h(Icon, { name: "arrow-left", size: 14 }),
|
|
525
|
+
" All Skills"),
|
|
518
526
|
h("header", { className: "skill-browser-head" },
|
|
519
527
|
h("span", { className: "skill-command" },
|
|
520
528
|
skill.scope === "project" ? (h("span", { className: "skill-scope-badge" }, "Project Skill \u00B7 Internal")) : null,
|
|
521
529
|
h("code", null, command)),
|
|
522
530
|
h("span", { className: "skill-browser-actions" },
|
|
523
531
|
h("button", { type: "button", "data-copy-command": command }, skill.scope === "public" ? "Copy" : "Copy path"),
|
|
524
|
-
site.repositorySourceUrl ? (h("a", { href: `${site.repositorySourceUrl}/${skill.sourceBasePath}`, target: "_blank", rel: "noopener noreferrer" },
|
|
532
|
+
site.repositorySourceUrl ? (h("a", { className: "site-icon-label", href: `${site.repositorySourceUrl}/${skill.sourceBasePath}`, target: "_blank", rel: "noopener noreferrer" },
|
|
533
|
+
h(GithubIcon, null),
|
|
534
|
+
" GitHub ",
|
|
535
|
+
h(Icon, { name: "arrow-up-right", size: 14 }))) : null)),
|
|
525
536
|
h("div", { className: "skill-stage", "data-skill-browser": true },
|
|
526
537
|
h("nav", { className: "skill-view-tabs", "aria-label": "Skill view mode" },
|
|
527
538
|
h("button", { type: "button", "data-skill-view": "files", "aria-pressed": "true" }, "File browser"),
|
package/dist/src/theme.js
CHANGED
|
@@ -16,6 +16,16 @@ const siteStyles = css `
|
|
|
16
16
|
.site-shell {
|
|
17
17
|
padding: 0 ${uiTokens.space.pageInline};
|
|
18
18
|
}
|
|
19
|
+
.site-icon-label {
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: ${uiTokens.space.group};
|
|
23
|
+
max-width: 100%;
|
|
24
|
+
overflow-wrap: anywhere;
|
|
25
|
+
}
|
|
26
|
+
.site-icon-label .meow-github-icon {
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
}
|
|
19
29
|
.site-header,
|
|
20
30
|
.site-footer {
|
|
21
31
|
display: flex;
|
|
@@ -390,7 +400,7 @@ const siteStyles = css `
|
|
|
390
400
|
flex-wrap: wrap;
|
|
391
401
|
gap: ${uiTokens.space.group};
|
|
392
402
|
}
|
|
393
|
-
.skill-reading-edge >
|
|
403
|
+
.skill-reading-edge > .meow-icon {
|
|
394
404
|
color: ${uiTokens.accent.ink};
|
|
395
405
|
}
|
|
396
406
|
.skill-reading-context {
|