On demand rendering... #3927
Replies: 4 comments 2 replies
-
There was a serverless plugin that allowed you to render templates on the fly, it was removed in v3.0.0 as it wasn't widely used and was tied to specific hosts. The good news is that v4.0 currently in alpha brings client side template rendering. So, while you can't do it right now, you will be able to in the fu You can see it in action on the docs. This is a Web Component that takes text input, processess it client side using Eleventy and writes the HTML directly into the DOM. It might be a fair amount of work to get a whole site up and running clientside and 11ty is probably not the best tool for the job, but in theory it will possible. The new @11ty/client package could also be used in a serverless function to do what you want (not strictly static hosting however). That said, building 200k posts is probably a lot quicker than you think, certainly worth a try. And check out Incremental Builds this allows you to only build posts that have changed. I believe there are some people who have leveraged the build cache on various hosts (like Netlify) so even deployments only have to build new pages. Worth asking on the Discord about this. There are quite a few people excited about client side rendering using 11ty as it will unlock dynamic CMS previews. If you have long build times for your site, being able to preview what your content will look like before the build is a major bonus. |
Beta Was this translation helpful? Give feedback.
-
I'll ditto the idea that you may just fine rendering 200k posts. My site
has 6k and locally, I use the .eleventyignore feature to ignore 95% of
that. It makes builds incredibly quick. In production on Netlify, my build
times are around 5 minutes.
…On Mon, Aug 18, 2025 at 5:01 AM dwkns ***@***.***> wrote:
There was a serverless plugin that allowed you to render templates on the
fly, it was removed in v3.0.0 as it wasn't widely used and was tied to
specific hosts. The good news is that v4.0 currently in alpha
<https://github.com/11ty/eleventy/releases/tag/v4.0.0-alpha.4> brings
client side template rendering. So, while you can't do it right now, you
will be able to in the fu
You can see it in action on the docs
<https://www.11ty.dev/docs/permalinks/#index-files>. This is a Web
Component that takes text input, processess it client side using Eleventy
and writes the HTML directly into the DOM.
It might be a fair amount of work to get a whole site up and running
clientside and 11ty is probably not the best tool for the job, but in
theory it will possible. The new @11ty/client package could also be used in
a serverless function to do what you want (not strictly static hosting
however).
That said, building 200k posts is probably a lot quicker than you think,
certainly worth a try. And check out Incremental Builds
<https://www.11ty.dev/docs/usage/incremental/> this allows you to only
build posts that have changed. I believe there are some people who have
leveraged the build cache on various hosts (like Netlify) so even
deployments only have to build new pages. Worth asking on the Discord
<https://discord.gg/GBkBy9u> about this.
There are quite a few people excited about client side rendering using
11ty as it will unlock dynamic CMS previews. If you have long build times
for your site, being able to preview what your content will look like
before the build is a major bonus.
—
Reply to this email directly, view it on GitHub
<#3927 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADADPGZ3DSJY3JTNT6632D3OGQBFAVCNFSM6AAAAACEEOIE6WVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTIMJTHA4TSNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
===========================================================================
Raymond Camden
Email : ***@***.***
Blog : www.raymondcamden.com
Twitter: raymondcamden
|
Beta Was this translation helpful? Give feedback.
-
Quick test. 20,000 files processed in ~14min on a M1 Mac : You may also want want to look at Eleventy Fetch for caching your data from the CMS. |
Beta Was this translation helpful? Give feedback.
-
We did experiment with a plugin for this type of thing but ultimately decided it was too coupled to non-standard APIs on hosting providers and limited the portability of projects. https://www.11ty.dev/blog/community-survey-results/ Ultimately, I still do owe the community how to do this in their own projects on this issue #3129 and I think we may extend some of the work we did on More background on |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m using a headless CMS with around 200k posts.
Can 11ty be used purely as a frontend, where it fetches data from my backend API and renders it dynamically?
For example: if someone visits /post/{slug}, it would call the backend API, get the post data, and then render the UI.
From what I understand, 11ty mainly generates static sites. But with 200k posts, that would mean pre-rendering everything, and rebuilding the whole site every time there’s new content — which feels so 1994's way of deploying a website.
How to achieve my use case so I can host it on static only hosting ?
Beta Was this translation helpful? Give feedback.
All reactions