Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.markdown files not processed from custom extension alias (v3.0.0-alpha.11 and above) #3337

Closed
paulrobertlloyd opened this issue Jun 27, 2024 · 15 comments
Labels
education release: canary A release on the canary channel

Comments

@paulrobertlloyd
Copy link
Contributor

paulrobertlloyd commented Jun 27, 2024

Operating system

macOS Sonoma 14.5

Eleventy

v3.0.0-alpha.11+

Describe the bug

Using any version of v3.0.0-alpha after alpha.10 results in 80% of files no longer being written to disk:

  • Copied 2046 files / Wrote 2647 files in 8.08 seconds (3.1ms each, v3.0.0-alpha.10)
  • Copied 2046 files / Wrote 556 files in 2.59 seconds (4.7ms each, v3.0.0-alpha.11)

I thought this might be an issue with incremental builds, but running eleventy without any flags gives the same result. 🤷🏼

Reproduction steps

  1. npm i
  2. npm start

Reproduction URL

https://github.com/paulrobertlloyd/paulrobertlloyd-v4

@paulrobertlloyd
Copy link
Contributor Author

(Am just seeing if I can update my build so that it works if the required env variables are not present…)

@paulrobertlloyd
Copy link
Contributor Author

paulrobertlloyd commented Jun 27, 2024

Have updated my repo such that if the env variables are not present, the site will still build. Interestingly, even more files (~89%) do not get written in this case:

  • Copied 2046 files / Wrote 2318 files in 13.18 seconds (5.7ms each, v3.0.0-alpha.10)
  • Copied 2046 files / Wrote 227 files in 1.24 seconds (5.5ms each, v3.0.0-alpha.11)

@zachleat zachleat added bug high-priority release: canary A release on the canary channel and removed needs-triage labels Jun 27, 2024
@zachleat zachleat added this to the Eleventy 3.0.0 milestone Jun 27, 2024
@zachleat
Copy link
Member

Investigating…

@zachleat
Copy link
Member

This is almost certainly #3302

@zachleat
Copy link
Member

I think it’ll be fixed with an addTemplateFormats in your configuration file:

eleventy.addTemplateFormats("markdown");
eleventy.addExtension("markdown", { key: "md" });

but I haven’t confirmed in your project yet (I’m seeing some other duplicate permalink issues that might be from missing environment variables)

@paulrobertlloyd
Copy link
Contributor Author

paulrobertlloyd commented Jun 27, 2024

Ahhh, okay, that makes sense – something to add to the upgrade docs/plugin!

I’m getting the duplicate permalinks error now too, and that’s with the environment variables set. Will dig into it, but this wasn’t reported as an error before – might have this been silently erroring until this point?

@zachleat
Copy link
Member

zachleat commented Jun 27, 2024

That might be a mistake—I did some changes in that code recently for #3327 I might’ve missed something there. That was shipped in -alpha.14.

It doesn’t look like you were using htmlOutputSuffix but additional messaging was added to make sure output files don’t ovewrite input files—are you doing that on purpose?

@zachleat zachleat changed the title 80% of files no longer written (v3.0.0-alpha.11 and above) markdown files not processed from custom extension alias (v3.0.0-alpha.11 and above) Jun 27, 2024
@zachleat zachleat changed the title markdown files not processed from custom extension alias (v3.0.0-alpha.11 and above) .markdown files not processed from custom extension alias (v3.0.0-alpha.11 and above) Jun 27, 2024
@paulrobertlloyd
Copy link
Contributor Author

If it helps, I get DuplicatePermalinkOutputError in alpha.11.

@zachleat
Copy link
Member

Oh! This is a bug related to #2780. Aliasing extensions should inherit their permalink processing options and it looks like this alias is just using raw permalinks without processing. Filed that one as #3339.

@paulrobertlloyd
Copy link
Contributor Author

Using the uncommon-but-Gruber-preferred .markdown extension has really thrown some spanners in the works, eh! 😬

@zachleat
Copy link
Member

After fixing #3339, I see a new conflict that I’ll have to dive into tomorrow, nothing is jumping out at me yet:

[11ty] Output conflict: multiple input files are writing to `./www/2018/014/n1/index.html`. Use distinct `permalink` values to resolve this conflict.
[11ty]   1. ./src/content/notes/2018-01-15-1.markdown
[11ty]   2. ./src/content/notes/2018-01-14-1.markdown (via DuplicatePermalinkOutputError)

@paulrobertlloyd
Copy link
Contributor Author

paulrobertlloyd commented Jun 27, 2024

That one may very well be time zone dependent; I’ll let you know once alpha.15 ships.

@zachleat
Copy link
Member

oh—oh no! that’s probably it. Not sure the best way to fix that globally but the brand new #867 (comment) will probably give you an escape hatch, if you’re interested.

@paulrobertlloyd
Copy link
Contributor Author

Oooh, that might be just the ticket, thanks!

@zachleat zachleat added the waiting-to-close Issue that is probably resolved, waiting on OP confirmation. label Jun 28, 2024
@zachleat
Copy link
Member

https://github.com/11ty/eleventy/releases/tag/v3.0.0-alpha.15 is now available—going to consider this one resolved unless I hear otherwise, thank you!

@zachleat zachleat removed the waiting-to-close Issue that is probably resolved, waiting on OP confirmation. label Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
education release: canary A release on the canary channel
Projects
None yet
Development

No branches or pull requests

2 participants