Skip to content

Conversation

@hckhanh
Copy link
Owner

@hckhanh hckhanh commented Nov 2, 2025

Replaced sample fumadocs content with production documentation for the fast-url library per web/INSTRUCTION.md.

Documentation Structure

  • Introduction - Fork rationale, performance improvements (5-20% faster than urlcat), key features, use cases
  • Getting Started - Installation across package managers, usage patterns, step-by-step API client tutorial, Unicode/special character handling
  • API Reference - Complete function signatures with examples (createUrl, query, subst, join), advanced patterns (pagination, dynamic routing)

Technical Changes

  • SEO optimization - Added Open Graph, Twitter cards, and structured metadata
  • Branding - Updated navigation with fast-url title and GitHub link
  • Home page - Redirects directly to /docs for immediate access to documentation
  • Documentation naming - All examples use createUrl instead of urlcat for consistency
  • Removed - Sample documentation files (test.mdx, v1/, v2/)
  • Build fix - Removed Google Fonts dependency (network restricted in CI environments)
  • CodeCov configuration - Added codecov.yml to exclude web/ directory from coverage reports

Components Utilized

Fumadocs UI: Cards, Tabs, Steps, Callouts, syntax highlighting with copy-to-clipboard

Preview

Documentation

All documentation pages use createUrl consistently throughout examples and API references.

Original prompt

read the web/INSTRUCTION.md and follow its instruction


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

hckhanh and others added 13 commits November 2, 2025 07:25
- Add `.gitignore` for common exclusions.
- Add `README.md` with setup instructions and project overview.
- Configure `biome.json` for linting and style rules.
- Include `bun.lock` for package management.
- Provide structure and content guidelines for project documentation.
- Include detailed steps for creating, proofreading, and testing documentation.
- Emphasize SEO optimization and local testing before deployment.
- Simplify `baseOptions` by removing redundant `links` array and directly integrating `githubUrl`.
- Overhaul documentation content in `/docs`:
  - Replace `introduction.mdx` with comprehensive updates in `index.mdx`.
  - Introduce new structure, emphasizing `fast-url` features, performance, and use-cases.
  - Add `Tabs` and `Cards` for better content accessibility and readability.
- Improve alignment with modern JavaScript/TypeScript practices.
- Add a permanent redirect from `/` to `/docs` in `next.config.mjs`.
- Remove unused `(home)` layout and page components.
- Update Open Graph metadata for better brand alignment (`site` updated to "fast-url").
…g files

- Standardize indentation to 2 spaces across the entire codebase (JSON, TS, TSX, and config files).
- Replace double quotes with single quotes in JavaScript/TypeScript files for alignment with modern conventions.
- Improve readability in metadata and configuration files.
- No functional changes.
Copilot AI review requested due to automatic review settings November 2, 2025 03:33
@hckhanh hckhanh merged commit d5e9f97 into main Nov 2, 2025
27 checks passed
@hckhanh hckhanh deleted the copilot/follow-instruction-in-web-directory branch November 2, 2025 03:34
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 2, 2025

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive documentation website for the fast-url project, built with Next.js and Fumadocs. The documentation includes an introduction explaining the fork's motivation, getting started guide, and complete API reference. The PR also updates the package.json homepage to point to the new documentation site and configures codecov to ignore the web directory.

Key Changes

  • Complete documentation website setup with Fumadocs UI framework
  • Three main documentation sections: Introduction, Getting Started, and API Reference
  • SEO metadata configuration for better discoverability
  • Updated homepage URL to documentation site

