---
title: "Let’s Learn Eleventy! Boost your Jamstack skills with 11ty"
description: "Check this tutorial out to see what the static site generator Eleventy can do. Spin up a fast, performant Jamstack site in this quick overview and tutorial from Learn With Jason."
source: "https://www.netlify.com/blog/2020/04/09/lets-learn-eleventy-boost-your-jamstack-skills-with-11ty/"
last_updated: "2026-07-10T17:19:38.000Z"
---
There’s been a lot of buzz about the static site generator Eleventy recently, and for good reason: it’s quick to start, doesn’t ship _any_ extra code to browsers, and it’s extremely customizable.

Let’s take a quick tour of what Eleventy can do and why it’s exciting.

The code for all the examples in this post is [available on GitHub](https://github.com/jlengstorf/11ty-examples).

## Before we start: there’s a video version of this!

If you learn better by seeing something get built, Eleventy creator [Zach Leatherman](https://twitter.com/zachleat) joined _Learn With Jason_ to walk through [creating a new site using Eleventy](https://www.learnwithjason.dev/let-s-learn-eleventy) starting from an empty folder.

## Eleventy’s Low barrier to entry — you only need a single Markdown file

Create a new Markdown file called `index.md` with some content:

```
# Hello world!This is my website.
```

Then build the site using 11ty’s CLI:

```
npx @11ty/eleventy
```

> NOTE: We’re using `npx` here, which allows us to execute the Eleventy CLI’s build command without needing to install it as a dependency. For more information on how this works, see [the npm blog announcing `npx`](https://blog.npmjs.org/post/162869356040/introducing-npx-an-npm-package-runner).

![A screenshot of the above steps being run in the CLI.](/v3/img/blog/11ty-quickstart.png)

A `_site` folder with the generated `index.html` gets built, and you’re done.

Wow! 🤯

[Check out this example on GitHub.](https://github.com/jlengstorf/11ty-examples/tree/master/01-quick-setup)

## No runtime — only ship the code you wrote to browsers

If your Markdown file contains:

```
---layout: layout.liquid---# Hello world!This is my website.
```

And you create `layout.liquid` with the following:

```
<html>  <head>    <title>My Eleventy Site</title>  </head>  <body>    {% raw %}{{ content }}{% endraw %}  </body></html>
```

Eleventy outputs the following HTML:

```
<html>  <head>    <title>My Eleventy Site</title>  </head>  <body>    <h1>Hello world!</h1>    <p>This is my website.</p>  </body></html>
```

No magic. No extras. Just your content.

[Check out this example on GitHub.](https://github.com/jlengstorf/11ty-examples/tree/master/02-no-runtime)

## Frontmatter is available to layouts

Want to control the title tag from your Markdown files? Add frontmatter!

```
---layout: layout.liquidtitle: Hello frontmatter!---This is my website.
```

In `layout.liquid`, we can reference the title anywhere using `{% raw %}{{ title }}{% endraw %}`:

```
<html>  <head>    <title>{% raw %}{{ title }}{% endraw %}</title>  </head>  <body>    <h1>{% raw %}{{ title }}{% endraw %}</h1>    {% raw %}{{ content }}{% endraw %}  </body></html>
```

11ty outputs the title from frontmatter:

```
<html>  <head>    <title>Hello frontmatter!</title>  </head>  <body>    <h1>Hello frontmatter!</h1>    <p>This is my website.</p>  </body></html>
```

[Check out this example on GitHub.](https://github.com/jlengstorf/11ty-examples/tree/master/03-frontmatter)

## Add global data with the `_data` directory

If you have data that should be available on every page, create a `_data` directory and add a JSON file — for example, `_data/site.json`:

```
{  "title": "My Great 11ty Site"}
```

We can now access our global data using the file name and the property. For example, in our `layout.liquid`:

```
<html>  <head>    <title>{% raw %}{{ title }}{% endraw %} · {% raw %}{{ site.title }}{% endraw %}</title>  </head>  <body>    <h1>{% raw %}{{ title }}{% endraw %}</h1>    {% raw %}{{ content }}{% endraw %}  </body></html>
```

Now every page title will end with `· My Great 11ty Site`!

[Check out this example on GitHub.](https://github.com/jlengstorf/11ty-examples/tree/master/04-global-data)

## Overriding global data is straightforward

If we want to override global data in a given directory or post, all we have to do is redeclare it. For example, to override the global site title in one of our blog posts, we can add this frontmatter:

```
---layout: layout.liquidtitle: Hello frontmatter!site:  title: Testing!---This is my website.
```

This outputs the following HTML:

```
<html>  <head>    <title>Blog One · Testing!</title>  </head>  <body>    <h1>Blog One</h1>    <p>My first post!</p>
  </body></html>
```

[Check out this example on GitHub.](https://github.com/jlengstorf/11ty-examples/tree/master/05-override-data)

## Want to group posts in 11ty like a blog? Just add tags!

To group content in 11ty, add a tag — 11ty will make it available in other pages!

Create a folder called `blog` and include a `blog` tag in the frontmatter of each post:

```
---layout: layout.liquidtitle: Blog Onetags: blog---My first post!
```

Then loop through the blog “collection” in your home page:

```
---layout: layout.liquidtitle: Hello frontmatter!---Welcome to my site!
## Latest blog posts
{% for blog in collections.blog %}
- [{% raw %}{{blog.data.title}}{% endraw %}]({% raw %}{{blog.url}}{% endraw %})
{% endfor %}
```

[Check out this example on GitHub.](https://github.com/jlengstorf/11ty-examples/tree/master/06-group-by-tags)

## Add shared data for all files in a given directory

To avoid retyping a bunch of frontmatter for each post, we can create a JSON file with the same name as a directory to add data to _all_ posts in that directory. In our `blog` directory, create `blog.json`:

```
{  "layout": "layout.liquid",  "tags": "blog"}
```

Now our post frontmatter can be simplified:

```
---title: Blog One---My first post!
```

The layout and tags still apply!

[Check out this example on GitHub.](https://github.com/jlengstorf/11ty-examples/tree/master/07-directory-data)

## Pagination is baked in

If you want to paginate posts, 11ty has it built into collections. Update `index.md`:

```
---layout: layout.liquidtitle: Hello frontmatter!pagination:  data: collections.blog  size: 2  alias: blogs---Welcome to my site!
## Latest blog posts
{% for blog in blogs %}
- [{% raw %}{{blog.data.title}}{% endraw %}]({% raw %}{{blog.url}}{% endraw %})
{% endfor %}
{% if pagination.href.previous %}  <a href="{% raw %}{{pagination.href.previous}}{% endraw %}">Previous Page</a>{% endif %}{% if pagination.href.next %}  <a href="{% raw %}{{pagination.href.next}}{% endraw %}">Next Page</a>{% endif %}
```

Now the home page has two posts and a “Next Page” link that leads to a new page with the more posts.

[Check out this example on GitHub.](https://github.com/jlengstorf/11ty-examples/tree/master/08-pagination)

## Creating pages from third party data is a snap

We can make third-party API calls as part of setting global data! Create `_data/characters.js` and add:

```
// don’t forget to `npm install axios`!const axios = require('axios');
module.exports = async () => {  const result = await axios.get('https://rickandmortyapi.com/api/character/');
  return result.data.results;};
```

Next, create a new file called `character.md` and add the following:

```
---pagination:  data: characters  alias: character  size: 1layout: layout.liquidpermalink: '/characters/{% raw %}{{character.name|slug}}{% endraw %}/'title: Rick & Morty Characters---
## {% raw %}{{character.name}}{% endraw %}
![{% raw %}{{character.name}}{% endraw %}]({% raw %}{{character.image}}{% endraw %})
```

Setting the `pagination.size` to 1 means we create a page for each result!

[Check out this example on GitHub.](https://github.com/jlengstorf/11ty-examples/tree/master/09-third-party-data)

## 11ty can do more

This isn’t everything 11ty is capable of. In addition to the features we covered here, 11ty also has data filters, plugins, shortcodes, and advanced configuration options to customize it to your needs.

You can see everything 11ty is capable of [in the 11ty docs](https://www.11ty.dev/docs/)!

### Share

-   [X (fka Twitter)](https://twitter.com/intent/tweet?text=Let’s Learn Eleventy! Boost your Jamstack skills with 11ty&url=https://www.netlify.com/blog/2020/04/09/lets-learn-eleventy-boost-your-jamstack-skills-with-11ty//)
-   [LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.netlify.com%2Fblog%2F2020%2F04%2F09%2Flets-learn-eleventy-boost-your-jamstack-skills-with-11ty%2F%2F)
-   [Facebook](https://www.facebook.com/sharer.php?u=https://www.netlify.com/blog/2020/04/09/lets-learn-eleventy-boost-your-jamstack-skills-with-11ty//)
-   [Bluesky](https://bsky.app/intent/compose?text=Let’s Learn Eleventy! Boost your Jamstack skills with 11ty+https://www.netlify.com/blog/2020/04/09/lets-learn-eleventy-boost-your-jamstack-skills-with-11ty//)

* * *

### Tags

-   [Eleventy](/blog/tags/Eleventy/)
-   [SSG](/blog/tags/ssg/)

## Keep reading

![](/images/blog-fallback-thumbnail.svg)

Tools & Services July 3, 2018

[

### Deploy a free Gatsby, Hugo, or Eleventy website template in 30 seconds

](/blog/2018/07/03/deploy-a-free-gatsby-hugo-or-eleventy-website-template-in-30-seconds/)

-   ![Profile picture of Phil Hawksworth](/_astro/9cfe2bbe94bcb555ce3ac7683ac7905ad3fd32b1-400x400_Z18H6R1.webp)
    
    Phil Hawksworth
    

![](/images/blog-fallback-thumbnail.svg)

Guides & Tutorials June 25, 2020

[

### Gatsby 101: Features, Benefits, and Trade-Offs

](/blog/2020/06/25/gatsby-101-features-benefits-and-trade-offs/)

-   ![Profile picture of Jason Lengstorf](/_astro/11b8e51d90b26838de71904294430279b7099995-700x700_1R7sJe.webp)
    
    Jason Lengstorf
    

## Recent posts

News & Announcements June 25, 2026

[

### Netlify Functions, designed for Agent Experience

](/blog/netlify-functions-designed-for-agent-experience)

-   ![Profile picture of Eduardo Bouças](/_astro/52958f21e8450baf6d8e60302341a984e220c0cd-512x512_13VDlu.webp)
    
    Eduardo Bouças
    

News & Announcements June 24, 2026

[

### How we measure Netlify’s Agent Experience

](/blog/how-we-measure-netlify-agent-experience)

-   ![Profile picture of Sean Roberts](/_astro/bbf2243f8171dbddd80ab2103622106cef84d125-512x512_Z1d2LKE.webp)
    
    Sean Roberts
    

Guides & Tutorials May 15, 2026

[

### How to build a real-time AI chatbot in minutes with Netlify Agent Runners (no backend)

](/blog/how-to-build-a-real-time-ai-chatbot-in-minutes-with-netlify-agent-runners-no-backend)

-   ![Profile picture of Nahrin Jalal](/_astro/f0e7c8f227a03fe58340c99ef5439d5a896c0733-272x272_Z23kDpD.webp)
    
    Nahrin Jalal
    

![](/_astro/3f255b372fa958df35802666ee33b4609b2d71bd-1200x1586_1VtE2D.webp)

### How do the best dev and marketing teams work together?

[Access the report](https://www.netlify.com/reports/2024-leadership-trend-report/access/)