feat: Change file structure
- Move return object to named export for 11ty config - screens is now view - 11ty data files moved to view/_data - templates is now view/_includes - Both are the default directories - data is now used as intended, for user data - Update index to reflect filenames and structure
This commit is contained in:
parent
610e22b3c9
commit
b67a8a893a
78 changed files with 21 additions and 19 deletions
21
.eleventy.js
21
.eleventy.js
|
|
@ -32,7 +32,7 @@ export default async function (eleventyConfig) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: Demo entfernen
|
// TODO: Demo entfernen
|
||||||
const permalinkPath = await hasFiles('source/screens') ? '/demo/' : '/';
|
const permalinkPath = await hasFiles('source/view') ? '/demo/' : '/';
|
||||||
|
|
||||||
eleventyConfig.addGlobalData('hippie', {
|
eleventyConfig.addGlobalData('hippie', {
|
||||||
brand: 'hippie',
|
brand: 'hippie',
|
||||||
|
|
@ -130,14 +130,13 @@ export default async function (eleventyConfig) {
|
||||||
eleventyConfig.addPassthroughCopy({'node_modules/hippie-script/index.js': 'vendor/hippie-script.js'});
|
eleventyConfig.addPassthroughCopy({'node_modules/hippie-script/index.js': 'vendor/hippie-script.js'});
|
||||||
|
|
||||||
eleventyConfig.addWatchTarget('./source/style/');
|
eleventyConfig.addWatchTarget('./source/style/');
|
||||||
|
|
||||||
return {
|
|
||||||
dir: {
|
|
||||||
input: 'source/screens',
|
|
||||||
output: 'build',
|
|
||||||
includes: '../templates',
|
|
||||||
data: '../data'
|
|
||||||
},
|
|
||||||
templateFormats: ['html', 'liquid', 'md', 'njk']
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// noinspection JSUnusedGlobalSymbols
|
||||||
|
export const config = {
|
||||||
|
dir: {
|
||||||
|
input: 'source/view',
|
||||||
|
output: 'build'
|
||||||
|
},
|
||||||
|
templateFormats: ['html', 'liquid', 'md', 'njk']
|
||||||
|
};
|
||||||
5
TODO.md
5
TODO.md
|
|
@ -1,6 +1,5 @@
|
||||||
# General
|
# General
|
||||||
|
|
||||||
- Remove gulp and legacy files
|
|
||||||
- Better README with more info for the content section
|
- Better README with more info for the content section
|
||||||
- Explain eleventy usage
|
- Explain eleventy usage
|
||||||
- Complete CHANGELOG
|
- Complete CHANGELOG
|
||||||
|
|
@ -8,6 +7,10 @@
|
||||||
- Add dynamic content to robots.txt during build process
|
- Add dynamic content to robots.txt during build process
|
||||||
- Add dynamic content to sitemap.xml
|
- Add dynamic content to sitemap.xml
|
||||||
|
|
||||||
|
# 11ty
|
||||||
|
|
||||||
|
- Look into teh difference of layouts and templates
|
||||||
|
|
||||||
# CSS
|
# CSS
|
||||||
|
|
||||||
- Check style for every basic element
|
- Check style for every basic element
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block script %}
|
{% block script %}
|
||||||
<script>
|
<script>
|
||||||
// Setup global things for all screens
|
// Setup global things
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
// Create instances of objects made by constructor functions
|
// Create instances of objects made by constructor functions
|
||||||
|
|
@ -12,17 +12,17 @@ title: Index
|
||||||
<h2>This is {{ hippie.brand | upcase }}</h2>
|
<h2>This is {{ hippie.brand | upcase }}</h2>
|
||||||
<p>You can start using it by replacing this file with your own index page.</p>
|
<p>You can start using it by replacing this file with your own index page.</p>
|
||||||
<p>To do this you need to create a file
|
<p>To do this you need to create a file
|
||||||
<code>/index.njk</code>
|
<code>index.liquid|njk</code>
|
||||||
inside the
|
inside the
|
||||||
<i>source/screens</i>
|
<i>source/view</i>
|
||||||
folder. You can also create a
|
folder. You can also create a
|
||||||
<code>data.json</code>
|
<code>data.json</code>
|
||||||
file inside the
|
file inside the
|
||||||
<i>source/templates</i>
|
<i>source/view</i>
|
||||||
folder as a data source for your nunjucks files.</p>
|
folder as a global data source for your template files.</p>
|
||||||
<p>For a very basic start you can make a copy of the demo page
|
<p>For a very basic start you can make a copy of the demo page
|
||||||
<code>blank.njk</code>. You can find it at
|
<code>blank.liquid|njk</code>. You can find it at
|
||||||
<i>/source/screens/demo</i>.</p>
|
<i>/source/view/demo/pages</i>.</p>
|
||||||
<p>The
|
<p>The
|
||||||
<i>source/demo</i>
|
<i>source/demo</i>
|
||||||
folder contains an overview of all HTML elements and also examples for CSS style combinations and even whole
|
folder contains an overview of all HTML elements and also examples for CSS style combinations and even whole
|
||||||
Loading…
Add table
Add a link
Reference in a new issue