Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: ci

on:
push:
branches:
- main
pull_request:
branches:
- main

# Superseded runs are pointless: every push rebuilds the whole dep tree.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
# Named `ci` rather than `test` (as in comark-cms) because this package has
# no lint or test steps — typecheck and build are the whole signal.
ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
package-manager-cache: false
node-version: '24'
- run: npm i -g --force corepack && corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm dev:prepare
- run: pnpm typecheck
# Builds the playground, which exercises the layer end to end: content
# pages, landing, OG images, and the generated ISR route rules.
- run: pnpm build
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default defineAppConfig({
links: [{ icon: 'i-simple-icons-github', to: 'https://github.com/org/repo', target: '_blank' }],
},
footer: {
credits: `Copyright © ${new Date().getFullYear()}`,
credits: `© ${new Date().getFullYear()}`,
links: [{ icon: 'i-lucide-rss', to: '/rss.xml', target: '_blank', 'aria-label': 'RSS Feed' }],
},
})
Expand Down
2 changes: 1 addition & 1 deletion app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export default defineAppConfig({
links: [],
},
footer: {
// Full credits line; empty = `Copyright © ${owner} ${year}. All rights reserved.`
// Full credits line; empty = `© ${year} ${owner}.`
credits: '',
// Copyright holder when it isn't the site itself; empty = `seo.siteName`.
owner: '',
Expand Down
2 changes: 1 addition & 1 deletion app/components/AppFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { footer, seo } = useAppConfig()
// deploys — this site publishes content without rebuilding.
const year = new Date().getFullYear()
const credits = computed(
() => footer?.credits || `Copyright © ${footer?.owner || seo?.siteName} ${year}. All rights reserved.`
() => footer?.credits || `© ${year} ${footer?.owner || seo?.siteName}.`
)
</script>

Expand Down
15 changes: 10 additions & 5 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,20 @@ export default defineNuxtConfig({
} as Record<string, unknown>),
vite: {
optimizeDeps: {
// CJS deps that must be pre-bundled. `elkjs` is beautiful-mermaid's own
// dependency and ships CommonJS: without an explicit entry Vite serves it
// raw and the browser dies on `does not provide an export named 'default'`,
// taking hydration down on every page.
// Deps that must go through the dep optimizer, or the browser gets
// `module.exports` and dies on "does not provide an export named
// 'default'", taking hydration down on every page.
//
// `beautiful-mermaid` matters because of what it pulls in: it statically
// imports the UMD `elkjs/lib/elk.bundled.js`. Optimizing beautiful-mermaid
// inlines elkjs into its chunk, so the browser never sees the raw UMD.
// Do NOT add an entry for elkjs itself — a second entry pointing at the
// same file splits it back out and reintroduces the hydration crash.
//
// When the layer is installed as a package these are nested deps, so Vite
// needs the `comark-docs > x` resolution chain; when extended from a local
// path (or run from the playground) they resolve plainly.
include: ['beautiful-mermaid', 'motion-v', 'beautiful-mermaid > elkjs/lib/elk.bundled.js'].map((id) =>
include: ['beautiful-mermaid', 'motion-v'].map((id) =>
import.meta.url.includes('node_modules') ? `comark-docs > ${id}` : id
),
},
Expand Down
2 changes: 1 addition & 1 deletion nuxt.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default defineNuxtSchema({
links: [],
},
footer: {
/** Full credits line; empty = `Copyright © ${owner} ${year}. All rights reserved.` */
/** Full credits line; empty = `© ${year} ${owner}.` */
credits: '',
/** Copyright holder when it isn't the site itself; empty = site name. */
owner: '',
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,28 @@
"dependencies": {
"@comark/cms": "^0.1.0",
"@comark/nuxt": "^0.5.1",
"@iconify-json/lucide": "^1.2.118",
"@iconify-json/simple-icons": "^1.2.90",
"@iconify-json/lucide": "^1.2.120",
"@iconify-json/simple-icons": "^1.2.92",
"@iconify-json/vscode-icons": "^1.2.67",
"@nuxt/kit": "^4.5.0",
"@nuxt/kit": "^4.5.1",
"@nuxt/ui": "^4.10.0",
"@nuxtjs/mcp-toolkit": "^0.18.0",
"@nuxtjs/robots": "^6.1.2",
"@nuxtjs/sitemap": "^8.2.2",
"@nuxtjs/robots": "^6.1.3",
"@nuxtjs/sitemap": "^8.3.0",
"@octokit/webhooks-methods": "^6.0.0",
"@shikijs/themes": "^4.3.1",
"@vercel/functions": "^3.7.5",
"@vercel/functions": "^3.7.6",
"@vueuse/core": "^14.3.0",
"beautiful-mermaid": "^1.1.3",
"comark": "^0.5.1",
"defu": "^6.1.7",
"exsolve": "^1.0.8",
"h3": "^1.10.15",
"exsolve": "^1.1.0",
"h3": "^1.15.11",
"motion-v": "^2.3.0",
"nuxt-og-image": "^6.7.2",
"nuxt-seo-utils": "^8.3.1",
"nuxt-og-image": "^6.7.4",
"nuxt-seo-utils": "^8.3.2",
"pathe": "^2.0.3",
"satori": "^0.28.0",
"satori": "^0.29.0",
"shiki": "^4.3.1",
"tailwindcss": "^4.3.3",
"ufo": "^1.6.4",
Expand All @@ -63,7 +63,7 @@
"devDependencies": {
"@nuxt/devtools-kit": "4.0.0-alpha.9",
"@resvg/resvg-js": "^2.6.2",
"nuxt": "^4.5.0",
"nuxt": "^4.5.1",
"typescript": "^6.0.3",
"vue-tsc": "^3.3.8"
}
Expand Down
5 changes: 4 additions & 1 deletion playground/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export default defineAppConfig({
},
footer: {
icon: 'i-simple-icons-vercel',
owner: 'Vercel',
owner: 'Vercel, Inc',
links: [
{ icon: 'i-simple-icons-github', to: 'https://github.com/comarkdown/comark-docs', target: '_blank', 'aria-label': 'GitHub' },
]
},
})
10 changes: 0 additions & 10 deletions playground/content/1.getting-started/1.introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,3 @@ Content lives as Markdown in your repository. In development it is read from the
::note
This playground exercises the layer end-to-end: navigation, search, TOC, prev/next links, raw markdown mirrors and the version history panel.
::

## Code blocks

```ts [nuxt.config.ts]
export default defineNuxtConfig({
extends: ['comark-docs'],
})
```

:emoji-rocket:
3 changes: 1 addition & 2 deletions playground/content/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
title: A Nuxt layer for CMS-driven documentation
description: "comark-docs is a Nuxt layer for documentation sites powered by @comark/cms: Markdown served at request time, ISR-cached, revalidated on push."
navigation:
title: Home
navigation: false
---

::page-hero
Expand Down
Loading