So I have an 11ty site structured like this
.
└── app/
├── public
├── src /
│ ├── _includes/
│ │ ├── base.njk
│ │ ├── header.njk
│ │ └── footer.njk
│ ├── css/
│ │ ├── about.css
│ │ ├── contact.css
│ │ ├── core.style.css
│ │ ├── index.css
│ ├── images
│ ├── about.njk
│ ├── contact.njk
│ ├── index.njk
And base.njk file for styling the layout
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/css/core.style.css" />
<title>{{ title }}</title>
</head>
<body>
{% include 'header.njk' %}
{{ content | safe }}
{% include 'footer.njk' %}
</body>
</html>
With this, I can style all njk files:
index.njk
---
title: My App - Homepage
layout: base.njk
---
<div class="container">
<img
src="/images/image.png"
/>
</div>
So far, everything is working. My question is there is a way I can use different CSS files to style each njk file, eg: about.css for about.njk? Right now, I can style all njk files under one file which is base.njk.