How to add a single HUGO page independent of theme and also add reference to SCSS?

I want to add a custom HTML page completely independent of the theme but at the same time want to reference the SCSS file for style.

What I have tried till now:

As per https://gohugo.io/hugo-pipes/scss-sass/ added below in HTML, not in the layout file but the actual content HTML file.

{{ $sass := resources.Get "sass/main.scss" }} 
{{ $style := $sass | resources.ToCSS }}

This output the above code without parsing.

Front matter is present in HTML file.
HTML file is /content/index.htm
SCSS is /assets/scss/main.scss

Try adding front matter to the HTML file. Note, if your HTML file is in the static directory it may no be parsed, just rendered as such.

Front matter is present.
HTML file is /content/index.htm
SCSS is /assets/scss/main.scss

I missed that part: Hugo doesn’t render templates in content files, with the narrow exception of shortcodes. You might be able to do that. I don’t know, I don’t use Hugo this way. :slight_smile: