Unverified Commit c669c383 authored by vinay's avatar vinay Committed by GitHub

(example) update github-pages example (#52168)


Removed `appDir: true` from experimental flag and code refactor.
Co-authored-by: 's avatarSteven <229881+styfle@users.noreply.github.com>
parent 1283270a
...@@ -3,7 +3,7 @@ import Link from 'next/link' ...@@ -3,7 +3,7 @@ import Link from 'next/link'
export default function About() { export default function About() {
return ( return (
<> <>
<h1>About</h1> <h1>About Page</h1>
<div> <div>
Back to <Link href="/">Home</Link> Back to <Link href="/">Home</Link>
</div> </div>
......
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
const inter = Inter({ subsets: ['latin'] })
export const metadata: Metadata = {
title: 'Next.js on GitHub Pages',
description: 'A Next.js web application on GitHub Pages',
}
export default function RootLayout({ export default function RootLayout({
children, children,
}: { }: {
...@@ -5,7 +15,7 @@ export default function RootLayout({ ...@@ -5,7 +15,7 @@ export default function RootLayout({
}) { }) {
return ( return (
<html lang="en"> <html lang="en">
<body>{children}</body> <body className={inter.className}>{children}</body>
</html> </html>
) )
} }
// @ts-check /** @type {import('next').NextConfig} */
/**
* @type {import('next').NextConfig}
**/
const nextConfig = { const nextConfig = {
output: 'export', output: 'export',
basePath: '/gh-pages-test', basePath: '/gh-pages-test',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment