Compare commits

...

2 commits

Author SHA1 Message Date
27b5cc11af
add test template 2025-03-27 05:40:40 -03:00
2e3509de0e
update sass support 2025-03-27 05:14:42 -03:00
4 changed files with 38 additions and 1 deletions

11
_includes/base.njk Normal file
View file

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% if title %} {{ title }} | yukinets {% else %} yukinets {% endif %}</title>
</head>
<body>
{{ content | safe }}
</body>
</html>

21
eleventy.config.js Normal file
View file

@ -0,0 +1,21 @@
const sass = require("sass");
module.exports = function (eleventyConfig) {
eleventyConfig.addTemplateFormats("scss");
// Creates the extension for use
eleventyConfig.addExtension("scss", {
outputFileExtension: "css", // optional, default: "html"
// `compile` is called once per .scss file in the input directory
compile: async function (inputContent) {
let result = sass.compileString(inputContent);
// This is the render function, `data` is the full data cascade
return async (data) => {
return result.css;
};
},
});
};

5
index.md Normal file
View file

@ -0,0 +1,5 @@
---
layout: base
title: home
---
goodbye...

View file

@ -6,7 +6,7 @@
"scripts": {
"watch:eleventy": "npx @11ty/eleventy --watch",
"watch:sass": "npx sass sass:_site/css --watch",
"start": "npm run watch:eleventy & npm run watch:sass"
"start": "npm run watch:eleventy"
},
"keywords": [],
"author": "yuki",