As a content creator, I love the look and feel of “link in bio” pages. They’re such an easy and mobile-friendly way to share various social medias and projects. However, as a developer, I am frankly offended at the idea of needing a SAAS app to create a static page of links. The idea of paying for such a service, or sharing my page with their branding is simply abhorrent. Thankfully I have a Jekyll site and the ability to create <a> tags, so I’m able to avoid that dismal fate.❤️

Let’s create a new page in the /pages folder called links.html. We want html, because we’re going to be adding a lot of customizations.

---
title: Links
description: Social media and helpful links for ChaelCodes!
permalink: /links/
hide: true
---

We want a title for the tab title when it’s viewed in a browser. I’m happy with “Links” even though it’s not very descriptive. The description is what’ll show up in link previews on other sites. Our permalink will be the link they access. In my case it’ll look like chael.codes/links/ which is very slick.

My theme - type-on-strap - hides pages from the navbar with the frontmatter tag hide: true.
Inside the navbar there's some custom code to hide certain site pages. For Minima, this functionality is missing, and it'd need to be added to the header. Check your theme to understand if there are built in options for hiding pages from the navigation.

We didn’t define a layout, which means our page won’t have a header, footer, nor navigation, which is what we want! At this point, we have a blank page.

Commit

Chances are high that your default layout has a header and footer. We need to make a new layout called “empty” to strip those out. We still want all the meta info that’s in your head - this controls livereload, fonts, scss styling (which we’ll add later), and more!


<!DOCTYPE html>
<html lang="en">
  {% include default/head.liquid %}
  <body>
    {{ content }}
  </body>
</html>

---
title: Links
description: Social media and helpful links for ChaelCodes!
permalink: /links/
layout: empty
hide: true
---

Commit

Jekyll supports collections which are site data stored in yml files. These are parsed by Jekyll and make it easy to iterate over structured data.

links:
  - title: Twitch
    link: https://twitch.tv/ChaelCodes
    icon: fa-twitch
  - title: YouTube
    link: https://youtube.com/c/ChaelCodes
    icon: fa-youtube
  - title: GitHub
    link: https://github.com/ChaelCodes
    icon: fa-github

You can easily add and remove links by modifying the yml file, and there’s less danger of introducing mistakes due to copy/pasting. My site theme supports font awesome icons, which is why mine are all fa-github or fa-<whatever> but obviously, you can use the icon library of your choice.

Commit

LET’S ADD SOME <a> TAGS!


<ul>
{% for social in site.data.social.links %}
  <li>
    <a href="{{social.link}}">{{social.title}}</a>
  </li>
{% endfor %}
</ul>

IT’S MAGNIFICENT!

Perfectly legible list of bullet-pointed links that your screenreader would love.

We’re done! Everyone can access my links now! 🙌

Commit

Step 4 - Add some buttons

We’re going to add an id to that ul to isolate it from other content on our site, then we’ll create an scss file - links.scss for our styling!

Make sure to import this new file in your theme's main scss file.
Mine uses _custom.scss to add additional files and styling.
  
    @import 'pages/links';
  
<ul id="links">
/* --- links page styling -- */
#links {
  list-style-type: none;
  margin-left: 0em;
  font-family: $font-family-headings; // override text to use heading text instead of body

  li {
    a {
      display: block;
      margin: 1em 2em;
      padding: $padding-small;
      text-align: center;
      background-color: var(--vivid-color-1);
      color: white;
    }
  }
}

It’s plain, but not we have a links page with a list of buttons!

Bullet pointed links have been turned into a list of rectangular buttons with no bullet point styling.

Commit

I think it’s really helpful to give people a little greeting and show them your avatar to reassure them that they’ve ended up on the right page.

  <div id="links-profile">
    <img id="avatar" src="/assets/img/profile_pic.jpg" alt="profile pic of Chael smiling and wearing fib shawl"/>
    <p>To be honest, I can't keep track of all the places I'm active either.</p>
  </div>
  #links-profile {
    #avatar {
      border-radius: 50%;
      border: .2em solid var(--vivid-color-2);
      width: 50%;
      margin: 1em auto;
      display: block;
      padding: 0;
    }

    p {
      text-align: center;
    }
  }

This is probably enough, right? Avatar with a little blue circle has been added to the top of the page, and the text 'To be honest, I can't keep track of all the places I'm active either.'

Commit

Step 6 - Fix desktop view

Let’s just pop into desktop view for a fun screenshot! Giant picture of my avatar that fills the entire screen. Huh. It’s just my face.

That’s not ideal. Giant buttons that are perfectly legible to a screenreader, but have tiny unreadable text. The buttons aren’t much better. We’ve only got 5 on the page.

Let’s give this page a maximum width and center it!


<div class="column">
  <div id="links-profile">
    <img id="avatar" src="/assets/img/profile_pic.jpg" alt="profile pic of Chael smiling and wearing fib shawl"/>
    <p>To be honest, I can't keep track of all the places I'm active either.</p>
  </div>
  <ul id="links">
    {% for social in site.data.social.links %}
      <li>
        <a href="{{social.link}}">{{social.title}}</a>
      </li>
    {% endfor %}
  </ul>
</div>

.column {
  max-width: 500px;
  margin: 0 auto;
}

And now we have a perfectly functional and pleasant links page built in Jekyll!

Commit

Step ∞ - Entirely Unnecessary Futzing to impress other developers

These are all going to be links to commits. You can see the result on my links page. I’ll add any additional futzing I do to this list.

Add Icons

Commit

Gradient Background to add Definition to Column

Commit

Animated hover buttons

Commit

Commit