Portfolio image captions and dates
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2102441dd2
commit
beaa79b377
50 changed files with 124 additions and 76 deletions
|
@ -8,7 +8,7 @@ import cacheBuster from 'eleventy-auto-cache-buster';
|
|||
export default async function (eleventyConfig) {
|
||||
// Filters
|
||||
eleventyConfig.addFilter("dateLocale", function (value) {
|
||||
return DateTime.fromISO(new Date(value).toISOString()).toLocaleString({
|
||||
return DateTime.fromJSDate(new Date(value)).toLocaleString({
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: '2-digit',
|
||||
|
@ -35,7 +35,7 @@ export default async function (eleventyConfig) {
|
|||
});
|
||||
eleventyConfig.addShortcode("figure", (url, alt, caption, width) => {
|
||||
return `
|
||||
<figure>
|
||||
<figure class="styled-figure">
|
||||
<img src="${url}" alt="${alt}" width="${width || "700"}" />
|
||||
<figcaption>${caption}</figcaption>
|
||||
</figure>
|
||||
|
@ -75,6 +75,8 @@ export default async function (eleventyConfig) {
|
|||
return sorted;
|
||||
});
|
||||
|
||||
eleventyConfig.addWatchTarget("content/portfolio/**/*");
|
||||
|
||||
}
|
||||
|
||||
export const config = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue