I’m trying to find a way to throw an error or warning when hugo compiles markdown. There are a couple scenarios for this, but here’s an example:
+++
title = "This title is much too long for a page title and should be shortened to the recommended 50-60 characters according to SEO best practices"
+++
Here is my web page
Then in the theme partial, i would want to have a conditional which throws the warning or error in the console, halts the build, or modifies the web page so it shows a public warning…
if (title.length > 60){
throw.warning "Recommend reduce your title to 60 characters"
}