Skip to content

Commit 377d238

Browse files
feat(docs): update documentation structure and content (#1882)
* feat(docs): update documentation structure and content - Removed outdated guides: `bounties.mdx`, `getting-started.mdx`, and `project-structure.mdx`. - Added new guides: `building-tools.mdx`, `building-views.mdx`, `deployment.mdx`, and `project-structure.mdx` to enhance clarity on tool creation and deployment processes. - Updated translations in `ui.ts` for improved navigation labels in both English and Portuguese. - Enhanced navigation logic in `navigation.ts` to ensure consistent ordering of documentation links. * chore: update bun.lockb to reflect dependency changes * Update docs/view/src/content/en/no-code-guides/creating-agents.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix(docs): correct minor translation and formatting issues in Portuguese documentation - Updated the warning callout in `deployment.mdx` for consistency in verb tense. - Fixed punctuation in the resource validation list in `resources.mdx`. - Adjusted wording in the context engineers guide for clarity in `context-engineers.mdx`. --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 94a6a03 commit 377d238

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+4534
-4263
lines changed

bun.lockb

-7.01 KB
Binary file not shown.

docs/view/src/components/ui/RenderDocument.astro

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,28 @@ import { AccordionGroup } from "./AccordionGroup";
1818
import Callout from "./Callout.astro";
1919
import Card from "./Card.astro";
2020
import { Properties } from "./Properties";
21+
import { ui } from "../../i18n/ui";
2122
2223
const { doc } = Astro.props;
2324
const { Content } = await render(doc);
2425
2526
// Extract breadcrumb from the path
2627
const pathParts = doc.id.split("/").slice(1);
28+
const locale = doc.id.split("/")[0] as keyof typeof ui;
29+
const translations = ui[locale] || ui.en;
30+
31+
// Get translated breadcrumb if available
2732
const breadcrumb =
2833
pathParts.length > 1
29-
? pathParts[0].charAt(0).toUpperCase() + pathParts[0].slice(1)
34+
? translations[
35+
`sidebar.section.${pathParts[0]}` as keyof typeof translations
36+
] || pathParts[0].charAt(0).toUpperCase() + pathParts[0].slice(1)
3037
: undefined;
3138
3239
// Generate markdown path for viewing raw file
3340
const markdownPath = `/src/content/${doc.id}.mdx`;
3441
3542
// Get navigation links
36-
const locale = doc.id.split("/")[0];
3743
const navigationLinks = await getNavigationLinks(doc.id, locale);
3844
3945
// Components mapping for custom markdown rendering

docs/view/src/components/ui/Sidebar.astro

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,54 @@ function buildTree(docs: any[]): TreeNode[] {
5858
5959
// For files only - custom ordering
6060
if (a.type === "file" && b.type === "file") {
61-
// Force introduction to be first regardless of filename
61+
// Force introduction to be first
6262
if (a.name.includes("introduction")) return -1;
6363
if (b.name.includes("introduction")) return 1;
6464
65-
// Then getting-started
66-
if (a.name.includes("getting-started")) return -1;
67-
if (b.name.includes("getting-started")) return 1;
68-
69-
// Then project-structure
70-
if (a.name.includes("project-structure")) return -1;
71-
if (b.name.includes("project-structure")) return 1;
65+
// Get parent folder to determine which order to use
66+
const parentPath = a.path[a.path.length - 2];
67+
68+
// Custom order for no-code-guides files
69+
if (parentPath === "no-code-guides") {
70+
const noCodeOrder = ["creating-tools.mdx", "creating-agents.mdx"];
71+
const aIndex = noCodeOrder.indexOf(a.name);
72+
const bIndex = noCodeOrder.indexOf(b.name);
73+
if (aIndex !== -1 && bIndex !== -1) {
74+
return aIndex - bIndex;
75+
}
76+
if (aIndex !== -1) return -1;
77+
if (bIndex !== -1) return 1;
78+
}
7279
73-
// Then cli-reference
74-
if (a.name.includes("cli-reference")) return -1;
75-
if (b.name.includes("cli-reference")) return 1;
80+
// Custom order for full-code-guides files
81+
if (parentPath === "full-code-guides") {
82+
const fullCodeOrder = [
83+
"project-structure.mdx",
84+
"building-tools.mdx",
85+
"building-views.mdx",
86+
"resources.mdx",
87+
"deployment.mdx",
88+
];
89+
const aIndex = fullCodeOrder.indexOf(a.name);
90+
const bIndex = fullCodeOrder.indexOf(b.name);
91+
if (aIndex !== -1 && bIndex !== -1) {
92+
return aIndex - bIndex;
93+
}
94+
if (aIndex !== -1) return -1;
95+
if (bIndex !== -1) return 1;
96+
}
97+
}
7698
77-
// Then bounties (last)
78-
if (a.name.includes("bounties")) return -1;
79-
if (b.name.includes("bounties")) return 1;
99+
// For folders - custom ordering
100+
if (a.type === "folder" && b.type === "folder") {
101+
// getting-started before everything else
102+
if (a.name === "getting-started") return -1;
103+
if (b.name === "getting-started") return 1;
104+
// no-code-guides before full-code-guides
105+
if (a.name === "no-code-guides") return -1;
106+
if (b.name === "no-code-guides") return 1;
107+
if (a.name === "full-code-guides") return -1;
108+
if (b.name === "full-code-guides") return 1;
80109
}
81110
82111
// Default alphabetical

docs/view/src/content/en/bounties.mdx

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)