I have a web publishing setup where I compile my LaTeX down to static HTML templates using tex4ht. I end up creating my own styling for these pages. I also use the minted package to style code in my documents, which produces really nice output when using pdflatex, but when using tex4ht, content in the minted environment is converted into severely ugly HTML, so that code like this:
\begin{minted}{nginx}
location / {
auth_request /auth/;
auth_request_set $auth_status $upstream_status;
index index.html;
error_page 403 =301 @loginRedirect;
}
\end{minted}
Produces HTML like this:
<a
id="x1-5018r9"></a><br class="fancyvrb" />
<a
id="x1-5020r10"></a><span
class="ectt-1200">  </span><span
class="ectt-1200">  </span><span
class="ectt-1200">  </span><span
class="ectt-1200">  </span><span id="textcolor56"><span
class="ectt-1200">location</span></span><span
class="ectt-1200">  </span><span id="textcolor57"><span
class="ectt-1200">=</span></span><span
class="ectt-1200">  </span><span id="textcolor58"><span
class="ectt-1200">/auth/</span></span><span
class="ectt-1200">  </span><span id="textcolor59"><span
class="ectt-1200">{</span></span>
... (truncated for brevity) ...
How can I make this output prettier? Something that I can more easily style using my own custom stylesheets?
Right now, I'm invoking htlatex directly, but I've recently found some good documentation on using make4ht (which seems to be hard to come by), so if this can be done using a custom make4ht configuration script written in Lua, that's definitely something I'd be willing to look into.

