HTML validation breaks some styling
Closed this issue · 4 comments
It seems like the changes to templates to make the generated HTML pass validation broke some CSS that I didn't catch. I'm not sure if this can be fixed purely through CSS, or if some of the changes need to be rolled back.
I'm also not sure what the best way to systematically find problems that may have been caused were, but a good start might be to find cases where HTML was modified but not corresponding CSS.
Tagging @curtisalexander; if you can let me know things that broke, that'd be much appreciated.
Sorry for any confusion I may have caused. I had thought that when I pulled the latest round of changes that it affected the styling of my blog. In some ways it did, in other ways it didn't. I had previously noted this fact within the README of the fork I had under my username. The situation is more subtle.
Instead, I think the issue is with pandoc v2
. I am making use of the blogdown R package to manage the creation of static html rather than just Hugo directly. blogdown
makes use of pandoc ultimately to spit out the needed html. Then Hugo picks up the files and does its magic to create my blog. pandoc v1
would wrap markdown headings (#
) with <div>
tags. But in pandoc v2
it wraps markdown headings with <section>
tags.
Because I had seen that in one of the most recent pull requests that <section>
tags were replaced with <div>
tags, I had assumed that the issue was due to the change. Before I realize what was going on with pandoc
, I tried going back to an earlier release of cocoa-eh-hugo-theme
— specifically v1.4.0
— in order to "fix" the issue. But after going back, I couldn't get everything to look right. Thus, I started digging and found out what was going on with pandoc
.
At this point, I have no idea if you want to continue to consider this a bug
. For now, I switched out pandoc
to the earlier version so that section headers are wrapped in <div>
tags and everything works correctly — even with the most recent changes.
Note that I since deleted and re-forked. So there aren't any notes on my fork anymore about specific issues with the theme.
Interesting, thanks for letting me know. And no worries whatsoever -- the validation change was a pretty big fix, so I want to be sure nothing breaks. This is especially true since the change itself was a bit hard to test since it made changes in many places that would be hard to all engage in a single test instance.
Anyhow, I'd like to take a look into this a bit more later, so thanks a ton for bringing this up :)
Good luck with the pandoc
also, and if you don't mind keeping me updated on how things go, I'm curious about other ways to build this.
Closing this, but I'll keep an eye on this. I'm also going to be looking into documenting different ways people build their sites, because I should at least be familiar to avoid breaking things. Thanks for your help @curtisalexander 🥇