andy-note-nuxt 0.2.2 → 0.4.0
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 +4 -6
- package/app/components/content/ProseImg.vue +37 -0
- package/app/types/app-config.d.ts +10 -3
- package/content/index.md +12 -12
- package/nuxt.config.ts +34 -3
- package/package.json +10 -3
- package/public/favicon.svg +6 -0
- package/public/logo.svg +13 -0
- package/app/.claude/skills/ai-annotator/SKILL.md +0 -31
- package/app/app.config.ts +0 -19
package/README.md
CHANGED
|
@@ -49,15 +49,14 @@ bun install
|
|
|
49
49
|
bun dev
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
Edit `
|
|
52
|
+
Edit `runtimeConfig.public.site` in `nuxt.config.ts` for branding (title, description, tagline, themeColor, logo), `app.head` in the same file for `<title>` / meta tags, and start writing in `content/`.
|
|
53
53
|
|
|
54
54
|
## What's included
|
|
55
55
|
|
|
56
56
|
| Path | Purpose |
|
|
57
57
|
|---|---|
|
|
58
58
|
| `app/app.vue` | Root entry — `<NuxtLayout><NuxtPage /></NuxtLayout>` |
|
|
59
|
-
| `app/app
|
|
60
|
-
| `app/types/app-config.d.ts` | TypeScript augmentation for `useAppConfig()` |
|
|
59
|
+
| `app/types/app-config.d.ts` | TypeScript augmentation declaring `runtimeConfig.public.site` shape |
|
|
61
60
|
| `app/layouts/default.vue` | Full-height shell + `<Toaster>` host |
|
|
62
61
|
| `app/pages/[...slug].vue` | Single catch-all route — delegates to `<StackedColumns>` |
|
|
63
62
|
| `app/components/StackedColumns.vue` | Stacked-column shell — drives the whole UX |
|
|
@@ -71,15 +70,14 @@ Edit `app/app.config.ts` for branding/menu, `nuxt.config.ts` for `<title>`, and
|
|
|
71
70
|
| `content.config.ts` | Minimal generic schema (7 fields — see "Schema" below) |
|
|
72
71
|
| `content/index.md` | Default landing page |
|
|
73
72
|
| `content/license.md` | Default license page |
|
|
74
|
-
| `content/quick-start.md`, `content/guides/`, `content/reference/` | Theme's own docs —
|
|
73
|
+
| `content/quick-start.md`, `content/guides/`, `content/reference/` | Theme's own docs (ship only when extending via `github:` — npm publishes only `content/index.md` + `content/license.md`). Override or delete in your child. |
|
|
75
74
|
|
|
76
75
|
## Override anything
|
|
77
76
|
|
|
78
77
|
Nuxt Layers deep-merge child over parent. Override semantics:
|
|
79
78
|
|
|
80
79
|
- **Components / pages / layouts / composables** → create a file with the same path in your project (e.g. `app/components/ContentView.vue`) and it replaces the layer's.
|
|
81
|
-
- **`nuxt.config.ts`** → deep-merged.
|
|
82
|
-
- **`app/app.config.ts`** → deep-merged. Override `site.*` (or add your own fields by re-declaring the `AppConfig` interface).
|
|
80
|
+
- **`nuxt.config.ts`** → deep-merged. Override `app.head` (for `<title>` / meta) and `runtimeConfig.public.site` (for branding: `title`, `description`, `tagline`, `author`, `themeColor`, `logo`). Layer ships defaults; your values win field-by-field. Add your own fields under `site.*` by augmenting the `PublicRuntimeConfig` interface (see `app/types/app-config.d.ts`).
|
|
83
81
|
- **`tailwind.config.js`** → merged by `@nuxtjs/tailwindcss` across layers. Ship a `tailwind.config.js` in your project with the same shape (`theme.extend.colors`, `theme.extend.boxShadow`, etc.) and it overrides the layer's tokens. The module discovers all layer configs automatically.
|
|
84
82
|
- **`content.config.ts`** → fully replaced by the consumer's file (Nuxt Content reads only one). The layer ships a minimal schema so the SQLite cache has the columns its renderer queries (`document_type`, `updated`, `created`). Your override must include those columns or extend them.
|
|
85
83
|
- **Content** → child `content/<path>.md` overrides parent's same-path file (e.g. `content/license.md` in your project replaces the layer's default license page).
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// Override `<img>` rendered from markdown via @nuxt/content's Prose components.
|
|
3
|
+
// Default ProseImg emits a plain `<img>`; we swap to `<NuxtImg>` so consumers
|
|
4
|
+
// get @nuxt/image's lazy loading, responsive `srcset`, format negotiation, and
|
|
5
|
+
// (for SSG builds) pre-rendered optimized variants under .output/public.
|
|
6
|
+
//
|
|
7
|
+
// Surface kept identical to the default ProseImg so existing markdown — both
|
|
8
|
+
// in this layer's `content/` and in consumer projects' content — continues to
|
|
9
|
+
// work without changes. Authors write `` and get an
|
|
10
|
+
// optimized, lazy-loaded image at the cost of nothing.
|
|
11
|
+
//
|
|
12
|
+
// External URLs (http*) pass through @nuxt/image's `remote` provider path;
|
|
13
|
+
// relative paths under `/public` get rewritten to the IPX-served route during
|
|
14
|
+
// dev and pre-rendered into static variants during `nuxt generate`.
|
|
15
|
+
|
|
16
|
+
defineProps<{
|
|
17
|
+
src?: string
|
|
18
|
+
alt?: string
|
|
19
|
+
width?: string | number
|
|
20
|
+
height?: string | number
|
|
21
|
+
title?: string
|
|
22
|
+
}>()
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<NuxtImg
|
|
27
|
+
:src="src"
|
|
28
|
+
:alt="alt"
|
|
29
|
+
:width="width"
|
|
30
|
+
:height="height"
|
|
31
|
+
:title="title"
|
|
32
|
+
loading="lazy"
|
|
33
|
+
decoding="async"
|
|
34
|
+
format="webp"
|
|
35
|
+
densities="x1 x2"
|
|
36
|
+
/>
|
|
37
|
+
</template>
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
export {}
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
// their own fields — TypeScript
|
|
3
|
+
// PublicRuntimeConfig augmentation. Child layers re-declare this interface
|
|
4
|
+
// to add their own fields under `runtimeConfig.public.site.*` — TypeScript
|
|
5
|
+
// merges declarations across `nuxt/schema`.
|
|
6
|
+
//
|
|
7
|
+
// Note: this file used to augment `AppConfig` (back when the layer shipped
|
|
8
|
+
// `app/app.config.ts`). Nuxt 5 / Nitro 3 removes `app.config.ts`, so site
|
|
9
|
+
// config now lives on `runtimeConfig.public.site` and is read via
|
|
10
|
+
// `useRuntimeConfig().public.site`. The file name is kept for git history
|
|
11
|
+
// continuity; the augmented interface is what changed.
|
|
5
12
|
declare module 'nuxt/schema' {
|
|
6
|
-
interface
|
|
13
|
+
interface PublicRuntimeConfig {
|
|
7
14
|
site: {
|
|
8
15
|
title: string
|
|
9
16
|
description: string
|
package/content/index.md
CHANGED
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
title: "Andy Notes"
|
|
3
3
|
description: "Brutalist-terminal Nuxt Content theme — stacked-column navigation for personal notes and second-brain knowledge bases."
|
|
4
4
|
created: 2026-05-11
|
|
5
|
-
updated: 2026-05-
|
|
5
|
+
updated: 2026-05-25
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Andy Notes
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
This is the **default landing page** you get right after cloning (or extending) the `andy-note-nuxt` layer. The layout is **stacked-column navigation** — every click on an internal link pushes a new column to the right instead of routing away, so you keep every ancestor in view and read related notes inside a single flow.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Getting started
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
2. Frontmatter
|
|
16
|
-
3.
|
|
14
|
+
1. Write your first note by dropping any markdown file into `content/`. For example `content/notes/my-first-note.md`.
|
|
15
|
+
2. Frontmatter only needs `title` + `description`. Every other field is optional — see `content.config.ts` for the full list.
|
|
16
|
+
3. Any subfolder of `content/` becomes a section group on the landing page automatically. For example `content/projects/` shows up as a `projects` section.
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Customize
|
|
19
19
|
|
|
20
|
-
- **
|
|
21
|
-
-
|
|
22
|
-
- **
|
|
23
|
-
- **
|
|
20
|
+
- **Branding**: edit `runtimeConfig.public.site` in `nuxt.config.ts` to change `site.title`, `site.description`, `site.tagline`, `site.themeColor`, and `site.logo`. Nuxt deep-merges your values over the layer's defaults.
|
|
21
|
+
- **`<title>` and meta**: edit `app.head` in the same `nuxt.config.ts`.
|
|
22
|
+
- **Palette**: terminal tokens live in `tailwind.config.js`. Key tokens: `terminal.accent` (#ff7b6b — coral), `terminal.bg` (#2a2a28 — warm dark).
|
|
23
|
+
- **Components**: every file under `app/components/` can be overridden by dropping a same-path file in your child project.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
See [License](/license) for usage terms (theme code vs. user content).
|
package/nuxt.config.ts
CHANGED
|
@@ -2,8 +2,13 @@
|
|
|
2
2
|
//
|
|
3
3
|
// Base Nuxt config for `andy-note-nuxt` theme. Consumers extend this layer
|
|
4
4
|
// via `extends: ['github:nguyenvanduocit/andy-note-nuxt']` (or local path /
|
|
5
|
-
// npm package) and override `app.head` and `
|
|
6
|
-
// project. All values here are sensible defaults.
|
|
5
|
+
// npm package) and override `app.head` and `runtimeConfig.public.site` in
|
|
6
|
+
// their child project. All values here are sensible defaults.
|
|
7
|
+
//
|
|
8
|
+
// Why runtimeConfig instead of app.config? Nuxt 5 / Nitro 3 removes the
|
|
9
|
+
// `app.config.ts` / `defineAppConfig` / `useAppConfig` surface. Layer site
|
|
10
|
+
// config now lives under `runtimeConfig.public.*`, which Nuxt deep-merges
|
|
11
|
+
// across layers identically. Components read via `useRuntimeConfig().public.site`.
|
|
7
12
|
|
|
8
13
|
import { createResolver } from '@nuxt/kit'
|
|
9
14
|
|
|
@@ -17,9 +22,18 @@ export default defineNuxtConfig({
|
|
|
17
22
|
compatibilityDate: '2025-07-15',
|
|
18
23
|
devtools: { enabled: true },
|
|
19
24
|
|
|
25
|
+
// Opt-in to Nuxt 5 behavior available under Nuxt 4.2+. Flips: non-async
|
|
26
|
+
// `callHook` return type, client-only HTML comment placeholders, and other
|
|
27
|
+
// forward-compat defaults. The heavier Nitro v3 / Vite 8 changes ship with
|
|
28
|
+
// Nuxt 5 itself — not previewable via this flag.
|
|
29
|
+
future: {
|
|
30
|
+
compatibilityVersion: 5,
|
|
31
|
+
},
|
|
32
|
+
|
|
20
33
|
modules: [
|
|
21
34
|
'vite-plugin-ai-annotator/nuxt',
|
|
22
35
|
'@nuxt/content',
|
|
36
|
+
'@nuxt/image',
|
|
23
37
|
'@nuxtjs/tailwindcss',
|
|
24
38
|
// Toast notifications. Auto-registers `<Toaster />` (client-only) and a
|
|
25
39
|
// plugin exposing `$toast` / the imported `toast()` helper from `vue-sonner`.
|
|
@@ -58,6 +72,23 @@ export default defineNuxtConfig({
|
|
|
58
72
|
},
|
|
59
73
|
},
|
|
60
74
|
|
|
75
|
+
// Site-wide config (replaces former app/app.config.ts surface). Consumers
|
|
76
|
+
// override any field via their own `runtimeConfig.public.site` in nuxt.config —
|
|
77
|
+
// Nuxt deep-merges child layer values over parent. Free-form extra fields are
|
|
78
|
+
// allowed via the index signature in `app/types/app-config.d.ts`.
|
|
79
|
+
runtimeConfig: {
|
|
80
|
+
public: {
|
|
81
|
+
site: {
|
|
82
|
+
title: 'Andy Notes',
|
|
83
|
+
description: 'Stacked-column knowledge base — extend, override, publish.',
|
|
84
|
+
tagline: 'A second-brain theme for Nuxt Content',
|
|
85
|
+
author: 'andy-note-nuxt',
|
|
86
|
+
themeColor: '#ff7b6b',
|
|
87
|
+
logo: '/logo.svg',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
|
|
61
92
|
app: {
|
|
62
93
|
head: {
|
|
63
94
|
htmlAttrs: { lang: 'en' },
|
|
@@ -69,7 +100,7 @@ export default defineNuxtConfig({
|
|
|
69
100
|
{ name: 'theme-color', content: '#ff7b6b' },
|
|
70
101
|
],
|
|
71
102
|
link: [
|
|
72
|
-
{ rel: 'icon', type: 'image/
|
|
103
|
+
{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' },
|
|
73
104
|
],
|
|
74
105
|
},
|
|
75
106
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "andy-note-nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Brutalist-terminal Nuxt Content theme for personal notes, guides, and second-brain knowledge bases. Use as a Nuxt layer.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
@@ -20,7 +20,13 @@
|
|
|
20
20
|
"tailwindcss"
|
|
21
21
|
],
|
|
22
22
|
"files": [
|
|
23
|
-
"app",
|
|
23
|
+
"app/app.vue",
|
|
24
|
+
"app/assets",
|
|
25
|
+
"app/components",
|
|
26
|
+
"app/composables",
|
|
27
|
+
"app/layouts",
|
|
28
|
+
"app/pages",
|
|
29
|
+
"app/types",
|
|
24
30
|
"public",
|
|
25
31
|
"content/index.md",
|
|
26
32
|
"content/license.md",
|
|
@@ -42,8 +48,9 @@
|
|
|
42
48
|
"@fontsource/literata": "^5.2.8",
|
|
43
49
|
"@fontsource/space-grotesk": "^5.2.10",
|
|
44
50
|
"@nuxt/content": "^3.12.0",
|
|
51
|
+
"@nuxt/image": "^2.0.0",
|
|
45
52
|
"@nuxtjs/tailwindcss": "^6.14.0",
|
|
46
|
-
"nuxt": "^4.
|
|
53
|
+
"nuxt": "^4.4.6",
|
|
47
54
|
"rehype-raw": "^7.0.0",
|
|
48
55
|
"vue": "^3.5.29",
|
|
49
56
|
"vue-router": "^4.6.4",
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" shape-rendering="crispEdges">
|
|
2
|
+
<!-- Brutalist stamp favicon — warm-dark bg + offset coral block -->
|
|
3
|
+
<rect width="64" height="64" fill="#2a2a28"/>
|
|
4
|
+
<rect x="6" y="6" width="44" height="44" fill="#474541"/>
|
|
5
|
+
<rect x="10" y="10" width="44" height="44" fill="#ff7b6b"/>
|
|
6
|
+
</svg>
|
package/public/logo.svg
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 64" shape-rendering="crispEdges">
|
|
2
|
+
<!-- Brutalist stamp logo — coral block + wordmark in warm off-white.
|
|
3
|
+
Stamp shadow uses border-strong (#5a5854) at 4px offset, matching
|
|
4
|
+
the `shadow-stamp` token in tailwind.config.js. -->
|
|
5
|
+
<rect x="4" y="12" width="48" height="48" fill="#5a5854"/>
|
|
6
|
+
<rect x="0" y="8" width="48" height="48" fill="#ff7b6b"/>
|
|
7
|
+
<text x="64" y="42"
|
|
8
|
+
font-family="'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif"
|
|
9
|
+
font-size="28"
|
|
10
|
+
font-weight="700"
|
|
11
|
+
letter-spacing="0.02em"
|
|
12
|
+
fill="#d5cfc5">andy/notes</text>
|
|
13
|
+
</svg>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ai-annotator
|
|
3
|
-
description: This skill should be used when the user asks to "check browser feedback", "get user feedback", "capture screenshot", "inspect element", "inject CSS", "inject JS", "read console logs", or mentions AI Annotator, browser session, or UI feedback.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
AI Annotator provides access to the user's live browser session. Users select UI elements and add feedback comments. Use the REST API to read feedback, capture screenshots, inject CSS/JS, and read console logs.
|
|
7
|
-
|
|
8
|
-
Server: `http://127.0.0.1:7318`
|
|
9
|
-
|
|
10
|
-
## REST API
|
|
11
|
-
|
|
12
|
-
All endpoints return JSON. Obtain session ID from `GET /api/sessions` first.
|
|
13
|
-
|
|
14
|
-
| Method | Endpoint | Body/Query | Description |
|
|
15
|
-
|--------|----------|------------|-------------|
|
|
16
|
-
| `GET` | `http://127.0.0.1:7318/api/sessions` | — | List connected browser sessions |
|
|
17
|
-
| `GET` | `http://127.0.0.1:7318/api/sessions/:id/page-context` | — | Page URL, title, selection count |
|
|
18
|
-
| `POST` | `http://127.0.0.1:7318/api/sessions/:id/select` | `{mode?, selector?, selectorType?}` | Trigger feedback selection |
|
|
19
|
-
| `GET` | `http://127.0.0.1:7318/api/sessions/:id/feedback` | `?fields=xpath,attributes,styles,children` | Get selected feedback items |
|
|
20
|
-
| `DELETE` | `http://127.0.0.1:7318/api/sessions/:id/feedback` | — | Clear all selections |
|
|
21
|
-
| `POST` | `http://127.0.0.1:7318/api/sessions/:id/screenshot` | `{type?, selector?, quality?}` | Capture screenshot |
|
|
22
|
-
| `POST` | `http://127.0.0.1:7318/api/sessions/:id/inject-css` | `{css}` | Inject CSS into page |
|
|
23
|
-
| `POST` | `http://127.0.0.1:7318/api/sessions/:id/inject-js` | `{code}` | Execute JS in page context |
|
|
24
|
-
| `GET` | `http://127.0.0.1:7318/api/sessions/:id/console` | `?clear=true` | Get captured console logs |
|
|
25
|
-
|
|
26
|
-
## Workflow
|
|
27
|
-
|
|
28
|
-
1. `GET http://127.0.0.1:7318/api/sessions` → get session ID
|
|
29
|
-
2. `GET http://127.0.0.1:7318/api/sessions/{id}/feedback` → read user feedback
|
|
30
|
-
3. Make code changes based on feedback
|
|
31
|
-
4. `DELETE http://127.0.0.1:7318/api/sessions/{id}/feedback` → clear feedback after addressing it
|
package/app/app.config.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Site-wide config consumed by components via `useAppConfig()`.
|
|
2
|
-
// Override every field in your child project by creating your own `app/app.config.ts`
|
|
3
|
-
// — Nuxt deep-merges child over parent layer.
|
|
4
|
-
//
|
|
5
|
-
// Note: this layer's UX is a single stacked-column shell — there is no fixed
|
|
6
|
-
// nav header rendering a menu. If your child project wants top-level nav,
|
|
7
|
-
// override `StackedColumns.vue` (or add a layout wrapper) and read your own
|
|
8
|
-
// menu structure from this config.
|
|
9
|
-
|
|
10
|
-
export default defineAppConfig({
|
|
11
|
-
site: {
|
|
12
|
-
title: 'Andy Notes',
|
|
13
|
-
description: 'Stacked-column knowledge base — extend, override, publish.',
|
|
14
|
-
tagline: 'A second-brain theme for Nuxt Content',
|
|
15
|
-
author: 'andy-note-nuxt',
|
|
16
|
-
themeColor: '#ff7b6b',
|
|
17
|
-
logo: '/logo.png',
|
|
18
|
-
},
|
|
19
|
-
})
|