Step-by-Step Guide on how too Contribute to Links.dev Using GitHub

Maherukh AjmalMaherukh Ajmal
3 min read

To know more about Links.dev please read the article here.

Before you start

They are two things you need to understand before starting to create your account at Links.dev

  1. My-links repo is a public template that has custom.css and page.json which needs to be updated for your Merge request to be valid.

  2. Links.dev is the main repo where you need to add yourself to registry.yaml which will register you to your username.

Getting started

You need to fork both my-links and links.dev repo to your GitHub account by clicking on the fork button at the top right of their GitHub pages.

  1. In my-links directory of the repo, update the page.json file. This file should contain the data for your link on the bio page, such as the links you want to include, the titles for each link, and any other relevant information.

  2. In page.json file you must have at least these sections:

    • Name (name)

    • Description (description)

    • Your image URL (image_url)

    • Collection of links (links)

  3. You can use the Icons from the listed location here.

{
  "name": "Md Maherukh Ajmal",
  "description": "Software Engineer 1 @ MAQ Software",
  "image_url": <image URL>,
  "links": [
    {
      "title": "Twitter",
      "url": "https://twitter.com/ajmal_maherukh",
      "icon": "twitter"
    },
    {
      "title": "LinkedIn",
      "url": "https://www.linkedin.com/in/m-ajmal/",
      "icon": "linkedin"
    },
    {
      "title": "GitHub",
      "url": "https://github.com/Maherukh",
      "icon": "github"
    }
  ]
}
  1. [Optional] Update the file called custom.css in the same directory. This file will be used to customize the look and feel of your link on the bio page. You can use this file to add your styles, such as fonts, colors, and layouts.
.ld-custom-name {
    color: coral;
}

.ld-custom-name:visited {
    color: green;
} 

.ld-custom-background-layer {
    background-color: #000;
}

If you want to make changes to your link in the bio page, simply update your page.json and custom.css files, commit the changes to your repo and refresh the page to see the updates.

You don't need to merge your changes to the main my-links repo.

In Links.dev repo add your user name to the registry.yaml alongside all the other profiles

The registry name majmal will be your web URL which will get appended to https://links.dev making your URL https://links.dev/majmal

users:
majmal:
    github_username: Maherukh

Commit your changes and Merge your branch to the main branch by raising a pull request

Once your changes are verified the merge will get approved and you can check your changes at the main branch registry.yaml here.

Tips

Once you have created/updated your page.json and custom.css files, you can view your link on the bio page by visiting the URL for your forked repo. For example, if your username is majmal, the URL for your link in the bio page would be https://links.dev/majmal

If you want to invalidate the cache after you update your page, hit your page with the refresh parameter, like this: https://links.dev/majmal?refresh=1

Find the official Readme.md here.

0
Subscribe to my newsletter

Read articles from Maherukh Ajmal directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Maherukh Ajmal
Maherukh Ajmal