Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kyroceus/vercel-redirect
It redirects the website request from facebook to any blog while keeping the meta data for the each link.
https://github.com/kyroceus/vercel-redirect
facebook nextjs redirect vercel wordpress
Last synced: 8 days ago
JSON representation
It redirects the website request from facebook to any blog while keeping the meta data for the each link.
- Host: GitHub
- URL: https://github.com/kyroceus/vercel-redirect
- Owner: kyroceus
- Created: 2022-10-13T08:20:26.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-12T16:37:38.000Z (about 1 year ago)
- Last Synced: 2024-12-09T16:06:01.145Z (18 days ago)
- Topics: facebook, nextjs, redirect, vercel, wordpress
- Language: TypeScript
- Homepage: https://example-redirect.vercel.app
- Size: 61.5 KB
- Stars: 26
- Watchers: 2
- Forks: 178
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vercel Redirect
It redirects the website request from facebook to any blog while keeping the meta data for the each link. This app uses [Next.js](https://nextjs.org/) and the SSR!
### Requirements
- [WordPress](https://wordpress.org/)
- [WPGraphQL](https://www.wpgraphql.com/)
- Environment variables (see below)```
git clone https://github.com/viswaah/vercel-redirect.git
```Add an `.env.local` file to the root with the following:
```
GRAPHQL_ENDPOINT="https://wordpressite.com/graphql/"
```Then run the development server,
```bash
npm run dev
# or
yarn dev
```| Name | Required | Default | Description |
| ---------------- | -------- | ------- | ----------------------------------------------------------- |
| GRAPHQL_ENDPOINT | Yes | - | WordPress WPGraphQL endpoint (ex: https://host.com/graphl/) |To get the particular post from link https://wordpressdomain.com/path
Replace it by https://newverceldomain.vercel.app/path
When you post this new vercel link on facebook,
It shows the post metadata and content from the vercel,
When user click on this link it will redirect them to the actual wordpress domain.