DEV Community

Cover image for Can you have variables in a GitHub README file?πŸ€”
Fasakin Henry
Fasakin Henry

Posted on

1

Can you have variables in a GitHub README file?πŸ€”

I wanted to change how my Github profile looks so I changed the contents of my profile's README.md file. I am sure you know how to do that. πŸ˜œπŸ‘.

While checking for the best tips for changing the look of my profile. I checked Forrestknight's GitHub profile (https://github.com/ForrestKnight/ForrestKnight) and saw something that caught my attention on his profile. It was a system of adding variables, especially regarding the link section. [Reddit time 🀣]

It is not really a variable system but a way to give links a name and use the link name. One cool thing about this is that you can use these variables before defining them.[Most C developers Would die to have that feature🀣😭]

I also found a useful link that gave so many insights about this behavior, and I recommend you check it. (https://www.markdownguide.org/basic-syntax/#reference-style-links).

TL;DR πŸ€”

Reference-style links are a special kind of link that make URLs easier to display and read in Markdown.

This kind of variable system is usually referred to as Reference-style links and they allow for easy reading of the markdown and remove redundancy by ensuring that you can reuse a link without having to type it more than once. The exact way variable works in programming[except that you can change the value and format it🀣. Let's call it a dumb variable].

They usually have two parts: The part stored inline and the part where the links are referenced. I have only used it for social media links and don't really know much about advancing and automating this process. I hope you can improve this experience though.

You can check out my profile (https://github.com/fasakinhenry) for a demo of how this works. To be specific, check the (https://github.com/fasakinhenry/fasakinhenry) repository to know how this works.

Thanks to ForrestKnight for making me aware of this feature. You can also check out his profile (https://github.com/ForrestKnight/ForrestKnight).

Wait don't go yet, Engage with this by commenting and making suggestions. Also help me by linking or clapping as they say🀣 if this post helps you a lot and you like my writing style.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay