You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two tags that differ only in case cause a crash during build. 11ty will make the tags lower case and try to make the same tag page twice, which causes an error.
For example tags: adc and ADC
or Example and example
To Reproduce
Steps to reproduce the behavior:
Start with the eleventy base blog: git clone git@github.com:11ty/eleventy-base-blog.git
In first post add tag adc:
---
title: This is my first post.description: This is a post on My Blog about agile frameworks.date: 2018-05-01tags:
- adclayout: layouts/post.njk
---
In the second post add tag ADC
---
title: This is my second post.description: This is a post on My Blog about leveraging agile frameworks.date: 2018-07-04tags:
- ADClayout: layouts/post.njk
---
build the project:
npm install
npm run build
The output is:
$ npm run build
> eleventy-base-blog@5.0.2 build ~/eleventy-tag-bug
> eleventyProblem writing Eleventy templates: (more in DEBUG output)
> Output conflict: multiple input files are writing to `_site/tags/adc/index.html`. Use distinct `permalink` values to resolve this conflict. 1. ./tags.njk 2. ./tags.njk`DuplicatePermalinkOutputError` was thrown: (Repeated output has been truncated…) at TemplateMap.checkForDuplicatePermalinks (~/eleventy-tag-bug/node_modules/@11ty/eleventy/src/TemplateMap.js:547:13) at TemplateMap.cache (~/eleventy-tag-bug/node_modules/@11ty/eleventy/src/TemplateMap.js:308:10) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async TemplateWriter._createTemplateMap (~/eleventy-tag-bug/node_modules/@11ty/eleventy/src/TemplateWriter.js:170:5) at async TemplateWriter.writeTemplates (~/eleventy-tag-bug/node_modules/@11ty/eleventy/src/TemplateWriter.js:203:5) at async TemplateWriter.write (~/eleventy-tag-bug/node_modules/@11ty/eleventy/src/TemplateWriter.js:254:25) at async Eleventy.write (~/eleventy-tag-bug/node_modules/@11ty/eleventy/src/Eleventy.js:743:13)Copied 3 files / Wrote 0 files in 0.23 seconds (v0.12.1)npm ERR! code ELIFECYCLEnpm ERR! errno 1npm ERR! eleventy-base-blog@5.0.2 build: `eleventy`npm ERR! Exit status 1npm ERR!npm ERR! Failed at the eleventy-base-blog@5.0.2 build script.npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
It is trying to create this tag page twice: _site/tags/adc/index.html. And then errors.
Expected behavior
I would expect it to
First convert tags to lower case,
then merge/deduplicate,
then generate tag pages
Environment:
OS and Version: MacOS 10.15.7
Eleventy Version 0.12.1
NodeJS v12.16.1
The text was updated successfully, but these errors were encountered:
Oh my bad, I think it is actually a bug in https://github.com/11ty/eleventy-base-blog
Work around, add a to tag.toLowerCase in the tagList function:
// Create an array of all tagseleventyConfig.addCollection("tagList",function(collection){lettagSet=newSet();collection.getAll().forEach(item=>{(item.data.tags||[]).forEach(tag=>{if(tag){tag=''+tag;tagSet.add(tag.toLowerCase());}})});returnfilterTagList([...tagSet]);});
Two tags that differ only in case cause a crash during build. 11ty will make the tags lower case and try to make the same tag page twice, which causes an error.
For example tags:
adc
andADC
or
Example
andexample
To Reproduce
Steps to reproduce the behavior:
Start with the eleventy base blog:
git clone git@github.com:11ty/eleventy-base-blog.git
In first post add tag
adc
:ADC
The output is:
It is trying to create this tag page twice:
_site/tags/adc/index.html
. And then errors.Expected behavior
I would expect it to
Environment:
The text was updated successfully, but these errors were encountered: