Upload files to "/"

This commit is contained in:
Nathan Upchurch 2024-07-12 15:01:46 -04:00
commit 9737e1fecf
3 changed files with 32 additions and 0 deletions

7
.eleventy.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = function (eleventyConfig) {
eleventyConfig.addCollection("colors", function (collectionApi) {
return collectionApi.getAll().filter(function (item) {
return "colors" in item.data;
});
});
};

10
index.liquid Normal file
View File

@ -0,0 +1,10 @@
<!doctype html>
<title>Page title</title>
<p>Hi</p>
<ul>
{% for tag in collections.colors | log %}
{% capture tagUrl %}/tags/{{ tag | slugify }}/{% endcapture %}
<li><a href="{{ tagUrl }}">{{ tag }}</a></li>
{% endfor %}
</ul>

15
package.json Normal file
View File

@ -0,0 +1,15 @@
{
"name": "11tytest",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"@11ty/eleventy": "^2.0.1"
}
}