From 3fc0b646325168e427141916b5066549f7f01bb9 Mon Sep 17 00:00:00 2001 From: dvidsilva Date: Tue, 27 Dec 2022 08:59:21 -0500 Subject: [PATCH] added default theme files --- README.md | 2 ++ _config.yml | 3 +- .../tailwind/templates/default.template.md | 31 +++++++++++++++++++ layouts/tailwind/templates/pages/blog.page.md | 0 .../tailwind/templates/pages/index.page.md | 4 +++ lib/bin/commands/collect.js | 2 ++ lib/commands/collect.js | 6 ++++ lib/commands/extract.js | 5 +++ lib/core/project.config.js | 4 +++ 9 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 layouts/tailwind/templates/default.template.md create mode 100644 layouts/tailwind/templates/pages/blog.page.md create mode 100644 layouts/tailwind/templates/pages/index.page.md diff --git a/README.md b/README.md index 24cd08b..bac87e8 100644 --- a/README.md +++ b/README.md @@ -86,3 +86,5 @@ Refer to our [Contributing page](CONTRIBUTING.md) and local installation instruc ## Troubleshooting Try upgrading your version of node and run `yarn` again. Or open an [issue](https://github.com/gloriajs/gloria/issues) describing your problem. Go for a walk and check whether that's what you want to be doing today. + +**Slava Ukraini** diff --git a/_config.yml b/_config.yml index 233bb1a..3e1e917 100644 --- a/_config.yml +++ b/_config.yml @@ -6,7 +6,8 @@ baseurl: 'https://gloriajs.github.io' author: 'daveed silva' description: 'Documentation for the tool gloriajs' dest: build -theme: architect +theme: + - layouts/tailwind css: tailwind include: - docs diff --git a/layouts/tailwind/templates/default.template.md b/layouts/tailwind/templates/default.template.md new file mode 100644 index 0000000..65b86bf --- /dev/null +++ b/layouts/tailwind/templates/default.template.md @@ -0,0 +1,31 @@ +--- +name: tailwind +--- + + + + + + + + + {{ > page.title }} + {{ > site.head }} + {{ > page.head}} + + + +
+ + +
+ {{{page.content}}} + + + \ No newline at end of file diff --git a/layouts/tailwind/templates/pages/blog.page.md b/layouts/tailwind/templates/pages/blog.page.md new file mode 100644 index 0000000..e69de29 diff --git a/layouts/tailwind/templates/pages/index.page.md b/layouts/tailwind/templates/pages/index.page.md new file mode 100644 index 0000000..9933e66 --- /dev/null +++ b/layouts/tailwind/templates/pages/index.page.md @@ -0,0 +1,4 @@ +--- +title: Welcome! +description: +--- \ No newline at end of file diff --git a/lib/bin/commands/collect.js b/lib/bin/commands/collect.js index a40bcd7..377e68c 100644 --- a/lib/bin/commands/collect.js +++ b/lib/bin/commands/collect.js @@ -27,6 +27,8 @@ const collect = (argv) => { fs.writeFileSync(dest, ztring); } + logger.log(project.collected); + return project; }); }; diff --git a/lib/commands/collect.js b/lib/commands/collect.js index 0ed6359..6908c14 100644 --- a/lib/commands/collect.js +++ b/lib/commands/collect.js @@ -36,6 +36,7 @@ const run = (project) => { include: [], copy: [], styles: [], + theme: [], }; project.config.include.map((path) => { @@ -46,6 +47,11 @@ const run = (project) => { promiseArray.push(_klaw(path, items.copy, project.config)); }); + project.config.theme.map((path) => { + promiseArray.push(_klaw(path, items.theme, project.config)); + }); + + return $q.all(promiseArray).then(() => { project.collected = items; console.log({ items }); diff --git a/lib/commands/extract.js b/lib/commands/extract.js index b07e9f1..80132b8 100644 --- a/lib/commands/extract.js +++ b/lib/commands/extract.js @@ -61,12 +61,17 @@ const run = (project) => { const items = { include: [], + theme: [], }; project.collected.include.map((c) => { extract(c, items.include); }); + project.collected.theme.map((c) => { + extract(c, items.theme); + }); + project.extracted = items; return resolve(project); }); diff --git a/lib/core/project.config.js b/lib/core/project.config.js index 90bfc81..fce889e 100644 --- a/lib/core/project.config.js +++ b/lib/core/project.config.js @@ -37,7 +37,11 @@ const get = () => { exclude: [ '.draft.md', ], + theme: [ + 'layouts/tailwind', + ], css: 'tailwind', + engine: 'default', version: '2.0.4', };