When using the Jekyll Archives plugin to generate archive pages for categories and tags, it creates multiple files with the same name in the _site directory, causing a conflict. For example, the following destination is shared by two files:
This results in unexpected contents in the written file, and may affect the functionality of the site.
Steps to reproduce
Install the Jekyll Archives plugin according to the documentation.
Run bundle exec jekyll serve or jekyll serve to build the site locally.
Observe the conflict warning in the terminal output.
Check the _site directory and find the duplicate files.
Expected behavior
The Jekyll Archives plugin should generate only one file per destination, and avoid creating duplicate files in the _site directory.
Possible solutions
Upon inspection, it was found that the source directory contains a duplicate file that matches the archive path. The file is configured to provide the URL redirection from category/guide/ to category/to/.
To resolve this issue, we may rename the category/doc to category/guide and set the redirection using the front matter redirect_to instead of redirect_from.
Description
When using the Jekyll Archives plugin to generate archive pages for categories and tags, it creates multiple files with the same name in the
_site
directory, causing a conflict. For example, the following destination is shared by two files:This results in unexpected contents in the written file, and may affect the functionality of the site.
Steps to reproduce
bundle exec jekyll serve
orjekyll serve
to build the site locally._site
directory and find the duplicate files.Expected behavior
The Jekyll Archives plugin should generate only one file per destination, and avoid creating duplicate files in the
_site
directory.Possible solutions
Upon inspection, it was found that the source directory contains a duplicate file that matches the archive path. The file is configured to provide the URL redirection from
category/guide/
tocategory/to/
.To resolve this issue, we may rename the
category/doc
tocategory/guide
and set the redirection using the front matterredirect_to
instead ofredirect_from
.Additional information