Reviewed Changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
web/package.json Next.js app dependencies including fumadocs, React 19, and Tailwind CSS v4
web/tsconfig.json TypeScript configuration with path aliases for the documentation app
web/src/app/layout.tsx Root layout with comprehensive SEO metadata
web/content/docs/*.mdx Documentation content files with examples and API reference
web/source.config.ts Fumadocs MDX configuration
package.json Updated homepage URL to documentation site
codecov.yml Added web directory to coverage ignore list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"jsx": "react-jsx",
"incremental": true,
"paths": {
"@/*": ["./src/*"],
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path mapping @/.source points to .source directory which is listed in .gitignore (line 5). This could cause issues for developers cloning the repository as the directory won't exist until after running fumadocs-mdx (package.json line 9). Consider adding a comment in tsconfig.json or the README explaining that this directory is auto-generated.

Suggested change
"@/*": ["./src/*"],
"@/*": ["./src/*"],
// NOTE: The `.source` directory is auto-generated (see `fumadocs-mdx` in package.json).
// It will not exist until after running the generation script.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +29
Do the task for me


As a opensource documentation writer, update this folder `web`

This is the sample project from fumadocs, It will be used to deploy the documentation website for this project.

The current content of the doc is just sample content, you need to replace it with relevant documentation content for this project.

Here is the structure of the documentation you need to create:

* Introduction
* Why this folk is created
* Key features (read the project to get the features)
* The disadvantages of using the original project (non-optimized, not regularly updated,...) - https://github.com/balazsbotond/urlcat
* How this fork addresses those issues
* Getting Started
* Installation
* Usage
* API Reference

Each section should be in a separate mdx file and should utilize different components from fumadocs to enhance the documentation.

Ensure that the content is clear, concise, and provides value to the users of the project. Use examples, code snippets, and other relevant information to make the documentation comprehensive and user-friendly.

After updating the documentation, ensure to review and proofread the content for accuracy and clarity before finalizing it.
Then update SEO metadata for each doc page to improve search engine visibility.

Finally, test the documentation website locally to ensure all links, components, and features are functioning correctly before deploying the updated documentation.
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The INSTRUCTION.md file appears to be internal documentation for creating the docs and should not be committed to the repository. This file contains instructions like 'Do the task for me' which are not relevant to end users or contributors.

Suggested change
Do the task for me
As a opensource documentation writer, update this folder `web`
This is the sample project from fumadocs, It will be used to deploy the documentation website for this project.
The current content of the doc is just sample content, you need to replace it with relevant documentation content for this project.
Here is the structure of the documentation you need to create:
* Introduction
* Why this folk is created
* Key features (read the project to get the features)
* The disadvantages of using the original project (non-optimized, not regularly updated,...) - https://github.com/balazsbotond/urlcat
* How this fork addresses those issues
* Getting Started
* Installation
* Usage
* API Reference
Each section should be in a separate mdx file and should utilize different components from fumadocs to enhance the documentation.
Ensure that the content is clear, concise, and provides value to the users of the project. Use examples, code snippets, and other relevant information to make the documentation comprehensive and user-friendly.
After updating the documentation, ensure to review and proofread the content for accuracy and clarity before finalizing it.
Then update SEO metadata for each doc page to improve search engine visibility.
Finally, test the documentation website locally to ensure all links, components, and features are functioning correctly before deploying the updated documentation.

Copilot uses AI. Check for mistakes.

export async function GET(
_req: Request,
{ params }: RouteContext<'/og/docs/[...slug]'>,
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RouteContext type is used but not imported. This will cause a TypeScript compilation error. Add the import statement: import type { RouteContext } from 'next/dist/types'; or define the type locally.

Copilot uses AI. Check for mistakes.
},
}

export default function Layout({ children }: LayoutProps<'/'>) {
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LayoutProps type is used but not imported or defined. This will cause a TypeScript compilation error. Add the import statement or define the type, e.g., type LayoutProps<T> = { children: React.ReactNode }.

Copilot uses AI. Check for mistakes.
import { getPageImage, source } from '@/lib/source'
import { getMDXComponents } from '@/mdx-components'

export default async function Page(props: PageProps<'/docs/[[...slug]]'>) {
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PageProps type is used but not imported or defined. This will cause a TypeScript compilation error. Add the import statement or define the type appropriately for Next.js page components.

Copilot uses AI. Check for mistakes.
import { baseOptions } from '@/lib/layout.shared'
import { source } from '@/lib/source'

export default function Layout({ children }: LayoutProps<'/docs'>) {
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LayoutProps type is used but not imported or defined. This will cause a TypeScript compilation error. Ensure this type is properly imported or defined.

Copilot uses AI. Check for mistakes.
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 2, 2025

CodSpeed Performance Report

Merging #50 will not alter performance

Comparing copilot/follow-instruction-in-web-directory (dcc5715) with main (8d07e2d)

Summary

✅ 157 untouched
⏩ 4 skipped1

Footnotes

  1. 4 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants