eleventy
eleventy copied to clipboard
Dynamic data inside static pages
I have a single page that needs to have it's contents pulled from an external source.
The environment is a site that describes a service.
- 90% of the content is truly static
- 9% of the content is easily created using data files (done so non-tech people can edit the content)
- 1% of the content needs to change when configuration within the actual service changes (new plugins, version changes, etc)
Whilst it would be possible to figure out some mechanism to have our Continual Integration process do this, the logic would be labyrinthine & prone to error (we're talking live, beta, and dev instances; and multiple elements to track, each of which can be changed at any time)
The logical solution is to have the eleventy system query it's service, and get the data directly.
Bring on https://mxb.dev/blog/using-webmentions-on-static-sites/ !!
I can make this work apart from one small point: it builds me some static files at startup, and never changes them.
Does anyone have any examples of actual dynamic data in Eleventy?