GCMS Link Bio is a free alternative to Linktree, powered by GraphCMS.
- Account on GraphCMS. They offer a free forever plan for personal projects
- Account on Vercel
You should follow these steps:
- Setup GraphCMS
- Clone this repository into your computer
- Run the models migrations to create Page and Link models on GraphCMS
- Deploy to Vercel
You need a GraphCMS acount to create a project. They offer a Free Forever plan. If you already have an account, skip this step.
- Click here to create a new project
- Enter the project name, description (optional), and select the best location for your server
- Select the "Free Forever" plan
- Skip the step to invite your team members
- In the Quick Start Guide, click on step 3, Make you API accessible
- In Content API Permissions section, click on "Yes, initialize defaults"
- In Permanent Auth Tokens section, click on "Create Token" button
- Enter a token name and click on "Create & configure permissions"
- Then, click on "Yes, initialize defaults"
- Then, click on "Edit permissions"
- Check "Read existing environments" and click on "Update"
- Login into your GitHub account
- Fork this repository, then clone into your machine
- Open the project in your favorite IDE
- Rename the
.env.example
file to.env
- Open the
.env
to edit - Go to GraphCMS dashboard, click on API Access > Endpoints
- Copy Content API url and paste into
GRAPHCMS_ENDPOINT
on your.env
file - Go back to GraphCMS dashboard, click on API Access > Permanent Auth Tokens
- On Existing Tokens list, copy the token you've created earlier
- Paste the token into
GRAPHCMS_AUTH_TOKEN
on your.env
file
We're almost ready! Now, let's run the migrations to setup your application on GraphCMS!
We will create 2 models: Page and Link. We've created a script to create them programatically for you.
The Page model is to create your bio link page. The Link model is needed to add one or more links to your page.
- Open your terminal
- Navigate to the directory you cloned the repository
- Run
node migrations/migration-create-schema.js
- Now, go to GraphCMS dashboard and click on Schema
- You should see 2 new models: Page and Link
- On GraphCMS dashboard, go to Content > Page
- Click on Create Item
- Enter page Title, Avatar, and Bio
- On the Links section, click on Create and add new document and click on Link
- Enter the link Title and URL and hit Save and Publish
- Add as many links as you want
- When you're good to go, click on Save and Publish
- Open the terminal
- Go to the repository directory
- Run
npm run dev
- Open http://localhost:3000
If you've done everything correctly, you'll see your new page!
- Click on the button above to create a new deploy on Vercel
- Connect Vercel to your GitHub account
- Click on the repository you forked earlier
- Skip Create a Team step
- On Configure Project section, enter the name of your project (optional)
- Click Environment Variables to expand it
- Add the following variables:
GRAPHCMS_AUTH_TOKEN
GRAPHCMS_ENDPOINT
- Copy the values from your
.env
file and paste into each field - Finally, click on Deploy and wait until Vercel deploy your application :)
🚀 That's it! Now you have your own page links!
Add it to your social media and share with your network!
- Add Loom videos for each step
- Add checkbox to open links in a new tab
- Add support to animate.css
- Add support for link icons
- Add support for link thumbnails
- Add support for RichText in bio