', '
', '
']);
+ md.block.ruler.before('paragraph', 'context_section_card', (state, line, end, silent) => {
+ if (!/(?:^|\/)sections\/[0-9a-f]+\.md$/.test(state.env.relativePath || '')) return false;
+ const raw = state.src.slice(state.bMarks[line] + state.tShift[line], state.eMarks[line]);
+ if (!sectionWrappers.has(raw)) return false;
+ if (!silent) { const token = state.push('context_section_card', '', 0); token.content = raw; }
+ state.line = line + 1;
+ return true;
+ }, { alt: ['paragraph'] });
+ md.renderer.rules.context_section_card = (tokens, index) => tokens[index].content + '\n';
// The generated website config declares contextLocaleMarker; null when the site has no translations.
const contextLocale = typeof contextLocaleMarker === 'string' ? contextLocaleMarker : null;
md.block.ruler.before('paragraph', 'context_locale', (state, line, end, silent) => {
@@ -286,10 +297,13 @@ export default {
return part('year') + '-' + part('month') + '-' + part('day') + ' ' +
part('hour') + ':' + part('minute') + ':' + part('second') + ' ' + part('timeZoneName');
});
+ const sitePath = () => {
+ const base = data.site.value.base;
+ return route.path.startsWith(base) ? '/' + route.path.slice(base.length) : route.path;
+ };
watch(() => route.path, () => {
allSources.value = false;
- const base = data.site.value.base;
- const path = route.path.startsWith(base) ? '/' + route.path.slice(base.length) : route.path;
+ const path = sitePath();
const direct = sections.value.find(section => section.href === path);
const current = sections.value.find(section => section.key === selected.value);
selected.value = (direct || (current?.pages.includes(path) ? current :
@@ -299,6 +313,12 @@ export default {
const inLlms = computed(() => route.path.startsWith(data.site.value.base + 'llms/'));
const inHistory = computed(() => route.path === data.site.value.base + 'changelog.html');
const inHome = computed(() => data.frontmatter.value.layout === 'home');
+ // Articles outside the knowledge map, such as More menu targets, belong to no section.
+ const inMore = computed(() => (data.theme.value.contextMore || []).some(item => !item.origin && item.link === sitePath()));
+ const outsideSections = computed(() => inLlms.value || inHistory.value || inMore.value || (!inHome.value &&
+ !sections.value.some(section => section.href === sitePath() || section.pages.includes(sitePath()))));
+ const userNav = position => (data.theme.value.contextNav || [])
+ .filter(item => (item.position === 'start') === (position === 'start')).map(navLink);
// Descendants, including site extensions, read the reader language as lang.
// The frontmatter carries it too so the content refreshes its outline on a switch.
provide(dataSymbol, { ...data, lang: computed(() => locale.value), frontmatter: computed(() => {
@@ -307,15 +327,15 @@ export default {
return { ...value, contextLocale: locale.value, ...(actions ? { hero: { ...value.hero, actions } } : {}) };
}), theme: computed(() => ({ ...data.theme.value,
...data.theme.value.contextUiLabels?.[chinese.value ? 'zh' : 'en'],
- sidebar: inLlms.value || inHistory.value ? [] : active.value?.items || [],
- nav: [...sections.value.map(section => ({ text: section.label, link: section.href,
- activeMatch: !inLlms.value && !inHistory.value && section.key === selected.value ? '^' : '(?!)' })),
- ...(data.theme.value.contextNav || []).map(navLink),
+ sidebar: outsideSections.value ? [] : active.value?.items || [],
+ nav: [...userNav('start'), ...sections.value.map(section => ({ text: section.label, link: section.href,
+ activeMatch: !outsideSections.value && section.key === selected.value ? '^' : '(?!)' })),
+ ...userNav('end'),
{ text: bothHtml('更多', 'More'), items: [
...(data.theme.value.contextMore || []).map(navLink),
{ text: 'LLM Docs', link: '/llms/index.html' },
{ text: 'Changelog', link: '/changelog.html' }],
- activeMatch: inLlms.value || inHistory.value ? '^' : '(?!)' }],
+ activeMatch: inLlms.value || inHistory.value || inMore.value ? '^' : '(?!)' }],
})) });
const slots = {
'nav-bar-title-before': () => extensions.brand ? h('span', { class: 'context-brand' }, custom('brand')) : null,
@@ -383,7 +403,7 @@ export default {
};
// History belongs between the page heading and footer metadata.
return () => h(DefaultTheme.Layout, { class: inHome.value ? 'context-home' : data.page.value.isNotFound ? 'context-missing' :
- inLlms.value || inHistory.value ? 'context-empty-sidebar' : undefined }, { ...slots, 'doc-after': undefined,
+ outsideSections.value ? 'context-empty-sidebar' : undefined }, { ...slots, 'doc-after': undefined,
'doc-footer-before': () => [slots['doc-after'](), slots['doc-footer-before']()] });
}
},
@@ -663,6 +683,19 @@ ${readerContentStyles(".vp-doc")}
.context-sources li + li { margin-top: 6px; }
.context-sources a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.context-sources a:hover { color: var(--vp-c-brand-1); border-color: currentColor; }
+/* Section landing pages: two cards per row, one on narrow screens. */
+.context-section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
+.vp-doc .context-section-card { min-width: 0; padding: 18px 20px; border: 1px solid var(--vp-c-divider); border-radius: 12px;
+ background: color-mix(in srgb, var(--vp-c-bg) 88%, var(--vp-c-bg-soft)); }
+.vp-doc .context-section-card:hover { border-color: color-mix(in srgb, var(--vp-c-brand-1) 42%, var(--vp-c-divider)); }
+.vp-doc .context-section-card h2 { margin: 0 0 10px; padding: 0 0 10px; border-top: 0; border-bottom: 1px solid var(--vp-c-divider); font-size: 17px; line-height: 1.45; letter-spacing: 0; }
+.vp-doc .context-section-card h2 a { color: var(--vp-c-text-1); text-decoration: none; }
+.vp-doc .context-section-card > ul { margin: 0; padding: 0; list-style: none; }
+.vp-doc .context-section-card li { margin: 6px 0; font-size: 14px; line-height: 1.55; }
+.vp-doc .context-section-card li a { color: var(--vp-c-text-2); text-decoration: none; }
+.vp-doc .context-section-card li a:hover { color: var(--vp-c-brand-1); }
+.vp-doc .context-section-card ul ul { margin: 4px 0 8px; padding-left: 14px; border-left: 1px solid var(--vp-c-divider); list-style: none; }
+@media (max-width: 719px) { .context-section-grid { grid-template-columns: 1fr; } }
${DIAGRAM_STYLES}
`;
diff --git a/packages/context/docs/guides/package-outputs.md b/packages/context/docs/guides/package-outputs.md
index f886aeb8..e34a6606 100644
--- a/packages/context/docs/guides/package-outputs.md
+++ b/packages/context/docs/guides/package-outputs.md
@@ -137,9 +137,16 @@ a section shows only its descendants in the left sidebar; opening an article
directly selects its section. Skills and their Markdown references remain
reachable as linked read-only pages, but have no automatically added navigation
section. A reader-facing usage guide can link them where appropriate.
-Section landing pages have stable URLs separate from article URLs.
-
-`site.nav` appends links after the reading directories, and `site.more` adds
+Section landing pages have stable URLs separate from article URLs. They show
+each first-level group of the section as a card, two per row and one on
+narrow screens; articles directly under the section share one card, or get one
+card each when the section has no groups. Pages outside every section, such as
+More menu targets, LLM Docs and Changelog, show no sidebar and highlight no
+section.
+
+`site.nav` appends links after the reading directories; a link with
+`position: "start"` goes before them instead, for example a documentation home
+link. `site.more` adds
items to the More menu before LLM Docs and Changelog. A More item uses either
`link` or `target: { artifact_ref }`; a target is an approved article kept
outside the knowledge map (for example release notes or a contribution guide),
diff --git a/packages/context/package.json b/packages/context/package.json
index afdd36d3..eb235ae3 100644
--- a/packages/context/package.json
+++ b/packages/context/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/context",
"description": "Declarative SDK for Context knowledge sources, workflows, review, and package outputs",
- "version": "0.7.62",
+ "version": "0.7.63",
"type": "module",
"license": "MIT",
"engines": {
diff --git a/packages/context/src/packageSite.ts b/packages/context/src/packageSite.ts
index 4222af16..22727b1d 100644
--- a/packages/context/src/packageSite.ts
+++ b/packages/context/src/packageSite.ts
@@ -45,6 +45,8 @@ const packageSiteLocaleSchema = z.object({
const packageSiteNavLinkSchema = z.object({
text: z.string().trim().min(1),
link: siteHrefSchema,
+ /** `start` places the link before the knowledge sections; the default `end` places it after them. */
+ position: z.enum(["start", "end"]).optional(),
locales: localizedTextSchema.optional(),
}).strict();
@@ -76,7 +78,7 @@ export const packageSiteSchema = z.object({
locales: z.record(localeTagSchema, packageSiteLocaleSchema).optional(),
/** Target of the top-bar title; defaults to the site home. Root-relative links address the site origin. */
titleLink: siteHrefSchema.optional(),
- /** Top navigation links after the knowledge sections. Root-relative links address the site origin. */
+ /** Top navigation links, after the knowledge sections unless `position: "start"`. Root-relative links address the site origin. */
nav: z.array(packageSiteNavLinkSchema).optional(),
/** Items appended to the More menu after LLM Docs and Changelog. */
more: z.array(packageSiteMoreItemSchema).optional(),
diff --git a/packages/core/package.json b/packages/core/package.json
index fa3a9a34..6ed5099b 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/core",
"description": "Shared extraction types, schemas, and utilities for Context",
- "version": "0.7.62",
+ "version": "0.7.63",
"type": "module",
"license": "MIT",
"engines": {
diff --git a/packages/dev-cli/package.json b/packages/dev-cli/package.json
index 6f99474d..b9c2a78b 100644
--- a/packages/dev-cli/package.json
+++ b/packages/dev-cli/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/dev-cli",
"description": "Developer menu for Context build, verification, link, and release preparation",
- "version": "0.7.62",
+ "version": "0.7.63",
"private": true,
"type": "module",
"license": "MIT",
diff --git a/packages/extract-contract/package.json b/packages/extract-contract/package.json
index 25e2956a..2859475a 100644
--- a/packages/extract-contract/package.json
+++ b/packages/extract-contract/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/extract-contract",
"description": "OpenAPI and GraphQL contract catalog adapter for Context",
- "version": "0.7.62",
+ "version": "0.7.63",
"type": "module",
"license": "MIT",
"engines": {
diff --git a/packages/extract-go/package.json b/packages/extract-go/package.json
index 5f696c4e..bd8dd20a 100644
--- a/packages/extract-go/package.json
+++ b/packages/extract-go/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/extract-go",
"description": "Go extraction plugin and structural index for Context",
- "version": "0.7.62",
+ "version": "0.7.63",
"type": "module",
"license": "MIT",
"engines": {
diff --git a/packages/extract-mdx/package.json b/packages/extract-mdx/package.json
index f72ee625..41ffe340 100644
--- a/packages/extract-mdx/package.json
+++ b/packages/extract-mdx/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/extract-mdx",
"description": "MDX component and example catalog bridge for Context",
- "version": "0.7.62",
+ "version": "0.7.63",
"type": "module",
"license": "MIT",
"engines": {
diff --git a/packages/extract-proto/package.json b/packages/extract-proto/package.json
index c2b0623f..5afe3e14 100644
--- a/packages/extract-proto/package.json
+++ b/packages/extract-proto/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/extract-proto",
"description": "Protocol Buffers IDL catalog parser for Context",
- "version": "0.7.62",
+ "version": "0.7.63",
"type": "module",
"license": "MIT",
"engines": {
diff --git a/packages/extract-rush/package.json b/packages/extract-rush/package.json
index 62056dba..2975da9d 100644
--- a/packages/extract-rush/package.json
+++ b/packages/extract-rush/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/extract-rush",
"description": "Rush workspace structural index for Context",
- "version": "0.7.62",
+ "version": "0.7.63",
"type": "module",
"license": "MIT",
"engines": {
diff --git a/packages/extract-sql/package.json b/packages/extract-sql/package.json
index 6da83450..39ab93da 100644
--- a/packages/extract-sql/package.json
+++ b/packages/extract-sql/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/extract-sql",
"description": "Dialect-bound lightweight SQL evidence adapter for Context",
- "version": "0.7.62",
+ "version": "0.7.63",
"type": "module",
"license": "MIT",
"engines": {
diff --git a/packages/extract-style/package.json b/packages/extract-style/package.json
index 73b8d702..26c6a027 100644
--- a/packages/extract-style/package.json
+++ b/packages/extract-style/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/extract-style",
"description": "Lightweight CSS and SCSS evidence adapter for Context",
- "version": "0.7.62",
+ "version": "0.7.63",
"type": "module",
"license": "MIT",
"engines": {
diff --git a/packages/extract-thrift/package.json b/packages/extract-thrift/package.json
index af32a072..f0b7acf1 100644
--- a/packages/extract-thrift/package.json
+++ b/packages/extract-thrift/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/extract-thrift",
"description": "Apache Thrift IDL catalog parser for Context",
- "version": "0.7.62",
+ "version": "0.7.63",
"type": "module",
"license": "MIT",
"engines": {
diff --git a/packages/extract-ts/package.json b/packages/extract-ts/package.json
index 224f67bd..60d18251 100644
--- a/packages/extract-ts/package.json
+++ b/packages/extract-ts/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/extract-ts",
"description": "TypeScript and JavaScript extraction plugin for the Context ExtractionResult v2 contract",
- "version": "0.7.62",
+ "version": "0.7.63",
"type": "module",
"license": "MIT",
"engines": {
diff --git a/packages/extract/package.json b/packages/extract/package.json
index ef3c0eee..cf7bb604 100644
--- a/packages/extract/package.json
+++ b/packages/extract/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/extract",
"description": "Language-plugin framework and repository runner for Context code evidence",
- "version": "0.7.62",
+ "version": "0.7.63",
"type": "module",
"license": "MIT",
"engines": {
diff --git a/packages/tui/package.json b/packages/tui/package.json
index 9e22b275..b9a28dfe 100644
--- a/packages/tui/package.json
+++ b/packages/tui/package.json
@@ -1,7 +1,7 @@
{
"name": "@c4a/tui",
"description": "Shared terminal UI components (Ink + React) for Context development tools",
- "version": "0.7.62",
+ "version": "0.7.63",
"private": true,
"type": "module",
"license": "MIT",
diff --git a/plugins/context/repo-install/claude/.claude-plugin/plugin.json b/plugins/context/repo-install/claude/.claude-plugin/plugin.json
index 16905520..fabe9c93 100644
--- a/plugins/context/repo-install/claude/.claude-plugin/plugin.json
+++ b/plugins/context/repo-install/claude/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "c4a",
"description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
- "version": "0.7.62",
+ "version": "0.7.63",
"author": {
"name": "c4a"
},
diff --git a/plugins/context/repo-install/codex/.codex-plugin/plugin.json b/plugins/context/repo-install/codex/.codex-plugin/plugin.json
index b6d3fc8a..fe40b754 100644
--- a/plugins/context/repo-install/codex/.codex-plugin/plugin.json
+++ b/plugins/context/repo-install/codex/.codex-plugin/plugin.json
@@ -1,6 +1,6 @@
{
"name": "c4a",
- "version": "0.7.62",
+ "version": "0.7.63",
"description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
"author": { "name": "c4a" },
"homepage": "https://github.com/context4ai/c4a",
@@ -10,7 +10,7 @@
"skills": "./skills/",
"interface": {
"displayName": "C4A Context",
- "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.7.62",
+ "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.7.63",
"longDescription": "Create a Context workspace and use agent-guided next steps to register sources, run extraction, review candidates, build package outputs, and verify health without silently mutating source repositories.",
"developerName": "c4a",
"category": "Productivity",
diff --git a/plugins/context/repo-install/cursor/.cursor-plugin/plugin.json b/plugins/context/repo-install/cursor/.cursor-plugin/plugin.json
index 5f6b03c2..e6e71451 100644
--- a/plugins/context/repo-install/cursor/.cursor-plugin/plugin.json
+++ b/plugins/context/repo-install/cursor/.cursor-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "c4a",
"displayName": "C4A Context",
- "version": "0.7.62",
+ "version": "0.7.63",
"description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
"author": {
"name": "Context4AI",