Skip to content

Commit

Permalink
added default theme files
Browse files Browse the repository at this point in the history
  • Loading branch information
dvidsilva committed Dec 27, 2022
1 parent 6450664 commit 3fc0b64
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
3 changes: 2 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
31 changes: 31 additions & 0 deletions layouts/tailwind/templates/default.template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: tailwind
---
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- @TODO: replace with tailwind cli because this is bringing in too much kbs - but this is faster for now -->
<script src="https://cdn.tailwindcss.com"></script>
<title>{{ > page.title }}</title>
{{ > site.head }}
{{ > page.head}}
</head>

<body>
<header class="container">
<div class="page-header">
<h1 class="text-3xl font-bold underline">
<a href="/">Gloria</a> <small>static site generator</small>
</h1>
</div>
<nav>
<a href="/blog">Blog</a>
</nav>
</header>
{{{page.content}}}
</body>

</html>
Empty file.
4 changes: 4 additions & 0 deletions layouts/tailwind/templates/pages/index.page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Welcome!
description:
---
2 changes: 2 additions & 0 deletions lib/bin/commands/collect.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const collect = (argv) => {
fs.writeFileSync(dest, ztring);
}

logger.log(project.collected);

return project;
});
};
Expand Down
6 changes: 6 additions & 0 deletions lib/commands/collect.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const run = (project) => {
include: [],
copy: [],
styles: [],
theme: [],
};

project.config.include.map((path) => {
Expand All @@ -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 });
Expand Down
5 changes: 5 additions & 0 deletions lib/commands/extract.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down
4 changes: 4 additions & 0 deletions lib/core/project.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ const get = () => {
exclude: [
'.draft.md',
],
theme: [
'layouts/tailwind',
],
css: 'tailwind',
engine: 'default',
version: '2.0.4',
};

Expand Down

0 comments on commit 3fc0b64

Please sign in to comment.