When building content-based web applications, data storage becomes a crucial part of a project. There are many different ways to store data for web applications. Most commonly, a server is used with a database that can be reached through the use of an API.

However, this requires a complete back-end infrastructure, which is overkill for simple projects, especially for most pages that are using SSG as their main rendering strategy. Instead, we can store information in local files that help us manage both code and content in one place. To achieve this, we’ll use Markdown for data storage.

Markdown

Markdown is a lightweight markup language that can be used for formatting text. We can think of it as a simplified version of HTML. So, why use a different formatting instead of using HTML files? There are a couple of advantages of Markdown files over HTML. These are given below:

  • Versatility: It can be used in other areas where HTML cannot be used—for example, in books, emails, or presentations.

  • Simplicity: It’s beginner-friendly. It can also be used by nontechnical people because Markdown syntax is easier to remember and write, compared to complex HTML layouts.

Let’s take a look at a couple of commonly used Markdown syntax:

Get hands-on with 1400+ tech skills courses.