eleventy-starter-ghost icon indicating copy to clipboard operation
eleventy-starter-ghost copied to clipboard

Error for all internal tags

Open bmann opened this issue 5 years ago • 7 comments
trafficstars

Errors on the source site that result in 404s all attempt to write to dist/404.html which itself causes the build to fail and nothing to get written.

I tracked this down to using internal tags. Since I only had 4 and wasn't really using them, I deleted them. I guess check for internal tags and skip them?

bmann avatar Oct 06 '20 05:10 bmann

Hmm, seems strange, would you be able to go into more detail? We don't really want to be skipping internal tags since they are very useful for creating custom collections in Eleventy

daviddarnes avatar Oct 06 '20 13:10 daviddarnes

The links to /tag/hashtag-(someinternaltag) throw 404s on our live site, so when Eleventy went to fetch them it followed the redirect and wrote to the 404 file.

I didn’t change anything with Ghost so I just assumed that the internal tags aren’t publicly browseable. I assume by design, since you don’t really want to expose potentially private metadata like “don’t show this bad post” or whatever.

bmann avatar Oct 06 '20 19:10 bmann

Im a bit confused, are you linking to those internal tag pages? Sounds to me like Eleventy is just doing as expected and showing a 404 page on pages that shouldn't exist

daviddarnes avatar Oct 06 '20 23:10 daviddarnes

I am not linking to them, this is the default behaviour with this starter out of the box.

When I did a build, it generates all the /tag/tagname pages. Since the internal tags all show a 404, Eleventy gives me an error that multiple pages have the same /dist/404.html permalink and fails to build.

Steps to reproduce would be, make a ghost site with at least one internal tag.

bmann avatar Oct 07 '20 02:10 bmann

@bmann I've proposed a fix which will remove internal tags from the tags collection. Internal tags will still be an attribute on posts, but filtered out when tag pages are created

daviddarnes avatar Nov 12 '20 10:11 daviddarnes

Yeah that’s ideal. Thank you!

bmann avatar Nov 13 '20 04:11 bmann

I seem to be having a very similar problem.

I'm not 100% sure how to confirm this error is coming from the same underlying issue - or go about fixing it. But it seems related, sorry if I should have opened a new issue?


I am using many collections, but no internal tags for pages - instead I am filtering by author for my page collections.

  config.addCollection("jaPages", async function(collection) {
    collection = await api.pagesaz
      .browse({
        include: "authors",
        limit: "all",
        filter: "author:ja"
      })

and hash-tags for posts

 config.addCollection("enJournal", async function(collection) {
    collection = await api.posts
      .browse({
        include: "tags,authors",
        limit: "all",
        filter: "author:en+tag:-hash-epp+tag:-hash-shop+tag:-hash-video"
      })

Deploys stopped working suddenly on Netlify yesterday for:

12:17:46 AM: > Output conflict: multiple input files are writing to `dist/404.html`. Use distinct `permalink` values to resolve this conflict.
12:17:46 AM:   1. ./src/404.njk
12:17:46 AM:   2. ./src/404.njk

image

I did try starting with a fresh clone of eleventy-starter-ghost and adding the commit mentioned above, but that didn't seem to change anything in development.

I could delete all internal tags and reorganize, but since there is this open issue I thought first I should ask for advice. Any suggestions about how to proceed would be appreciated. Thank you.

danielclough avatar Dec 24 '21 23:12 danielclough