No internet connection
  1. Home
  2. Support

Static site shows sidebar after page content (closing tag for </main> moved?)

By Sean Meacher @gadg3ts2020-02-28 16:54:23.242Z

So I've got a static site that refreshes itself automatically.
All is great, other than the fact that for posts, the widget sidebar is placed after the main content, so it all looks a bit broken.
I've managed to track this down to the HTML between the WordPress-generated site and the wp2static-generated site being a little different. But I'm not sure what to do about it.
As you should be able to see from the attached dev tools screenshots, the code is a little different as to where "main" is closed - in the broken one, < / main > is placed after the < div > for the widget area.
Whereas it should be before.
How can I fix this?..

Thanks,
Sean

Wordpress site

Static site

  • 3 replies
  1. Leon Stafford @leonstafford2020-02-29 03:43:42.448Z

    Hi @gadg3ts,

    V6 can be unforgiving if there is HTML it cannot parse. Suggest running original source code through HTML validator, maybe there's a stray <div> somewhere? https://validator.w3.org

    In V7 (almost ready for public testing), core functionality doesn't parse HTML anymore, just doing simple string replacement, with an addon for more advanced HTML processing. That should help with these cases going forward.

    Cheers,

    Leon

    1. G
      In reply togadg3ts:
      Sean Meacher @gadg3ts2020-02-29 12:45:50.196Z

      Aha. There do appear to be relevant tags that are improperly closed. They seem to be theme-related, so I shall give those people a poke and see what I get back.
      Does v7 have an approximate ETA?..
      Thanks,
      Sean