Compare commits
2 commits
cfbc244381
...
27b5cc11af
| Author | SHA1 | Date | |
|---|---|---|---|
| 27b5cc11af | |||
| 2e3509de0e |
4 changed files with 38 additions and 1 deletions
11
_includes/base.njk
Normal file
11
_includes/base.njk
Normal 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
21
eleventy.config.js
Normal 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
5
index.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
layout: base
|
||||||
|
title: home
|
||||||
|
---
|
||||||
|
goodbye...
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"watch:eleventy": "npx @11ty/eleventy --watch",
|
"watch:eleventy": "npx @11ty/eleventy --watch",
|
||||||
"watch:sass": "npx sass sass:_site/css --watch",
|
"watch:sass": "npx sass sass:_site/css --watch",
|
||||||
"start": "npm run watch:eleventy & npm run watch:sass"
|
"start": "npm run watch:eleventy"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "yuki",
|
"author": "yuki",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue