Skip to content

v1.2.1

Choose a tag to compare

@compscidr compscidr released this 23 Sep 17:25
· 18 commits to main since this release
c56138c

Prepares the theme for goblog 0.11.0, which loads its CDN scripts with defer (goblogplatform/GoBlog#624).

What's changed

With defer, jQuery and highlight.js are not defined while the page is still parsing, so inline scripts that called them during parse would throw — no syntax highlighting, and a dead GitHub login button. Those calls now wait for DOMContentLoaded, which fires only after every deferred script has run.

  • footer.html — hljs.highlightAll()
  • login.html — the ?code= exchange and the email login form wiring
  • login.html — the GitHub button's href is now set with document.getElementById(...).href during parse, rather than through jQuery. It is never briefly inert, and that line no longer needs a library at all.

Compatibility

Install this before upgrading to goblog 0.11.0. A DOMContentLoaded handler behaves the same whether or not the scripts are deferred, so this release also works on goblog 0.10.0 — min_goblog_version is unchanged.

On 0.11.0 without this release, posts lose syntax highlighting and the GitHub login button does nothing.