Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c59b664
feat: add copy page action for llms
LadyBluenotes Mar 31, 2026
7450ae0
feat: add copy page dropdown actions
LadyBluenotes Mar 31, 2026
793985a
feat: make copy page labels configurable
LadyBluenotes Mar 31, 2026
61fad14
feat: make llm page actions configurable
LadyBluenotes Mar 31, 2026
b950d6c
wip
LadyBluenotes Mar 31, 2026
0c3b22a
feat: implement copy page functionality with shared state for themes
LadyBluenotes Apr 1, 2026
b3462d1
feat: enhance copy page functionality with client readiness check and…
LadyBluenotes Apr 2, 2026
9590331
feat: adjust layout for improved responsiveness and prevent overflow
LadyBluenotes Apr 2, 2026
8d5eb24
feat: enhance copy functionality with navigation reset handling and l…
LadyBluenotes Apr 2, 2026
8ce5fdb
feat: normalize MDX nodes and enhance markdown conversion for directi…
LadyBluenotes Apr 2, 2026
d396300
feat: enhance markdown processing with directive container support an…
LadyBluenotes Apr 2, 2026
e22c5ca
feat: simplify plugin filtering by extracting document-only skipped l…
LadyBluenotes Apr 2, 2026
52811fe
feat: enhance markdown processing with tab group normalization and re…
LadyBluenotes Apr 2, 2026
0616bb9
refactor: rename llms.ts to page-markdown.ts and update imports; enha…
LadyBluenotes Apr 2, 2026
fb299df
refactor: simplify feedback handling in copy button; remove authored …
LadyBluenotes Apr 2, 2026
e9a5525
refactor: update type imports and remove unused options in code impor…
LadyBluenotes Apr 2, 2026
55c0883
refactor: use @solid-primitives/clipboard
LadyBluenotes Apr 4, 2026
e5fd0ca
refactor
LadyBluenotes Apr 4, 2026
7c54f6c
fix removed line
LadyBluenotes Apr 6, 2026
7750f59
add mdx heading copy button and fix code file path resolution
LadyBluenotes Apr 7, 2026
853e333
add configurable page action badges
LadyBluenotes Apr 7, 2026
dc0c076
add configurable page action badges
LadyBluenotes Apr 7, 2026
3150006
some docs
LadyBluenotes Apr 7, 2026
f36c0af
rm duplication
LadyBluenotes Apr 8, 2026
0d0115c
rm duplication
LadyBluenotes Apr 8, 2026
a262396
disable copy in dev
LadyBluenotes Apr 8, 2026
49fa380
update headers for md
LadyBluenotes Apr 8, 2026
ce4924a
update actions to badges
LadyBluenotes Apr 8, 2026
c3dd811
text/markdown
LadyBluenotes Apr 8, 2026
225b172
update icons
LadyBluenotes Apr 8, 2026
66bd830
update icons
LadyBluenotes Apr 8, 2026
dbdf587
fix class
LadyBluenotes Apr 8, 2026
ea96f52
updates badges in frontmatter for docs refs
LadyBluenotes Apr 8, 2026
cf68263
fix ts
jer3m01 Apr 10, 2026
986a68c
format
jer3m01 Apr 10, 2026
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
gt pul
<div align="center">
<a href="https://github.com/kobaltedev/solidbase" target="_blank"><img width="400" src="https://raw.githubusercontent.com/kobaltedev/solidbase/refs/heads/main/.github/solidbase.png" alt="SolidBase"></a>
</div>
Expand Down
66 changes: 44 additions & 22 deletions docs/src/routes/guide/features/(3)llms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,35 @@ import { createSolidBase, defineTheme } from "@kobalte/solidbase/config";
import defaultTheme from "@kobalte/solidbase/default-theme";

const theme = defineTheme({
componentsPath: import.meta.resolve("./src/solidbase-theme"),
extends: defaultTheme,
componentsPath: import.meta.resolve("./src/solidbase-theme"),
extends: defaultTheme,
});

const solidBase = createSolidBase(theme);

