Only content rendering


#1

I am creating a front-end for hugo. I am wondering whether I can render just the content of a page, so that when the user is editing the page he can see how it will be rendered.

The issue is that I want to get only the content rendered and not sidebars, header, footer, … I can’t simply parse the markdown, because that wouldn’t include shortcodes.

I looked on the docs, but I haven’t found such a feature, is there a function that does this inside the hugo code?

Thank you in advance


#2

There is a SkipRender flag on the main Build method. See the “hugo new” command code for example.


#3

This would be great for a live preview extension for VS Code.