generated from Blazity/next-enterprise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b03159e
commit 6654807
Showing
7 changed files
with
176 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { ImageResponse } from 'next/og'; | ||
// App router includes @vercel/og. | ||
// No need to install it. | ||
|
||
export async function GET(request: Request) { | ||
const { searchParams } = new URL(request.url); | ||
const locationName = searchParams.get('name') || 'World'; | ||
return new ImageResponse( | ||
( | ||
<div | ||
style={{ | ||
fontSize: 40, | ||
color: 'black', | ||
background: 'white', | ||
width: '100%', | ||
height: '100%', | ||
padding: '50px 200px', | ||
textAlign: 'center', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}} | ||
> | ||
{locationName} | ||
</div> | ||
), | ||
{ | ||
width: 1200, | ||
height: 630, | ||
}, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { MetadataRoute } from 'next' | ||
|
||
export default function robots(): MetadataRoute.Robots { | ||
return { | ||
rules: { | ||
userAgent: '*', | ||
allow: '{/api/og/*}', | ||
disallow: '/private/', | ||
}, | ||
// sitemap: 'https://acme.com/sitemap.xml', | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import React from "react"; | ||
import { getMdxContent } from "hooks/useMdxContent"; | ||
import {NavClient} from "./Client" | ||
import {NavRenderer} from "./Renderer" | ||
import { NavProps } from "./types"; | ||
|
||
const NavInner = process.env.NODE_ENV === "development" ? NavClient : NavRenderer; | ||
|
||
export const Nav: React.FC = async () => { | ||
const navInfo = await getMdxContent<NavProps['navInfo']>("nav", "main-nav.mdx") | ||
// @ts-ignore | ||
return <NavInner navInfo={navInfo} /> | ||
return <NavClient navInfo={navInfo} /> | ||
} | ||
|
||
export default Nav; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.