Skip to content
Open
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
5 changes: 3 additions & 2 deletions scripts/collections/build-file-tree.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export async function buildFileTree(entry = COLLECTIONS_ROOT) {
const file = await fs.readFile(entryPath, "utf-8");
const parentSection = await getDirData(path.resolve(parentSegment));

const { title, mainNavExclude, isDeprecated } = matter(file).data;
const { title, nav_title, mainNavExclude, isDeprecated } =
matter(file).data;

/**
* @todo
Expand All @@ -61,7 +62,7 @@ export async function buildFileTree(entry = COLLECTIONS_ROOT) {
.replace(/\.mdx?/, ""),
slug: path.basename(entryPath, path.extname(entryPath)),
parent: parentSection.title,
title,
title: nav_title ?? title,
mainNavExclude,
isDeprecated,
isTranslated: true,
Expand Down
4 changes: 2 additions & 2 deletions scripts/create-i18n-entries.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ async function buildSectionList(entryList = [], locale, project = "") {
);

if (existsSync(i18nEntryPath + ".mdx")) {
const { title, isDeprecated } = await getFrontMatterData(
const { title, nav_title, isDeprecated } = await getFrontMatterData(
i18nEntryPath + ".mdx"
);

sectionList.push({
...entry,
path: path.join(locale, entry.path),
title,
title: nav_title ?? title,
isDeprecated,
isTranslated: true,
});
Expand Down
4 changes: 3 additions & 1 deletion src/routes/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: Overview
title: Solid Docs
nav_title: Overview
titleTemplate: ":title"
mainNavExclude: true
use_cases: >-
getting started, learning solid, understanding framework, first project,
Expand Down
4 changes: 3 additions & 1 deletion src/routes/solid-meta/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: Overview
title: Solid Meta Docs
nav_title: Overview
titleTemplate: ":title"
mainNavExclude: true
use_cases: >-
managing head tags, seo optimization, document metadata, dynamic meta tags,
Expand Down
4 changes: 3 additions & 1 deletion src/routes/solid-router/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: Overview
title: Solid Router Docs
nav_title: Overview
titleTemplate: ":title"
use_cases: >-
understanding routing, learning basics, overview needed, getting started, spa
routing concepts
Expand Down
4 changes: 3 additions & 1 deletion src/routes/solid-start/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: Overview
title: SolidStart Docs
nav_title: Overview
titleTemplate: ":title"
use_cases: >-
getting started, new projects, learning solidstart, framework overview,
architecture decisions
Expand Down
4 changes: 0 additions & 4 deletions src/solidbase-theme/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ import { NotFound } from "~/ui/not-found";
import { I18nProvider } from "~/i18n/i18n-context";
import { useThemeListener } from "@kobalte/solidbase/client";
import { usePace } from "@kobalte/solidbase/default-theme/pace.js";
import { Title } from "@solidjs/meta";
import { useProjectTitle } from "~/ui/use-project";

export default function (props: RouteSectionProps) {
useThemeListener();
usePace();
const projectTitle = useProjectTitle();

return (
<I18nProvider>
<Title>{projectTitle()}</Title>
<ErrorBoundary fallback={() => <NotFound />}>
<Layout>{props.children}</Layout>
</ErrorBoundary>
Expand Down
6 changes: 0 additions & 6 deletions src/ui/docs-layout.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { Show, onMount, JSX } from "solid-js";
import { useLocation } from "@solidjs/router";
import { Title } from "@solidjs/meta";
import { coreEntries } from "solid:collection";
import { Pagination } from "~/ui/pagination";
import { EditPageLink } from "./edit-page-link";
import { PageIssueLink } from "./page-issue-link";
import { useProjectTitle } from "./use-project";

interface DocsLayoutProps {
entries: typeof coreEntries;
Expand All @@ -14,7 +12,6 @@ interface DocsLayoutProps {

export const DocsLayout = (props: DocsLayoutProps) => {
const location = useLocation();
const projectTitle = useProjectTitle();

const collection = () =>
location.pathname.includes("/reference/")
Expand All @@ -41,9 +38,6 @@ export const DocsLayout = (props: DocsLayoutProps) => {
return (
<Show when={props.entries} keyed>
<>
<Show when={titles()?.title} fallback={<Title>SolidDocs</Title>}>
{(title) => <Title>{`${title()} - ${projectTitle()}`}</Title>}
</Show>
<article class="expressive-code-overrides mx-auto w-full max-w-2xl overflow-hidden pb-16">
<Show when={titles()?.parent}>
{(t) => (
Expand Down