Skip to content
Closed
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
65 changes: 57 additions & 8 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,20 @@ export default defineConfig({
...(!process.env.NETLIFY
? [
starlightLinksValidator({
exclude: ['/apis/**'],
// Blog listing, tag, and author pages are injected routes rather
// than content entries, so the validator cannot resolve them.
// Individual posts are real entries and stay validated.
exclude: [
'/apis/**',
'/agentkit/cookbooks/',
'/saaskit/cookbooks/',
'/agentkit/how-to/',
'/saaskit/how-to/',
'/agentkit/cookbooks/tags/**',
'/saaskit/cookbooks/tags/**',
'/agentkit/how-to/tags/**',
'/saaskit/how-to/tags/**',
],
}),
]
: []),
Expand All @@ -140,14 +153,50 @@ export default defineConfig({
},
// No baseUrl — prevents llms.txt generation (already handled by starlight-llms-txt)
}),
starlightBlog({
prefix: 'cookbooks',
rss: false,
metrics: {
readingTime: true,
words: 'total',
// Array form: starlight-blog 0.28+ supports multiple blog instances, one
// per prefix. Posts map to an instance by directory (src/content/docs/<prefix>/).
// `navigation: 'none'` keeps each instance out of the header — with several
// instances the default ('header-end') stacks a link per blog beside the
// theme switcher. Discovery goes through the secondary nav instead.
starlightBlog([
{
prefix: 'agentkit/cookbooks',
title: 'AgentKit cookbooks',
navigation: 'none',
rss: false,
metrics: {
readingTime: true,
words: 'total',
},
},
}),
{
prefix: 'saaskit/cookbooks',
title: 'Auth for SaaS cookbooks',
navigation: 'none',
rss: false,
metrics: {
readingTime: true,
words: 'total',
},
},
// How-to shelves carry short dashboard and workspace answers. Reading
// time is blog furniture that reads wrong on a two-minute "delete my
// account" answer, so it stays off here.
{
prefix: 'agentkit/how-to',
title: 'AgentKit how-to guides',
navigation: 'none',
rss: false,
metrics: { readingTime: false, words: false },
},
{
prefix: 'saaskit/how-to',
title: 'Auth for SaaS how-to guides',
navigation: 'none',
rss: false,
metrics: { readingTime: false, words: false },
},
]),
],
head: [
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"react": "^19.2.5",
"react-dom": "^19.2.5",
"sharp": "^0.35.3",
"starlight-blog": "^0.26.1",
"starlight-blog": "^0.28.0",
"starlight-image-zoom": "^0.14.2",
"starlight-links-validator": "^0.24.1",
"starlight-llms-txt": "^0.10.0",
Expand Down
100 changes: 30 additions & 70 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 15 additions & 9 deletions src/components/overrides/HeaderProductToggle.astro
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,21 @@ const productLinks = [
item.setAttribute('aria-selected', String(active))
})

// Secondary nav dual-row: show the matching product's tab set on shared paths
document.querySelectorAll('.secondary-nav-product[data-product]').forEach((row) => {
const rowProduct = row.getAttribute('data-product')
if (rowProduct === product) {
row.removeAttribute('hidden')
} else {
row.setAttribute('hidden', '')
}
})
// Secondary nav dual-row: show the matching product's tab set on shared paths.
// Only shared paths render both rows. Everywhere else renders a single row for
// the current product, and hiding it would leave the nav empty until the next
// page finishes loading — so leave it alone and let navigation replace it.
const navRows = document.querySelectorAll('.secondary-nav-product[data-product]')
if (navRows.length > 1) {
navRows.forEach((row) => {
const rowProduct = row.getAttribute('data-product')
if (rowProduct === product) {
row.removeAttribute('hidden')
} else {
row.setAttribute('hidden', '')
}
})
}

document.dispatchEvent(new CustomEvent('sk:product-context', { detail: { product } }))
}
Expand Down
8 changes: 6 additions & 2 deletions src/components/overrides/MarkdownContent.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
---
import Default from '@astrojs/starlight/components/MarkdownContent.astro'
// starlight-blog's own override branches internally: blog posts get post chrome
// (author byline, reading time), every other page falls through to Starlight's
// default. Nesting it here keeps that behaviour — rendering Starlight's default
// directly would shadow the plugin and silently drop the chrome.
import BlogMarkdownContent from 'starlight-blog/overrides/MarkdownContent.astro'
import VideosMarkdownContent from 'starlight-videos/components/MarkdownContent.astro'
import ImageZoom from 'starlight-image-zoom/components/ImageZoom.astro'
---

<ImageZoom />
<VideosMarkdownContent>
<Default><slot /></Default>
<BlogMarkdownContent><slot /></BlogMarkdownContent>
</VideosMarkdownContent>
5 changes: 3 additions & 2 deletions src/configs/llms.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Start with the Quickstart Collection, then follow the developer's question to th
label: 'AgentKit',
description:
'Complete AgentKit documentation with connectors, frameworks, and tool calling for AI agents',
paths: ['agentkit/**', 'dev-kit/ai-assisted-development/**', 'cookbooks/**'],
paths: ['agentkit/**', 'dev-kit/ai-assisted-development/**'],
},
{
label: 'AgentKit Frameworks',
Expand Down Expand Up @@ -139,7 +139,8 @@ Start with the Quickstart Collection, then follow the developer's question to th
'**/overview', // All overview pages
'**/quickstart', // All quickstart guides
'agentkit/examples/**', // Framework examples (high value for agent queries)
'cookbooks/**', // Practical cookbooks
'agentkit/cookbooks/**', // Practical AgentKit cookbooks
'saaskit/cookbooks/**', // Practical Auth for SaaS cookbooks
'fsa/data-modelling', // Critical data modeling guide
'authenticate/set-up-scalekit', // Initial setup
'authenticate/fsa/complete-login', // Core FSA flow
Expand Down
Loading