-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update the changesets version * adding demo-section-blog , docs package in ignore list (#100) * adding demo-section-blog , docs package in ignore list * set the package into private * creating icons * move the lucide icon to simple icons #98 * introduce raw layout * adding raw layout support * create raw example page * update the page * update the social link and remove the unused code. * update the packages * delete the unused file * update the packages * introduce raw layout * remove the lucide icon and fetch search bar data useFetch to swr * remove the comment * remove the lucide icon type and add CardType * export the raw layout * update the ui * introduce multiple card * introduce multiple card * support two card layout * file formating change * adding hostname for raw layout * CardType for card * update the post * update the home page * raw image * write docs about cardType and update the sociallinks docs * introduce new raw page docs * update the docs * format the file * opengraph image docs * update the docs * no more lucide icon * update the icon * update the homepage url * update the image * update the cardtype * update the icon * update the package * V1.1.5 (#103) * update the changesets version * creating icons * move the lucide icon to simple icons #98 * introduce raw layout * adding raw layout support * create raw example page * update the page * update the social link and remove the unused code. * update the packages * delete the unused file * update the packages * introduce raw layout * remove the lucide icon and fetch search bar data useFetch to swr * remove the comment * remove the lucide icon type and add CardType * export the raw layout * update the ui * introduce multiple card * introduce multiple card * support two card layout * file formating change * adding hostname for raw layout * CardType for card * update the post * update the home page * raw image * write docs about cardType and update the sociallinks docs * introduce new raw page docs * update the docs * format the file * opengraph image docs * update the docs * no more lucide icon * update the icon * update the homepage url * update the image * update the cardtype * update the icon * update the package * adding demo-section-blog , docs package in ignore list (#104) * adding demo-section-blog , docs package in ignore list * set the package into private
- Loading branch information
1 parent
1cc2141
commit 92d2b78
Showing
50 changed files
with
3,458 additions
and
1,491 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
title : Opengraph image | ||
description: Generate an open graph image using the section blog theme. | ||
--- | ||
|
||
To generate an [open graph image](https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image) in the section theme blog, use the following code. | ||
|
||
```javascript filename="page/api/og-image.tsx" | ||
|
||
import { ImageResponse } from '@vercel/og' | ||
import { NextRequest } from 'next/server' | ||
export const config = { | ||
runtime: 'edge', | ||
} | ||
|
||
export default async function handler(req: NextRequest) { | ||
const { searchParams } = req.nextUrl | ||
const title = searchParams.get('title') | ||
|
||
if (!title) { | ||
return new ImageResponse(<>{'Visit with "?title=what is markdown "'}</>, { | ||
width: 1200, | ||
height: 630, | ||
}) | ||
} | ||
|
||
return new ImageResponse( | ||
( | ||
<div | ||
style={{ | ||
fontSize: 60, | ||
color: 'black', | ||
background: '#f6f6f6', | ||
width: '100%', | ||
height: '100%', | ||
paddingTop: 50, | ||
flexDirection: 'column', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
display: 'flex', | ||
}} | ||
> | ||
<h1>{title}</h1> | ||
</div> | ||
), | ||
{ | ||
width: 1200, | ||
height: 630, | ||
} | ||
) | ||
} | ||
|
||
``` | ||
|
||
You can use it with the following syntax: `api/og-image?title=10 Things You Most Likely Didn't Know About Health` | ||
|
||
```mdx | ||
--- | ||
type: post | ||
title: 10 Things You Most Likely Didn't Know About Health. | ||
description: Culpa laboris aliquip ea consectetur mollit ea ipsum sint qui culpa laboris dolor adipisicing proident. Et officia consequat do nulla tempor cupidatat elit. | ||
date: 2022-11-12T08:05:53.939Z | ||
|
||
|
||
image: http://localhost:3000/api/og-image?title=10 Things You Most Likely Didn't Know About Health | ||
|
||
author: Curtis Lopez | ||
--- | ||
``` | ||
|
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
Oops, something went wrong.