Eleventy, (also written as 11ty) - tagged the simpler static site generator is anti-framework and does exactly what it says it does; generate static sites. Static sites are slowly becoming the standard for deploying content driven web applications.
This is a companion discussion topic for the original entry at https://strapi.io/blog/building-a-blog-with-11ty-and-strapi
Would be nice to see an 11ty/Strapi starter on the starters page.
Any ideas why I get this error?
[11ty] Unexpected identifier (via SyntaxError)
[11ty]
[11ty] Original error stack trace: /srv/app/frontend/_data/blogposts.js:26
[11ty] query: uid=0(root) gid=0(root) groups=0(root),
[11ty] ^^^
[11ty]
[11ty] SyntaxError: Unexpected identifier
[11ty] at wrapSafe (internal/modules/cjs/loader.js:979:16)
[11ty] at Module._compile (internal/modules/cjs/loader.js:1027:27)
[11ty] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
[11ty] at Module.load (internal/modules/cjs/loader.js:928:32)
[11ty] at Function.Module._load (internal/modules/cjs/loader.js:769:14)
[11ty] at Module.require (internal/modules/cjs/loader.js:952:19)
[11ty] at require (internal/modules/cjs/helpers.js:88:18)
[11ty] at TemplateData.getDataValue (/srv/app/frontend/node_modules/@11ty/eleventy/src/TemplateData.js:489:25)
[11ty] at TemplateData.getAllGlobalData (/srv/app/frontend/node_modules/@11ty/eleventy/src/TemplateData.js:275:29)
[11ty] at async TemplateData.getData (/srv/app/frontend/node_modules/@11ty/eleventy/src/TemplateData.js:338:24)
[11ty] TypeError: Only absolute URLs are supported (via Error)
Is there a way to utilize Strapi’s preview with an SSG like 11ty? I really want to use Strapi and 11ty, but my content editors would need a way to preview the newly edited Strapi content on the front end before publishing. I was thinking of using 11ty’s serverless functions, but I can’t use Netlify, which seems to be the default/best way to do 11ty serverless. Is there some other way to handle previews with 11ty?
I’m working on updating this article and will look at ways of possibly doing that @erich93063 - have you ran into any luck doing that after your message?