export default {
...solidBase.startConfig({
ssr: true,
}),
plugins: [
solidBase.plugin({
title: "My Docs",
description: "Documentation for my project",
llms: true,
themeConfig: {
sidebar: {
"/": [
{
title: "Guide",
items: [{ title: "Getting Started", link: "/guide/getting-started" }],
},
],
},
},
}),
],
...solidBase.startConfig({
ssr: true,
}),
plugins: [
solidBase.plugin({
title: "My Docs",
description: "Documentation for my project",
llms: true,
themeConfig: {
sidebar: {
"/": [
{
title: "Guide",
items: [
{ title: "Getting Started", link: "/guide/getting-started" },
],
},
],
},
},
}),
],
};
```

Expand All @@ -50,6 +52,26 @@ Once enabled, the build emits:
- `llms.txt` at the site root
- one `.md` file per markdown route, such as `index.md` and `guide/getting-started.md`

## Default theme page actions

When you use the default theme, enabling `llms: true` also adds a page-level copy button that copies the generated markdown for the current page.

```ts title="app.config.ts"
solidBase.plugin({
llms: true,
});
```

The button uses the same generated `.md` output that powers `llms.txt`, so the copied content stays aligned with the markdown artifacts emitted by the build.

If you're building a custom theme, you can reuse the same behavior from the client API instead of copying the default theme implementation:

```ts title="theme.tsx"
import { useCopyPageMarkdown } from "@kobalte/solidbase/client";
```

The hook exposes copy state, in-flight state, and page eligibility so custom themes can provide their own UI while keeping the same LLMS-backed behavior.

## What goes into `llms.txt`

SolidBase builds the index from your docs metadata:
Expand Down
31 changes: 29 additions & 2 deletions docs/src/routes/reference/default-theme/components/article.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,40 @@
---
title: Article
badges:
- icon: npm
label: since 0.0.9
- icon: source
label: Source
url: https://github.com/kobaltedev/solidbase/blob/main/src/default-theme/components/Article.tsx
---

# {frontmatter.title}

## Edit Link

TODO
Shows the configured edit link for the current page.

Requirements:

- global `editPath` must be configured
- page `editLink` frontmatter must not be `false`

The link target comes from `pageData().editLink`.

## Last Updated

The last updated date is extracted using git at compile time.
Last updated rendering is handled by [`LastUpdated`](/reference/default-theme/components/last-updated).

Copy button behavior is handled by [`CopyPageLink`](/reference/default-theme/components/copy-page-link).

## Other Responsibilities

The component also:

- includes landing-page [`Hero`](/reference/default-theme/components/hero) and [`Features`](/reference/default-theme/components/features)
- includes heading badges through [`Badges`](/reference/default-theme/components/badges)
- wraps the page content
- manages previous and next navigation
- includes the [`Footer`](/reference/default-theme/components/footer) when enabled
- places [`TableOfContents`](/reference/default-theme/components/toc) in the aside on non-mobile layouts
- adds keyboard support for selecting expressive-code blocks
40 changes: 40 additions & 0 deletions docs/src/routes/reference/default-theme/components/badges.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Badges
badges:
- icon: npm
label: since 0.5.0
- icon: source
label: Source
url: https://github.com/kobaltedev/solidbase/blob/main/src/default-theme/components/Badges.tsx
---

# {frontmatter.title}

Badge row shown underneath a page heading.

## Props

```ts
function Badges(props: {
badges?: Array<{
icon?: string;
label: string;
url?: string;
}>;
}): JSX.Element;
```

## Data Source

- page frontmatter `badges`
- `themeConfig.badges.icons`

## Behavior

- omitted when no badges are provided
- resolves `badge.icon` from `themeConfig.badges.icons`
- supports icon values as raw SVG strings
- supports icon values as Solid components
- uses linked badges when `url` is present
- uses static badges when `url` is omitted
- falls back to label-only badges when an icon key is missing
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Copy Page Link
badges:
- icon: npm
label: since 0.5.0
- icon: source
label: Source
url: https://github.com/kobaltedev/solidbase/blob/main/src/default-theme/components/CopyPageLink.tsx
---

# {frontmatter.title}

Page-heading control for copying the current page's generated markdown.

## Data Source

- [`useCopyPageMarkdown`](/reference/runtime-api#usecopypagemarkdown)
- `themeConfig.text`

## Behavior

- omitted when page markdown copying is unavailable
- exposes idle, success, and error states
- disables interaction until the client is ready
- updates its icon for each copy state
- uses the localized theme text labels for button content

## State Labels

- idle: `copyPage`
- success: `copiedPage`
- error: `copyFailedPage`
27 changes: 26 additions & 1 deletion docs/src/routes/reference/default-theme/components/features.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
---
title: Features
badges:
- icon: npm
label: since 0.0.9
- icon: source
label: Source
url: https://github.com/kobaltedev/solidbase/blob/main/src/default-theme/components/Features.tsx
---

# {frontmatter.title}

TODO
Landing-page feature grid.

## Props

```ts
function Features(props: {
features: Array<{
icon?: string;
title?: string;
details?: string;
}>;
}): JSX.Element;
```

## Behavior

- creates one card per feature
- `icon` is injected as HTML
- `title` becomes the card heading
- `details` becomes the body copy
6 changes: 6 additions & 0 deletions docs/src/routes/reference/default-theme/components/footer.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
---
title: Footer
badges:
- icon: npm
label: since 0.0.9
- icon: source
label: Source
url: https://github.com/kobaltedev/solidbase/blob/main/src/default-theme/components/Footer.tsx
---

# {frontmatter.title}
Expand Down
23 changes: 22 additions & 1 deletion docs/src/routes/reference/default-theme/components/header.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
---
title: Header
badges:
- icon: npm
label: since 0.0.9
- icon: source
label: Source
url: https://github.com/kobaltedev/solidbase/blob/main/src/default-theme/components/Header.tsx
---

# {frontmatter.title}

TODO
Top navigation, locale controls, theme controls, and mobile navigation affordances.

## Uses

- `themeConfig.nav`
- `themeConfig.logo`
- sidebar state from the default-theme context
- page table of contents data

## Behavior

- shows desktop nav links when `themeConfig.nav` is set
- uses a mobile nav dialog on small screens
- includes [`LocaleSelector`](/reference/default-theme/components/locale-selector) and [`ThemeSelector`](/reference/default-theme/components/theme-selector)
- shows mobile sidebar and table-of-contents toggles only when content exists
- marks nav links active using `activeMatch` or the item `link`
39 changes: 37 additions & 2 deletions docs/src/routes/reference/default-theme/components/hero.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,43 @@
---
title: Hero
badges:
- icon: npm
label: since 0.0.9
- icon: source
label: Source
url: https://github.com/kobaltedev/solidbase/blob/main/src/default-theme/components/Hero.tsx
---

# {frontmatter.title}

TODO

Landing-page hero block.

## Props

```ts
function Hero(props: {
data: {
name?: string;
text?: string;
tagline?: string;
image?: {
src: string;
alt?: string;
};
actions?: Array<{
theme?: string;
text?: string;
link?: string;
}>;
};
}): JSX.Element;
```

## Behavior

- uses page `frontmatter.title` as the main heading
- includes `text`, `tagline`, and `image` when present
- includes action links from `data.actions`
- external action links open in a new tab
- action `theme` defaults to `brand`

Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
---
title: Last Updated
badges:
- icon: npm
label: since 0.0.9
- icon: source
label: Source
url: https://github.com/kobaltedev/solidbase/blob/main/src/default-theme/components/LastUpdated.tsx
---

# {frontmatter.title}

TODO
Displays the current page timestamp.

The last updated date is extracted using git at compile time.
## Data Source

- reads `pageData().lastUpdated`
- formats the date with the global `lastUpdated` config

## Behavior

- shows `Last updated: ?` when no valid timestamp is available
- uses `Intl.DateTimeFormat` with the active runtime locale
- defaults come from the global SolidBase config
17 changes: 16 additions & 1 deletion docs/src/routes/reference/default-theme/components/link.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
---
title: Link
badges:
- icon: npm
label: since 0.0.9
- icon: source
label: Source
url: https://github.com/kobaltedev/solidbase/blob/main/src/default-theme/components/Link.tsx
---

# {frontmatter.title}

Used for theme-owned links such as edit links and skip links.

TODO
## Props

Accepts standard anchor element props.

## Behavior

- adds default theme link styling
- treats URLs containing `://` as outbound
- adds `target="_blank"` and `rel="noopener noreferrer"` to outbound links
Loading
Loading