Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/app/admin/analytics/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { redirect } from "next/navigation"
import type { Metadata } from 'next'

export const metadata: Metadata = {
robots: {
index: false,
follow: false,
},
}

export default function AnalyticsPage() {
redirect("/admin")
Expand Down
8 changes: 8 additions & 0 deletions src/app/admin/categories/page.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
"use client"

import type { Metadata } from 'next'
import { useState } from "react"
import { Button } from "@/components/ui/button"
import { Plus, ArrowLeft } from "lucide-react"
import Link from "next/link"
import { CategoryList } from "@/components/admin/category-list"
import { AddCategoryForm } from "@/components/admin/add-category-form"

export const metadata: Metadata = {
robots: {
index: false,
follow: false,
},
}

export default function CategoriesAdminPage() {
const [isAddingCategory, setIsAddingCategory] = useState(false)

Expand Down
8 changes: 8 additions & 0 deletions src/app/admin/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client"

import type { Metadata } from 'next'
import Link from "next/link"
import { Button } from "@/components/ui/button"
import {
Expand All @@ -8,6 +9,13 @@ import {
Tags
} from "lucide-react"

export const metadata: Metadata = {
robots: {
index: false,
follow: false,
},
}

export default function AdminDashboard() {
const adminModules = [
{
Expand Down
8 changes: 8 additions & 0 deletions src/app/admin/settings/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { redirect } from "next/navigation"
import type { Metadata } from 'next'

export const metadata: Metadata = {
robots: {
index: false,
follow: false,
},
}

export default function SettingsPage() {
redirect("/admin")
Expand Down
8 changes: 8 additions & 0 deletions src/app/admin/tools/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Remove client-side imports
// import { useState } from "react"
import type { Metadata } from 'next'
import { Button } from "@/components/ui/button"
// import { AddToolForm } from "@/components/admin/add-tool-form"
// import { ToolsList } from "@/components/admin/tools-list"
Expand All @@ -9,6 +10,13 @@ import { getAllTools } from "@/actions/tool-actions"
import type { Tool } from "@prisma/client"
import { ToolsAdminClient } from "@/components/admin/tools-admin-client" // Import the client component

export const metadata: Metadata = {
robots: {
index: false,
follow: false,
},
}

export default async function ToolsAdminPage() {
console.log("ADMIN TOOLS PAGE (Prod Test): Attempting to fetch tools..."); // Add log
let tools: Tool[] = [];
Expand Down
8 changes: 8 additions & 0 deletions src/app/admin/users/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { redirect } from "next/navigation"
import type { Metadata } from 'next'

export const metadata: Metadata = {
robots: {
index: false,
follow: false,
},
}

export default function UsersPage() {
redirect("/admin")
Expand Down
3 changes: 2 additions & 1 deletion src/lib/content-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,8 @@ export async function getProductByDirectorySlug(directorySlug: string): Promise<
* @returns Array of valid page routes (string[]).
*/
export async function getAppPageRoutesPaths(): Promise<string[]> {
const excludeDirs = ['api', 'rss', '[name]', '[slug]', '_lib']; // Added _lib, adjust excludeDirs as needed
// Exclude internal directories from sitemap generation
const excludeDirs = ['api', 'rss', '[name]', '[slug]', '_lib', 'admin'];
const validPageFiles = ['page.tsx', 'page.jsx', 'page.js', 'page.mdx', 'page.md']; // Includes MDX/MD pages
const routes = new Set<string>();

Expand Down