Public Access
1
0

implemented blog posts

This commit is contained in:
2025-08-05 23:10:57 -04:00
parent 56bde4626c
commit c1fa3e8863
6 changed files with 72 additions and 8 deletions

View File

@@ -3,6 +3,18 @@ module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy("src/css");
eleventyConfig.addPassthroughCopy("src/js");
eleventyConfig.addPassthroughCopy("src/resume");
// Add a filter for readable dates using vanilla JS
eleventyConfig.addFilter("readableDate", dateObj => {
// The toLocaleDateString method can be used to format dates
// without any external libraries.
// The 'UTC' timeZone option is added to prevent off-by-one day errors.
return new Date(dateObj).toLocaleDateString('en-US', {
year: 'numeric',
month: 'long',
day: 'numeric',
timeZone: 'UTC'
});
});
// Add a shortcode for the current year for the footer
eleventyConfig.addShortcode("year", () => `${new Date().getFullYear()}`);