eleventy icon indicating copy to clipboard operation
eleventy copied to clipboard

Enhance convenience and performance of DOM based transforms

Open nhoizey opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

I hate to chain a sequence of transforms that all

  • read HTML, “load” is as a DOM, change some values, export to new HTML, then
  • read HTML, “load” is as a DOM, change some values, export to new HTML, then
  • read HTML, “load” is as a DOM, change some values, export to new HTML, then

Would it be possible to have a nicer experience by integrating the “read HTML, load is as a DOM” and “export to new HTML” steps inside 11ty, so that we only have to deal with the DOM?

It could use linkeDOM, which is much faster than Cheerio or other.

Describe alternatives you've considered

No response

Additional context

No response

nhoizey avatar Jan 11 '24 16:01 nhoizey

Related #3194

zachleat avatar Feb 10 '24 16:02 zachleat

Even more related #3199

zachleat avatar Feb 12 '24 15:02 zachleat

Fwiw I do like the API Lume has here, though it’s probably not too fast.

https://lume.land/

image

zachleat avatar Jun 19 '24 16:06 zachleat

This repository is now using lodash style issue management for enhancements. This means enhancement issues will now be closed instead of leaving them open.

View the enhancement backlog here. Don’t forget to upvote the top comment with 👍!

zachleat avatar Jun 19 '24 16:06 zachleat

I couldn't find any documentation about what #3199 provides to authors of plugins performing transforms.

Based on your latest comment about Lume's API, does it mean you're still considering different options, so it's not really available yet?

nhoizey avatar Jun 19 '24 17:06 nhoizey

I’m doing some repo cleanup and putting non-3.0 milestoned enhancements into the enhancement queue!

zachleat avatar Jun 19 '24 18:06 zachleat