mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
Chore: Rename Git repository to fumadocs
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
---
|
||||
'fumadocs-contentlayer': patch
|
||||
'fumadocs-core': patch
|
||||
'create-fumadocs-app': patch
|
||||
'fumadocs-mdx': patch
|
||||
'fumadocs-openapi': patch
|
||||
'fumadocs-ui': patch
|
||||
---
|
||||
|
||||
Rename Git repository to `fumadocs`
|
||||
@@ -33,7 +33,7 @@ export default function DocsPage(): JSX.Element {
|
||||
</p>
|
||||
<div className="mt-4 grid grid-cols-2 gap-4">
|
||||
<a
|
||||
href="https://github.com/fuma-nama/next-docs"
|
||||
href="https://github.com/fuma-nama/fumadocs"
|
||||
rel="noreferrer noopener"
|
||||
className={cn(buttonVariants({ size: 'lg' }))}
|
||||
>
|
||||
|
||||
@@ -84,7 +84,7 @@ export default function Showcase(): JSX.Element {
|
||||
</p>
|
||||
<div className="mt-4">
|
||||
<a
|
||||
href="https://github.com/fuma-nama/next-docs/discussions/30"
|
||||
href="https://github.com/fuma-nama/fumadocs/discussions/30"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
className={cn(buttonVariants())}
|
||||
|
||||
@@ -29,7 +29,7 @@ export default function Page({ params }: { params: Param }): JSX.Element {
|
||||
enabled: page.data.toc,
|
||||
footer: (
|
||||
<a
|
||||
href={`https://github.com/fuma-nama/next-docs/blob/main/${path}`}
|
||||
href={`https://github.com/fuma-nama/fumadocs/blob/main/${path}`}
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
className="inline-flex items-center text-xs text-muted-foreground hover:text-foreground"
|
||||
|
||||
@@ -17,7 +17,7 @@ export const layoutOptions: Omit<DocsLayoutProps, 'children'> = {
|
||||
</>
|
||||
),
|
||||
children: <NavChildren />,
|
||||
githubUrl: 'https://github.com/fuma-nama/next-docs',
|
||||
githubUrl: 'https://github.com/fuma-nama/fumadocs',
|
||||
},
|
||||
sidebar: {
|
||||
defaultOpenLevel: 0,
|
||||
|
||||
@@ -65,7 +65,7 @@ function Footer(): JSX.Element {
|
||||
|
||||
<div className="flex flex-row flex-wrap items-center gap-12">
|
||||
<a
|
||||
href="https://github.com/fuma-nama/next-docs"
|
||||
href="https://github.com/fuma-nama/fumadocs"
|
||||
rel="noreferrer noopener"
|
||||
className="flex flex-row items-center text-sm text-muted-foreground transition-colors hover:text-accent-foreground"
|
||||
>
|
||||
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
collapsible
|
||||
className="rounded-xl bg-background px-4"
|
||||
>
|
||||
<Accordion id="what-is-next-docs" title="What is Fumadocs?">
|
||||
<Accordion id="what-is-fumadocs" title="What is Fumadocs?">
|
||||
A framework for building documentations
|
||||
</Accordion>
|
||||
<Accordion id="ux" title="What do we love?">
|
||||
|
||||
@@ -13,7 +13,7 @@ import { resolve } from 'url';
|
||||
|
||||
const time = await getGithubLastEdit({
|
||||
owner: 'fuma-nama',
|
||||
repo: 'next-docs',
|
||||
repo: 'fumadocs',
|
||||
// example: "content/docs/index.mdx"
|
||||
path: resolve('content/docs/', page.file.path),
|
||||
});
|
||||
|
||||
@@ -124,7 +124,7 @@ export const blogs = loader({
|
||||
You can customise the options passed to the MDX processor.
|
||||
|
||||
```js
|
||||
const withNextDocs = createMDX({
|
||||
const withMDX = createMDX({
|
||||
mdxOptions: {
|
||||
remarkPlugins: [remarkMath],
|
||||
// When order matters
|
||||
@@ -138,7 +138,7 @@ const withNextDocs = createMDX({
|
||||
The built-in configuration applies a remark plugin that turns `vfile.data` properties into exports, you can define additional properties to be exported.
|
||||
|
||||
```js
|
||||
const withNextDocs = createMDX({
|
||||
const withMDX = createMDX({
|
||||
mdxOptions: {
|
||||
valueToExport: ['dataName'],
|
||||
},
|
||||
|
||||
@@ -21,11 +21,11 @@ Add the remark/rehype plugins you have installed above.
|
||||
The code might be vary depending on your content source, here is an example for Fumadocs MDX:
|
||||
|
||||
```ts
|
||||
import createNextDocs from 'fumadocs-mdx/config';
|
||||
import createMDX from 'fumadocs-mdx/config';
|
||||
import rehypeKatex from 'rehype-katex';
|
||||
import remarkMath from 'remark-math';
|
||||
|
||||
const withNextDocs = createNextDocs({
|
||||
const withMDX = createMDX({
|
||||
mdxOptions: {
|
||||
remarkPlugins: [remarkMath],
|
||||
// Place it at first so that it won't be changed by rehype-pretty-code
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import createNextDocsMDX from 'fumadocs-mdx/config';
|
||||
import createMDX from 'fumadocs-mdx/config';
|
||||
|
||||
const withFumaMDX = createNextDocsMDX();
|
||||
const withMDX = createMDX();
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const config = {
|
||||
reactStrictMode: true,
|
||||
};
|
||||
|
||||
export default withFumaMDX(config);
|
||||
export default withMDX(config);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"Docs"
|
||||
],
|
||||
"homepage": "https://fumadocs.vercel.app",
|
||||
"repository": "github:fuma-nama/next-docs",
|
||||
"repository": "github:fuma-nama/fumadocs",
|
||||
"license": "MIT",
|
||||
"author": "Fuma Nama",
|
||||
"type": "module",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"Docs"
|
||||
],
|
||||
"homepage": "https://fumadocs.vercel.app",
|
||||
"repository": "github:fuma-nama/next-docs",
|
||||
"repository": "github:fuma-nama/fumadocs",
|
||||
"license": "MIT",
|
||||
"author": "Fuma Nama",
|
||||
"type": "module",
|
||||
|
||||
@@ -8,7 +8,7 @@ type Response = {
|
||||
|
||||
export interface GetGithubLastCommitOptions {
|
||||
/**
|
||||
* Repository name, like "next-docs"
|
||||
* Repository name, like "fumadocs"
|
||||
*/
|
||||
repo: string;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"Docs"
|
||||
],
|
||||
"homepage": "https://fumadocs.vercel.app",
|
||||
"repository": "github:fuma-nama/next-docs",
|
||||
"repository": "github:fuma-nama/fumadocs",
|
||||
"license": "MIT",
|
||||
"author": "Fuma Nama",
|
||||
"type": "module",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
This is a Next.js application generated with
|
||||
[Create Fumadocs](https://github.com/fuma-nama/next-docs).
|
||||
[Create Fumadocs](https://github.com/fuma-nama/fumadocs).
|
||||
|
||||
Run development server:
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import createNextDocsMDX from 'fumadocs-mdx/config';
|
||||
import createMDX from 'fumadocs-mdx/config';
|
||||
|
||||
const withMDX = createNextDocsMDX();
|
||||
const withMDX = createMDX();
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const config = {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"Docs"
|
||||
],
|
||||
"homepage": "https://fumadocs.vercel.app",
|
||||
"repository": "github:fuma-nama/next-docs",
|
||||
"repository": "github:fuma-nama/fumadocs",
|
||||
"license": "MIT",
|
||||
"author": "Fuma Nama",
|
||||
"exports": {
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from 'fumadocs-core/mdx-plugins';
|
||||
import type { PluggableList } from 'unified';
|
||||
import type { Configuration } from 'webpack';
|
||||
import { NextDocsWebpackPlugin } from './webpack-plugins/next-docs';
|
||||
import { MapWebpackPlugin } from './webpack-plugins/map-plugin';
|
||||
import remarkMdxExport from './mdx-plugins/remark-exports';
|
||||
import type { LoaderOptions } from './loader';
|
||||
import type { Options as MDXLoaderOptions } from './loader-mdx';
|
||||
@@ -34,7 +34,7 @@ type MDXOptions = Omit<
|
||||
|
||||
type ResolvePlugins = PluggableList | ((v: PluggableList) => PluggableList);
|
||||
|
||||
interface NextDocsMDXOptions {
|
||||
export interface CreateMDXOptions {
|
||||
cwd?: string;
|
||||
|
||||
mdxOptions?: MDXOptions;
|
||||
@@ -73,7 +73,7 @@ const createMDX =
|
||||
cwd = process.cwd(),
|
||||
rootMapPath = './.map.ts',
|
||||
rootContentPath = './content',
|
||||
}: NextDocsMDXOptions = {}) =>
|
||||
}: CreateMDXOptions = {}) =>
|
||||
(nextConfig: NextConfig = {}) => {
|
||||
const valueToExport = [
|
||||
'structuredData',
|
||||
@@ -149,9 +149,7 @@ const createMDX =
|
||||
|
||||
config.plugins ||= [];
|
||||
|
||||
config.plugins.push(
|
||||
new NextDocsWebpackPlugin({ rootMapFile: _mapPath }),
|
||||
);
|
||||
config.plugins.push(new MapWebpackPlugin({ rootMapFile: _mapPath }));
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-return -- not provided
|
||||
return nextConfig.webpack?.(config, options) ?? config;
|
||||
|
||||
@@ -13,7 +13,7 @@ export interface Options extends ProcessorOptions {
|
||||
lastModifiedTime?: 'git' | 'none';
|
||||
}
|
||||
|
||||
export interface NextDocsBuildInfo {
|
||||
interface InternalBuildInfo {
|
||||
__next_docs?: {
|
||||
path: string;
|
||||
/**
|
||||
@@ -69,7 +69,7 @@ export default async function loader(
|
||||
})
|
||||
.then(
|
||||
(file) => {
|
||||
const info = this._module?.buildInfo as NextDocsBuildInfo;
|
||||
const info = this._module?.buildInfo as InternalBuildInfo;
|
||||
|
||||
info.__next_docs = {
|
||||
path: filePath,
|
||||
|
||||
+3
-3
@@ -14,7 +14,7 @@ declare const map: Record<string, unknown>
|
||||
export { map }
|
||||
`.trim();
|
||||
|
||||
export class NextDocsWebpackPlugin {
|
||||
export class MapWebpackPlugin {
|
||||
options: Options;
|
||||
|
||||
constructor(options: Options) {
|
||||
@@ -22,9 +22,9 @@ export class NextDocsWebpackPlugin {
|
||||
}
|
||||
|
||||
apply(compiler: Compiler): void {
|
||||
const logger = compiler.getInfrastructureLogger(NextDocsWebpackPlugin.name);
|
||||
const logger = compiler.getInfrastructureLogger(MapWebpackPlugin.name);
|
||||
|
||||
compiler.hooks.beforeCompile.tap(NextDocsWebpackPlugin.name, () => {
|
||||
compiler.hooks.beforeCompile.tap(MapWebpackPlugin.name, () => {
|
||||
if (firstLoad && !fs.existsSync(this.options.rootMapFile)) {
|
||||
fs.writeFileSync(this.options.rootMapFile, content);
|
||||
logger.info('Created map.ts file for you automatically');
|
||||
@@ -7,7 +7,7 @@
|
||||
"Docs"
|
||||
],
|
||||
"homepage": "https://fumadocs.vercel.app",
|
||||
"repository": "github:fuma-nama/next-docs",
|
||||
"repository": "github:fuma-nama/fumadocs",
|
||||
"license": "MIT",
|
||||
"author": "Fuma Nama",
|
||||
"type": "module",
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"Docs"
|
||||
],
|
||||
"homepage": "https://fumadocs.vercel.app",
|
||||
"repository": "github:fuma-nama/next-docs",
|
||||
"repository": "github:fuma-nama/fumadocs",
|
||||
"license": "MIT",
|
||||
"author": "Fuma Nama",
|
||||
"exports": {
|
||||
|
||||
Reference in New Issue
Block a user