This is a minimal example illustrating how to embed custom code alongside item contents in Eleventy.
Read the blog post explaining this
git clone https://github.com/lwojcik/eleventy-embed-custom-code-in-posts.git
cd eleventy-embed-custom-code-in-posts
npm install
npm start