From 39d8489fb2e39067e891304b4c1b75c515e4db67 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Sun, 28 Aug 2022 16:15:58 +0100 Subject: [PATCH] code style --- website/.eleventy.js | 54 +++++++++++----------- website/src/_includes/layouts/article.html | 2 +- website/src/_includes/nav.html | 2 +- website/src/blog.html | 2 +- website/src/index.html | 2 - website/web.sh | 2 +- 6 files changed, 31 insertions(+), 33 deletions(-) diff --git a/website/.eleventy.js b/website/.eleventy.js index d64de67818..0d0cb33254 100644 --- a/website/.eleventy.js +++ b/website/.eleventy.js @@ -1,33 +1,33 @@ // const Card = require('./src/_includes/components/Card'); -module.exports = function (eleventyConfig) { - // Keeps the same directory structure. - eleventyConfig.addPassthroughCopy("src/assets/"); - eleventyConfig.addPassthroughCopy("src/img"); - eleventyConfig.addPassthroughCopy("src/css"); - eleventyConfig.addPassthroughCopy("src/js"); - eleventyConfig.addPassthroughCopy("src/contact"); - eleventyConfig.addPassthroughCopy("src/app-demo"); +module.exports = (ty) => { + // Keeps the same directory structure. + ty.addPassthroughCopy("src/assets/") + ty.addPassthroughCopy("src/img") + ty.addPassthroughCopy("src/css") + ty.addPassthroughCopy("src/js") + ty.addPassthroughCopy("src/contact") + ty.addPassthroughCopy("src/app-demo") - eleventyConfig.addCollection('blogs', function (collection) { - return collection.getFilteredByGlob('src/blog/*.md').reverse(); - }); + ty.addCollection("blogs", (collection) => + collection.getFilteredByGlob("src/blog/*.md").reverse() + ) - eleventyConfig.addWatchTarget("src/css"); - eleventyConfig.addWatchTarget("markdown/"); - eleventyConfig.addWatchTarget("components/Card.js"); + ty.addWatchTarget("src/css") + ty.addWatchTarget("markdown/") + ty.addWatchTarget("components/Card.js") - // eleventyConfig.addShortcode("Card",Card); + // ty.addShortcode("Card",Card); - return { - dir: { - input: 'src', - includes: '_includes', - output: '_site', - }, - templateFormats: ['md', 'njk', 'html'], - markdownTemplateEngine: 'njk', - htmlTemplateEngine: 'njk', - dataTemplateEngine: 'njk', - }; -}; \ No newline at end of file + return { + dir: { + input: 'src', + includes: '_includes', + output: '_site', + }, + templateFormats: ['md', 'njk', 'html'], + markdownTemplateEngine: 'njk', + htmlTemplateEngine: 'njk', + dataTemplateEngine: 'njk', + } +} diff --git a/website/src/_includes/layouts/article.html b/website/src/_includes/layouts/article.html index bd5a129b80..343514bc4f 100644 --- a/website/src/_includes/layouts/article.html +++ b/website/src/_includes/layouts/article.html @@ -118,4 +118,4 @@ - \ No newline at end of file + diff --git a/website/src/_includes/nav.html b/website/src/_includes/nav.html index bb680649ae..65d047d361 100644 --- a/website/src/_includes/nav.html +++ b/website/src/_includes/nav.html @@ -136,4 +136,4 @@ display: inline-block; } } - \ No newline at end of file + diff --git a/website/src/blog.html b/website/src/blog.html index 93b66780ee..e48549a0dd 100644 --- a/website/src/blog.html +++ b/website/src/blog.html @@ -45,4 +45,4 @@ - \ No newline at end of file + diff --git a/website/src/index.html b/website/src/index.html index 32e13e3dc8..2d961cc478 100644 --- a/website/src/index.html +++ b/website/src/index.html @@ -424,5 +424,3 @@ - - diff --git a/website/web.sh b/website/web.sh index f8c05c1bce..06c69ecbaf 100755 --- a/website/web.sh +++ b/website/web.sh @@ -17,4 +17,4 @@ done cd website npm install npm run build -npm run build-tailwind \ No newline at end of file +npm run build-tailwind