diff --git a/README.md b/README.md index 8c91b69a..375b9217 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ ---- -title: Introduction -description: Robindoc is a framework for automatically creating documentation websites based on markdown files, built on React.js Server Components ---- +[robin.title]: # "Introduction" +[robin.description]: # "Robindoc is a framework for automatically creating documentation websites based on markdown files, built on React.js Server Components" # Robindoc @@ -11,6 +9,8 @@ Read the documentation in a convenient interface at [robindoc.com/docs](https:// + + Robindoc is a framework for automatically creating documentation websites based on markdown files, built on React.js Server Components. ```tsx diff --git a/packages/robindoc/package.json b/packages/robindoc/package.json index fbd29c13..01c059ac 100644 --- a/packages/robindoc/package.json +++ b/packages/robindoc/package.json @@ -1,6 +1,6 @@ { "name": "robindoc", - "version": "1.0.0", + "version": "1.0.1", "description": "", "main": "./lib/index.js", "scripts": { diff --git a/site/src/app/docs/[[...path]]/page.tsx b/site/src/app/docs/[[...path]]/page.tsx index e4236293..6ab67593 100644 --- a/site/src/app/docs/[[...path]]/page.tsx +++ b/site/src/app/docs/[[...path]]/page.tsx @@ -1,7 +1,9 @@ -import { Note } from "../../../components/ui/note"; -import { Page, Sidebar, getMeta, getPages, getPageData } from "./robindoc"; -import { KeylinkToNavigation } from "robindoc"; import Link from "next/link"; +import { KeylinkToNavigation } from "robindoc"; + +import { Page, Sidebar, getMeta, getPages, getPageData } from "./robindoc"; +import { Note } from "../../../components/ui/note"; +import { PackageLinks } from "../../../components/ui/package-links"; export default async function Docs({params}: {params: {path?: string[]}}) { const path = '/docs/' + (params.path?.join('/') || ''); @@ -15,6 +17,7 @@ export default async function Docs({params}: {params: {path?: string[]}}) { link={Link} components={{ Note, + PackageLinks, }} config={{ publicDirs: ['public'] diff --git a/site/src/app/docs/[[...path]]/robindoc.ts b/site/src/app/docs/[[...path]]/robindoc.ts index 24076a2c..8f98fbcd 100644 --- a/site/src/app/docs/[[...path]]/robindoc.ts +++ b/site/src/app/docs/[[...path]]/robindoc.ts @@ -2,8 +2,8 @@ import { initializeRobindoc } from "robindoc"; export const { Page, Sidebar, getPages, getMeta, getPageContent, getPageData } = initializeRobindoc(async () => ({ configuration: { - // sourceRoot: '../docs', - sourceRoot: 'https://github.com/vordgi/robindoc/tree/main/docs', + // sourceRoot: 'https://github.com/vordgi/robindoc/tree/main/docs', + sourceRoot: '../docs', basePath: '/docs', gitToken: process.env.GIT_TOKEN, }, @@ -13,7 +13,8 @@ export const { Page, Sidebar, getPages, getMeta, getPageContent, getPageData } = type: 'heading', href: '/', configuration: { - sourceRoot: 'https://github.com/vordgi/robindoc/tree/main/README.md', + // sourceRoot: 'https://github.com/vordgi/robindoc/tree/main/README.md', + sourceRoot: '..', } }, "auto-spreaded" diff --git a/site/src/components/ui/package-links/index.tsx b/site/src/components/ui/package-links/index.tsx new file mode 100644 index 00000000..f377f038 --- /dev/null +++ b/site/src/components/ui/package-links/index.tsx @@ -0,0 +1,30 @@ +import React from 'react'; + +import './package-links.scss'; + +export const PackageLinks = () => { + return ( +