Chore: Rename Git repository to fumadocs

This commit is contained in:
Fuma Nama
2024-01-27 18:46:55 +08:00
parent 9534b4a26f
commit 6c5a39a9c7
23 changed files with 43 additions and 35 deletions
+10
View File
@@ -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`
+1 -1
View File
@@ -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' }))}
>
+1 -1
View File
@@ -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())}
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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"
>
+1 -1
View File
@@ -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),
});
+2 -2
View File
@@ -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'],
},
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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);
+1 -1
View File
@@ -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",
+1 -1
View File
@@ -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",
+1 -1
View File
@@ -8,7 +8,7 @@ type Response = {
export interface GetGithubLastCommitOptions {
/**
* Repository name, like "next-docs"
* Repository name, like "fumadocs"
*/
repo: string;
+1 -1
View File
@@ -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 = {
+1 -1
View File
@@ -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": {
+4 -6
View File
@@ -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;
+2 -2
View File
@@ -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,
@@ -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');
+1 -1
View File
@@ -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",
+1 -1
View File
@@ -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": {