Skip to content
Merged
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
88 changes: 83 additions & 5 deletions next.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,96 @@
/* eslint-disable @typescript-eslint/no-require-imports */
import type { NextConfig } from "next";
const createMDX = require('@next/mdx');
const createMDX = require('@next/mdx');

const nextConfig: NextConfig = {
/* config options here */
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],


experimental: {
optimizePackageImports: ["@vercel/analytics"],
},
async headers() {
return [
{
source: "/(.*)",
headers: [
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "X-Frame-Options",
value: "DENY",
},
{
key: "X-XSS-Protection",
value: "1; mode=block",
},
{
key: "Referrer-Policy",
value: "strict-origin-when-cross-origin",
},
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=()",
},
],
},
{
source: "/docs/(.*)",
headers: [
{
key: "Cache-Control",
value: "public, max-age=3600, stale-while-revalidate=86400",
},
],
},
{
source: "/sitemap.xml",
headers: [
{
key: "Cache-Control",
value: "public, max-age=3600, stale-while-revalidate=86400",
},
],
},
{
source: "/robots.txt",
headers: [
{
key: "Cache-Control",
value: "public, max-age=3600, stale-while-revalidate=86400",
},
],
},
];
},
async redirects() {
return [
{
source: "/documentation",
destination: "/docs",
permanent: true,
},
{
source: "/guide",
destination: "/docs",
permanent: true,
},
];
},
images: {
formats: ["image/webp", "image/avif"],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
},
compress: true,
poweredByHeader: false,
generateEtags: true,
};

const withMDX = createMDX({
// Add markdown plugins here, as desired
})

// Merge MDX config with Next.js config
export default withMDX(nextConfig)

9 changes: 9 additions & 0 deletions public/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/nexy.svg"/>
<TileColor>#0E201B</TileColor>
</tile>
</msapplication>
</browserconfig>
82 changes: 81 additions & 1 deletion src/app/docs/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,94 @@
import { SideBar } from "@/components/(home)/sideBar";
import { dm_sans } from "@/font/google";
import type { Metadata } from "next";
import Script from "next/script";

const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000";

export const metadata: Metadata = {
title: "Documentation",
description: "Complete documentation for Nexy framework - Learn how to build modern web applications with Python and FastAPI.",
keywords: [
"Nexy documentation",
"Python framework docs",
"FastAPI documentation",
"Web development guide",
"API development tutorial",
],
openGraph: {
title: "Nexy Documentation",
description: "Complete documentation for Nexy framework - Learn how to build modern web applications with Python and FastAPI.",
type: "website",
url: `${siteUrl}/docs`,
},
twitter: {
title: "Nexy Documentation",
description: "Complete documentation for Nexy framework - Learn how to build modern web applications with Python and FastAPI.",
},
alternates: {
canonical: `${siteUrl}/docs`,
},
};

const DocsLayout = ({ children }: { children: React.ReactNode }) => {
return (

<section className="sticky top-0 md:flex flex-row md:mx-14 md:border-x border-dashed border-gray-50/15 ">
<SideBar hidden={true} />
<aside
className="relative p-3 md:p-15 md:flex-2 md:border-l border-dashed border-gray-50/15 mdx"
>
{/* Structured Data - Documentation */}
<Script
id="ld-json-documentation"
type="application/ld+json"
strategy="beforeInteractive"
dangerouslySetInnerHTML={{
__html: JSON.stringify({
"@context": "https://schema.org",
"@type": "TechArticle",
headline: "Nexy Framework Documentation",
description: "Complete documentation for Nexy framework - Learn how to build modern web applications with Python and FastAPI.",
author: {
"@type": "Organization",
name: "Nexy",
url: siteUrl,
},
publisher: {
"@type": "Organization",
name: "Nexy",
logo: {
"@type": "ImageObject",
url: `${siteUrl}/nexy.svg`,
},
},
datePublished: "2024-01-01",
dateModified: new Date().toISOString().split("T")[0],
mainEntityOfPage: {
"@type": "WebPage",
"@id": `${siteUrl}/docs`,
},
about: [
{
"@type": "Thing",
name: "Python Web Framework",
},
{
"@type": "Thing",
name: "FastAPI",
},
{
"@type": "Thing",
name: "Web Development",
},
],
audience: {
"@type": "Audience",
audienceType: "Developers",
},
}),
}}
/>

{/* <span className=" absolute left-2 -z-20 top-2 rounded-full blur-3xl size-16 bg-white/50 "></span> */}
{/* <span className=" absolute -z-20 left-2 bottom-2 rounded-full blur-2xl size-10 bg-gray-50 "></span> */}

Expand Down
Loading