Skip to content

v1.0.1

Choose a tag to compare

@compscidr compscidr released this 23 Sep 17:26
· 14 commits to main since this release
f5e8c99

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, a dead GitHub login button, and a post body that never gets inserted. Those calls now wait for DOMContentLoaded.

  • footer.html — hljs.highlightAll()
  • login.html — the ?code= exchange and the email login form wiring
  • login.html — the GitHub button's href is set with document.getElementById(...).href during parse now, so it is never briefly inert and needs no library
  • post.html — the $("#html") call that inserts the rendered post

post.html still builds its converter during parse: the comment loop and previewComment() read that global, and showdown/DOMPurify are local body scripts that are not deferred.

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 older goblog — min_goblog_version is unchanged at 0.7.0.

Note

This theme still renders markdown in the browser. goblog 0.10.0 moved that to the server for the other themes but it was never ported here — tracked in #2.