marketplace | reason |
---|---|
false |
https://github.com/lfades/static-tweet is very similar to this one |
Static Tweets (Tailwind)
This code snippet shows you how you can generate static tweets using Tailwind CSS & getStaticProps
in Next.js.
Dependencies
- Tailwind CSS (
npm install tailwindcss
) - Tailwind Typography (
npm i @tailwindcss/typography
) - MDX Remote (for MDX support) (
npm i next-mdx-remote
) - Date FNS (
npm i date-fns
) - Query String (
npm i querystring
)
Gotchas
- Don't forget to add pbs.twimg.com to your allowed
images
in yournext.config.js
file. - Don't forget to add Twitter Auth Bearer Token to your
.env
file.
Demo
https://static-tweets-tailwind.vercel.app/
How to Use
You can choose from one of the following two methods to use this repository:
One-Click Deploy
Deploy the example using Vercel:
Clone and Deploy
Execute create-next-app
with npm or Yarn to bootstrap the example:
npx create-next-app --example https://github.com/vercel/examples/tree/main/solutions/static-tweets-tailwind static-tweets-tailwind
# or
yarn create next-app --example https://github.com/vercel/examples/tree/main/solutions/static-tweets-tailwind static-tweets-tailwind
Next, run Next.js in development mode:
npm install
npm run dev
# or
yarn
yarn dev
Deploy it to the cloud with Vercel (Documentation).