Skip to content

Commit

Permalink
Merge pull request #16 from rubixvi/development
Browse files Browse the repository at this point in the history
Refactor robots.ts and sitemap.ts to include metadata base URL from s…
  • Loading branch information
rubixvi authored Sep 16, 2024
2 parents 6acd49b + 8af480a commit 6c55326
Show file tree
Hide file tree
Showing 8 changed files with 899 additions and 1,116 deletions.
48 changes: 34 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,24 @@

4. Open [http://localhost:3000](http://localhost:3000) in your browser to see the project.

5. **For Production:**

- Build the app:

```bash
npm run build
```

- Start the production server:

```bash
npm run start
```

- Open [http://localhost:3000](http://localhost:3000) to view the production build.

- **If deploying to Vercel,** the build step is automatically handled during deployment.

## Usage

This kit can be used to create product documentation, business websites, and guides.
Expand All @@ -68,20 +86,22 @@ This kit can be used to create product documentation, business websites, and gui

## Features

- MDX documentation
- Nested pages
- Table of content
- Pagination
- Search with fuzzy search and highlights
- Syntax highlighting
- Code line highlight and title
- Mermaid charts
- Custom components
- Light and dark mode
- Code switcher and copy functionality
- Tables and mathematical expressions
- AI knowledgebase **(Development)**
- AI documentation support **(Development)**
- **Seamless MDX Integration**: Write documentation with Markdown and enhanced JSX components.
- **Multi-level Page Navigation**: Organize content with nested pages for a clear hierarchical structure.
- **Dynamic Table of Contents**: Automatically generate a table of contents for easy navigation.
- **Content Pagination**: Smooth transitions between pages for a seamless reading experience.
- **Advanced Search**: Fuzzy search with term highlighting for quick and accurate results.
- **Code Syntax Highlighting**: Beautiful, theme-aware syntax highlighting for code snippets.
- **Enhanced Code Blocks**: Support for line highlighting and code titles to improve readability.
- **Mermaid.js Diagrams**: Create complex flowcharts, graphs, and diagrams directly in your documentation.
- **Custom Components**: Easily integrate reusable, custom React components in your documentation.
- **Light and Dark Modes**: Full support for both light and dark themes with automatic switching.
- **Interactive Code Switcher**: Switch between code snippets and copy them with a single click.
- **Mathematical and Tabular Expressions**: Seamlessly include tables and math formulas with built-in LaTeX support.
- **AI Knowledgebase (In Development)**: Integrating AI-powered documentation assistance.
- **AI-powered Documentation Support (In Development)**: Future-ready AI tools for creating and managing content.
- **SEO Optimization**: Comprehensive metadata and SEO integration to help your documentation rank better on search engines. Automatically generated metadata ensures proper indexing and improves discoverability.
- **Meta Tags Management**: Easily manage meta tags such as title, description, canonical URLs, and social sharing images (Open Graph and Twitter cards), ensuring your content looks great when shared.

## Contributing

Expand Down
Binary file modified app/favicon.ico
Binary file not shown.
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Metadata } from "next";
import { GoogleTagManager } from '@next/third-parties/google'
import { ThemeProvider } from "@/components/theme-provider";
import { Navbar } from "@/components/navbar";
import { GeistSans } from "geist/font/sans";
Expand Down Expand Up @@ -47,6 +48,7 @@ export default function RootLayout({
}>) {
return (
<html lang="en" suppressHydrationWarning>
<GoogleTagManager gtmId={Settings.gtm} />
<body
className={`${GeistSans.variable} ${GeistMono.variable} font-regular`}
suppressHydrationWarning
Expand Down
14 changes: 14 additions & 0 deletions app/robots.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { MetadataRoute } from 'next';
import { Settings } from '@/settings/config';

export default function robots(): MetadataRoute.Robots {
return {
rules: [
{
userAgent: '*',
allow: '/',
},
],
sitemap: `${Settings.metadataBase}/sitemap.xml`,
};
}
12 changes: 12 additions & 0 deletions app/sitemap.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { MetadataRoute } from 'next';
import { PageRoutes } from '@/lib/pageroutes';
import { Settings } from '@/settings/config';

export default function sitemap(): MetadataRoute.Sitemap {
return PageRoutes.map((page) => ({
url: `${Settings.metadataBase}${page.href}`,
lastModified: new Date().toISOString(),
changeFrequency: 'monthly',
priority: 0.8,
}));
}
Loading

0 comments on commit 6c55326

Please sign in to comment.