@@ -40,7 +40,7 @@ Create a `.env.local` file in the root directory:
4040
4141``` env
4242GITHUB_TOKEN=your_github_personal_access_token_here
43- NEXT_PUBLIC_SITE_URL=http://localhost:3001
43+ NEXT_PUBLIC_SITE_URL=http://localhost:3000
4444```
4545
4646#### Getting a GitHub Token
@@ -118,32 +118,32 @@ Edit [`lib/config.ts`](lib/config.ts) and add your plugin to the `plugins` array
118118export const config: Config = {
119119 plugins: [
120120 {
121- id: ' your-plugin-slug' ,
122- title: ' Your Plugin Name' ,
123- description: ' Brief description of what your plugin does' ,
124- repo: ' your-github-username/your-repo-name' ,
125- latestVersion: ' 3.x' ,
121+ id: " your-plugin-slug" ,
122+ title: " Your Plugin Name" ,
123+ description: " Brief description of what your plugin does" ,
124+ repo: " your-github-username/your-repo-name" ,
125+ latestVersion: " 3.x" ,
126126 versions: [
127127 {
128- version: ' 1.x' ,
129- github_branch: ' 1.x' ,
128+ version: " 1.x" ,
129+ github_branch: " 1.x" ,
130130 limited_files: [
131- { name: ' README.md' , title: ' Overview' , slug: ' overview' }
132- ]
131+ { name: " README.md" , title: " Overview" , slug: " overview" },
132+ ],
133133 },
134134 {
135- version: ' 2.x' ,
136- github_branch: ' 2.x' ,
135+ version: " 2.x" ,
136+ github_branch: " 2.x" ,
137137 limited_files: [
138- { name: ' README.md' , title: ' Overview' , slug: ' overview' }
139- ]
138+ { name: " README.md" , title: " Overview" , slug: " overview" },
139+ ],
140140 },
141141 {
142- version: ' 3.x' ,
143- github_branch: ' 3.x' ,
142+ version: " 3.x" ,
143+ github_branch: " 3.x" ,
144144 limited_files: [
145- { name: ' README.md' , title: ' Overview' , slug: ' overview' }
146- ]
145+ { name: " README.md" , title: " Overview" , slug: " overview" },
146+ ],
147147 },
148148 ],
149149 },
@@ -179,16 +179,16 @@ Products are external links shown alongside plugins on the homepage:
179179``` typescript
180180products : [
181181 {
182- id: ' your-product-id' ,
183- title: ' Your Product Name' ,
184- description: ' What your product does' ,
185- link: ' https://yourproduct.com' ,
182+ id: " your-product-id" ,
183+ title: " Your Product Name" ,
184+ description: " What your product does" ,
185+ link: " https://yourproduct.com" ,
186186 badge: {
187- text: ' External' ,
188- color: ' green'
187+ text: " External" ,
188+ color: " green" ,
189189 },
190190 },
191- ]
191+ ];
192192```
193193
194194### Advanced: Complex Documentation Structure
@@ -233,6 +233,7 @@ For plugins with multiple documentation files organized in folders:
233233### Initial Setup
234234
2352351 . ** Push your code to GitHub** :
236+
236237 ``` bash
237238 git add .
238239 git commit -m " Initial commit"
@@ -259,6 +260,7 @@ For plugins with multiple documentation files organized in folders:
259260### Automatic Deployment
260261
261262The GitHub Actions workflow automatically:
263+
262264- ✅ Triggers on every push to ` main ` branch
263265- ✅ Fetches latest documentation from configured repos
264266- ✅ Builds the static site
@@ -267,13 +269,15 @@ The GitHub Actions workflow automatically:
267269### Manual Deployment
268270
269271You can also trigger deployment manually:
272+
2702731 . Go to Actions tab in your repository
2712742 . Select "Deploy to GitHub Pages" workflow
2722753 . Click "Run workflow"
273276
274277### Rebuild Documentation
275278
276279To rebuild docs without code changes:
280+
277281``` bash
278282# Locally trigger a repository dispatch event
279283curl -X POST \
@@ -312,11 +316,13 @@ npm run start # Serve the production build locally
312316#### "No documentation found"
313317
314318** Causes** :
319+
315320- README.md doesn't exist in the specified GitHub repository/branch
316321- GitHub token lacks proper permissions
317322- Branch name doesn't match configuration
318323
319324** Solutions** :
325+
3203261 . Verify the file exists: ` https://github.com/[owner]/[repo]/blob/[branch]/README.md `
3213272 . Check your GitHub token has access to the repository
3223283 . Ensure ` github_branch ` in ` lib/config.ts ` matches the actual branch name
@@ -327,37 +333,41 @@ npm run start # Serve the production build locally
327333** Cause** : GitHub API rate limiting (60 requests/hour without token, 5000 with token)
328334
329335** Solutions** :
336+
3303371 . Add a GitHub token to ` .env.local `
3313382 . Use cached documentation: ` npm run build:cache `
3323393 . Wait for the rate limit to reset (check headers in error)
333340
334341#### Build fails with "Cannot find module"
335342
336343** Solutions** :
344+
3373451 . Delete ` node_modules ` and reinstall: ` rm -rf node_modules && npm install `
3383462 . Clear Next.js cache: ` rm -rf .next `
3393473 . Ensure all dependencies are installed: ` npm install `
340348
341349#### Images not loading
342350
343351** Causes** :
352+
344353- Images not in ` public/images/ ` directory
345354- Incorrect image paths in markdown
346355- Base path not configured correctly
347356
348357** Solutions** :
358+
3493591 . Ensure images are in ` public/images/[plugin-name]/ `
3503602 . Use relative paths in markdown: `  `
3513613 . Check ` basePath ` configuration in ` next.config.mjs `
352362
353363#### GitHub Actions deployment fails
354364
355365** Common issues** :
356- 1 . ** Permissions error** :
366+
367+ 1 . ** Permissions error** :
357368 - Go to Settings → Actions → General
358369 - Scroll to "Workflow permissions"
359370 - Select "Read and write permissions"
360-
3613712 . ** Pages not enabled** :
362372 - Go to Settings → Pages
363373 - Set source to "GitHub Actions"
@@ -370,6 +380,7 @@ npm run start # Serve the production build locally
370380#### Cache issues during development
371381
372382** Solutions** :
383+
373384``` bash
374385# Clear all caches
375386rm -rf .next .cache node_modules/.cache
@@ -381,6 +392,7 @@ npm run build
381392### Debug Mode
382393
383394Enable verbose logging by checking:
395+
3843961 . Browser console for client-side errors
3853972 . Terminal output for build-time errors
3863983 . ` .cache/ ` directory for fetched files
@@ -397,6 +409,7 @@ Enable verbose logging by checking:
397409### Styling and Branding
398410
399411** Update site colors** in [ ` app/global.css ` ] ( app/global.css ) :
412+
400413``` css
401414:root {
402415 --primary : 220 90% 56% ;
@@ -406,10 +419,11 @@ Enable verbose logging by checking:
406419```
407420
408421** Update navigation** in [ ` lib/layout.shared.tsx ` ] ( lib/layout.shared.tsx ) :
422+
409423``` typescript
410424export const baseOptions: HomeLayoutProps = {
411425 nav: {
412- title: ' Your Site Name' ,
426+ title: " Your Site Name" ,
413427 },
414428 links: [
415429 // Add custom navigation links
@@ -418,6 +432,7 @@ export const baseOptions: HomeLayoutProps = {
418432```
419433
420434** Customize MDX components** in [ ` mdx-components.tsx ` ] ( mdx-components.tsx ) :
435+
421436``` typescript
422437export function useMDXComponents(components : MDXComponents ): MDXComponents {
423438 return {
@@ -448,17 +463,23 @@ This project is open source. Please check the repository for license details.
448463---
449464
450465Built with ❤️ using [ Next.js] ( https://nextjs.org/ ) and [ Fumadocs] ( https://fumadocs.dev )
466+
451467# Development server
468+
452469npm run dev
453470
454471# Type checking
472+
455473npm run types: check
456474
457475# Build for production
476+
458477npm run build
459478
460479# Preview production build
480+
461481npm run start
482+
462483```
463484
464485## Contributing
@@ -471,3 +492,4 @@ npm run start
471492## License
472493
473494[Add your license here]
495+ ```
0 commit comments