summary refs log tree commit diff
path: root/eleventy.config.js
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2023-05-17 20:18:32 -0500
committerStarfall <us@starfall.systems>2023-05-17 20:18:32 -0500
commit1cc3d1798ec2b7d0cc2fde3f97aea346a22176bf (patch)
tree4036f0cc4c1ef9df246b22fa5f9b2503d9d3d3c8 /eleventy.config.js
parent82f220a494300971b93fafda39a853e2e103574a (diff)
move stuff into folders, start on blog page
Diffstat (limited to 'eleventy.config.js')
-rw-r--r--eleventy.config.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/eleventy.config.js b/eleventy.config.js
new file mode 100644
index 0000000..79bd47a
--- /dev/null
+++ b/eleventy.config.js
@@ -0,0 +1,28 @@
+filter_local_date = function(date) {
+	// yyyy-MM-dd
+	return date.getFullYear() + '-'
+		+ (date.getMonth() + 1).toString().padStart(2, '0') + '-'
+		+ date.getDate().toString().padStart(2, '0')
+}
+
+filter_rfc3339_datetime = function(date) {
+	// yyyy-MM-dd HH:mm:ssXXX
+	date.setSeconds(0, 0)
+	return date.toISOString().replace('T', ' ');
+}
+
+module.exports = function(eleventyConfig) {
+	eleventyConfig.addPassthroughCopy('./css/')
+
+	eleventyConfig.addFilter('local_date', filter_local_date)
+	eleventyConfig.addFilter('rfc3339_datetime', filter_rfc3339_datetime)
+
+	return {
+		dir: {
+			input: 'src',
+			includes: '../_includes',
+			data: '../_data',
+			output: '_site'
+		}
+	}
+}