Live Rendering

This is a pretty big feature I want to implement.

I want my website to have a form, and when they type in the form fields, I want a rendering of what the hugo site would look like using the user’s input.

Imagine my hugo site is a book review site with each page being a markdown page with a book review on it. I want the form to have fields like book name, author, and then a field for the user’s review, and I want the user to be able to see a preview of what the site will look like with the content that they typed in.

I know there are issues with input sanitization, but I’m more concerned for if this is even possible at all.

Any advice?

1 Like

I would first try to add a <template> that mimic the final page. Then use Javascript to fill in the template with whatever the user enter in to the form.