Image for post
Image for post
Photo by Nastya Dulhiier on Unsplash

If you’ve been hearing people rave about static sites, and wonder if it would do you any good, this is the article for you.

A few weeks ago, I still had no clue what static site was, and it was frustrating because everyone seemed to get it, except me.

Embarrassingly, I have a static Gatsby site that I built from scratch months ago. I just couldn’t understand what was static about my site.

It only contained blog content just like my retired Wordpress site, but why does no one call a Wordpress site static?

It wasn’t until I got a…


Everything you wanted to know about redirects in Gatsby.js for optimal user experience

signpost with arrows pointing in several directions, against a sunset sky
signpost with arrows pointing in several directions, against a sunset sky
Photo by Javier Allegue Barros on Unsplash

So your website is running happily with Gatsby. However, like every digital product, it is bound to grow and evolve. One candidate for change that you probably don’t give much thought to is URL architecture.

A blog post that started out at a URL like http://yourdomain.com/website-speed may be redirected to http://yourdomain.com/blog/how-to-make-your-website-faster.

Another scenario that you may find yourself in is when your content attracts a large following, prompting you to offer a gated section for subscribers.

Once they land on your home page, they will be automatically taken to a private dashboard page. Meanwhile, unauthenticated users who land on that…


Image for post
Image for post
Photo by Iker Urteaga on Unsplash

Adding global styles to a Gatsby site is a piece of cake.

Using CSS modules with Gatsby is painless.

Integrating Sass with Gatsby is also a snap.

However, what if you want to use a combination of global styling, Sass framework, and CSS modules? There is more to it than simply following a recipe for each method, mix them together, and get the shiny site on the other side.

That’s the raison d’être for this article. But first, what’s the deal with the amalgam of global styling, CSS modules and Sass?

I think no matter what CSS practices you adopt…


How the pros at Gatsby handle them

Image for post
Image for post
Photo by Soragrit Wongsa on Unsplash.

If you say that you haven’t mastered responsive images, I get it. There are so many things to plan, scenarios to predict, and decisions to make with regards to this thorny issue.

This article will be a deviation from the standard primer on responsive images. I will walk you through the markup for those media generated by the gatsby-image plugin. That way, we will really understand how web images are optimized in the real world and the rationale behind those decisions.

Why Learn Responsive Images Through gatsby-image?

The idea came from my recent experience with Gatsby. …


Have you ever dreamed of writing more content in less time? One of the solutions is a Markdown editor. Let’s find the perfect one for you.

I used to think that we all take notes the same way. Wrong. It wasn’t until I looked for a Markdown editor that I realized this truth: Everyone is very opinionated about what a note taking app should look like.

In my case, I want a note taking app with Markdown support. Or a Markdown editor that allows me to take a variety of notes, not just programming ones.

Oh Markdown editor, where art thou?

During my daunting search, I…


Image for post
Image for post
Illustration by moi

So you’ve become aware of a monster in Javascript called closure. Quality guides on this topic are plenty, but we learners never have enough practical examples, dont’ we?. Hence, in this article, I will provide a real-world example of Javascript closure as applied to event listeners.

It is safe to say that no matter how much you have read about closure, the light bulb in your head won’t shine bright until you’ve encountered closure in the wild world thousands of times.

However, the problem with most instructions is that their examples are too academic, not very practical, and largely taken…


Image for post
Image for post
Illustrator by Moi

There will come a point when you want to add interactivity to your WordPress site. That means: hello JavaScript. But how do you add JavaScript to WordPress the right way, so you can have a cool site without losing sleep?

In WordPress, there is a particular way to modify your site. When it comes to JavaScript, it’s called enqueuing.

You will rarely use this geeky word in real life but it is worth learning, otherwise, you risk breaking your site.

Adding JavaScript the Traditional Way

In HTML, JavaScript codes are inserted between the <script> and </script> tags. It’s as simple as that.

But, what about…


Image for post
Image for post

You create content to attract leads, per the advice of some marketing gurus. But after months of busting out new content, Google Analytics tells you that you’re attracting your peers, not your prospects. Uh oh. So, how to market to the right target audience?

That’s the question you should have asked at the beginning of your content marketing strategy. And believe it or not, it happens fairly frequently that a business’s content attracts their peers, not their prospects.

When your content marketing is not targeted

Content is anything that adds value to the reader’s life.

Avinash Kaushik

Much as I admire Avinash, I disagree with his view…


If you’re remotely interested in journaling, life hacks or anything productivity related, chances are you’ve seen bullet journal mentioned somewhere. I heard about bullet journal when it was just out of the Kickstarter phase, watched the videos, and moved on. I never kept a diary for more than 2 weeks when I was a kid, so I didn’t even think that an analog system would have much use in my life.

Two years and dozens of productivity and journaling apps later, I came to terms with the fact that I have commitment and discipline troubles. I thought I had nothing…


Every 4 years, the world turns its attention to the Olympics, a celebration of human ‘s ultimate athleticism. The Olympians, the start of the Olympics, are faster, higher and stronger than mere mortals. Their lives are vastly different from us. But they can offer many tried and true life lessons that have taken them to the height of achievements.

Image for post
Image for post
The Olympics spirit is here to stay in our everyday lives.
  1. There’s no such thing as being lucky

The Olympics is always a time for upsets from the underdogs, but no triumph is a sheer dumb luck. Despite being blessed with superior genetic genes, all of the athletes quote 8–10 hours as…

Trang Le

A web developer who lives with poor internet and always thinks of a new way to improve your site speed by 0.1%. Love automation in any form.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store