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
15
.eleventy.js
15
.eleventy.js
|
|
@ -32,7 +32,7 @@ export default async function (eleventyConfig) {
|
|||
});
|
||||
|
||||
// TODO: Demo entfernen
|
||||
const permalinkPath = await hasFiles('source/screens') ? '/demo/' : '/';
|
||||
const permalinkPath = await hasFiles('source/view') ? '/demo/' : '/';
|
||||
|
||||
eleventyConfig.addGlobalData('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.addWatchTarget('./source/style/');
|
||||
}
|
||||
|
||||
return {
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
export const config = {
|
||||
dir: {
|
||||
input: 'source/screens',
|
||||
output: 'build',
|
||||
includes: '../templates',
|
||||
data: '../data'
|
||||
input: 'source/view',
|
||||
output: 'build'
|
||||
},
|
||||
templateFormats: ['html', 'liquid', 'md', 'njk']
|
||||
};
|
||||
}
|
||||
};
|
||||
5
TODO.md
5
TODO.md
|
|
@ -1,6 +1,5 @@
|
|||
# General
|
||||
|
||||
- Remove gulp and legacy files
|
||||
- Better README with more info for the content section
|
||||
- Explain eleventy usage
|
||||
- Complete CHANGELOG
|
||||
|
|
@ -8,6 +7,10 @@
|
|||
- Add dynamic content to robots.txt during build process
|
||||
- Add dynamic content to sitemap.xml
|
||||
|
||||
# 11ty
|
||||
|
||||
- Look into teh difference of layouts and templates
|
||||
|
||||
# CSS
|
||||
|
||||
- Check style for every basic element
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
{% endblock %}
|
||||
{% block script %}
|
||||
<script>
|
||||
// Setup global things for all screens
|
||||
// Setup global things
|
||||
setup();
|
||||
|
||||
// Create instances of objects made by constructor functions
|
||||
|
|
@ -12,17 +12,17 @@ title: Index
|
|||
<h2>This is {{ hippie.brand | upcase }}</h2>
|
||||
<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
|
||||
<code>/index.njk</code>
|
||||
<code>index.liquid|njk</code>
|
||||
inside the
|
||||
<i>source/screens</i>
|
||||
<i>source/view</i>
|
||||
folder. You can also create a
|
||||
<code>data.json</code>
|
||||
file inside the
|
||||
<i>source/templates</i>
|
||||
folder as a data source for your nunjucks files.</p>
|
||||
<i>source/view</i>
|
||||
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
|
||||
<code>blank.njk</code>. You can find it at
|
||||
<i>/source/screens/demo</i>.</p>
|
||||
<code>blank.liquid|njk</code>. You can find it at
|
||||
<i>/source/view/demo/pages</i>.</p>
|
||||
<p>The
|
||||
<i>source/demo</i>
|
||||
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