Skip to content

Commit

Permalink
docs: create favicon app router (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastián García authored Sep 13, 2024
1 parent abdf2d9 commit 45daef5
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Docker
node_modules
12 changes: 12 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:20-alpine

WORKDIR /app
COPY . .

RUN npm install -g pnpm
RUN corepack enable

RUN pnpm install
RUN pnpm run build

CMD [ "pnpm", "start" ]
9 changes: 8 additions & 1 deletion docs/app/docs/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@ import type { ReactNode } from 'react'
import { docsOptions } from '../layout.config'

export default function Layout({ children }: { children: ReactNode }) {
return <DocsLayout {...docsOptions}>{children}</DocsLayout>
return (
<>
<aside className="sticky py-2 bg-warn text-warn-foreground text-center">
<h4 className="font-bold">Documentation is currently in beta</h4>
</aside>
<DocsLayout {...docsOptions}>{children}</DocsLayout>
</>
)
}
35 changes: 35 additions & 0 deletions docs/app/icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { ImageResponse } from 'next/og'

export const size = {
width: 32,
height: 32,
}
export const contentType = 'image/png'

export default function Icon() {
return new ImageResponse(
(
// ImageResponse JSX element
<div
style={{
fontSize: 24,
background: 'black',
width: '100%',
height: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
color: 'white',
}}
>
O
</div>
),
// ImageResponse options
{
// For convenience, we can re-use the exported icons size metadata
// config to also set the ImageResponse's width and height.
...size,
},
)
}
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"start": "next start"
},
"dependencies": {
"@openlite/ui": "workspace:*",
"@openlite/ui": "0.5.0",
"fumadocs-core": "13.2.2",
"fumadocs-mdx": "9.0.2",
"fumadocs-ui": "13.2.2",
Expand Down

0 comments on commit 45daef5

Please sign in to comment.