Repository navigation
v0.11.0
What's Changed
- Defer the CDN scripts by @compscidr in #629 (closes #624)
- Editor: stop scaling heading sizes in the markdown source view by @compscidr in #628
Pages stop waiting on cdnjs
Every page loaded jQuery, Bootstrap and — on posts — highlight.js as plain <script src>, each blocking the parser until it arrived. All 25 external script tags now carry defer, so the HTML parses while they download.
Deferred scripts run in order, after parsing and before DOMContentLoaded, so the inline calls that touch them wait for that event: hljs.highlightAll(), the login page's OAuth exchange and email form, the SimpleMDE editors, setupEditorTabs, the settings page's Bootstrap tab restore and the wizard's jQuery. Templates that only declare functions for onclick are untouched — those run when the user clicks and have to stay global.
Three lint tests over the shipped templates guard the arrangement, because it breaks silently: the page still renders, it just stops highlighting code or saves the wrong text.
The editor is a source view again
SimpleMDE's stylesheet scaled headings inside the editing surface to 200/160/125/110% — a leftover from when the browser rendered markdown. Since 0.10.0 the Preview tab renders through the server, so those sizes were a second, disagreeing rendering, and the line height lurched as you typed past a #. Headings are now the same size as body text and keep their bold weight; **bold**, *italic* and the code background are unchanged, as are the toolbar and paste-to-upload.
⚠️ Update your theme first
If you run goblog-theme-forest or goblog-theme-minimal, install the new version before upgrading:
- goblog-theme-forest v1.2.1
- goblog-theme-minimal v1.0.1
Those themes carry their own copies of footer.html, login.html and post.html, whose inline scripts call jQuery and highlight.js during parse. On 0.11.0 with an older theme, posts lose syntax highlighting and the GitHub login button does nothing. Both theme releases are backward compatible, so they can be installed before this upgrade.
goblog-site-theme needs nothing — it is tracked from main, which already has the change.
Not included
Bootstrap, Font Awesome and Tachyons are <link rel="stylesheet"> elements, and defer does not apply to stylesheets. They are still render-blocking — tracked in #630.
Full Changelog: v0.10.0...v0.11.0