Update: hexo 6.3 -> 8.1.2 - #56
Merged
Merged
Conversation
Four things had to change beyond the version bump:
* `syntax_highlighter:` in _config.yml. Hexo 7 replaced the
`highlight.enable` / `prismjs.enable` switches with a single
`syntax_highlighter` key. The old ones are now silently ignored, and an
unset `syntax_highlighter` falls back to highlight.js — whose
`backtick_code_block` filter shares priority 10 with hexo-prism-plus but
is registered first, so it swallowed every fenced block. The symptom was
bare `<pre>` with no language class site-wide and a prism bundle
containing only the languages reached via `{% includecode %}`. The old
keys are kept alongside because NexT still reads `config.highlight.wrap`
and `config.prismjs.preprocess` for its `hljswrap`/`prism` client flags.
* `scripts/tags/random_xkcd.js` used `this.site.data.xkcd`. Hexo 7+ calls
tags via `Reflect.apply(fn, context.ctx, ...)`, so `this` is the nunjucks
render context and has no `site` — the build died with
`Cannot read properties of undefined (reading 'data')` against an
"unknown path" template. Uses `hexo.locals.get('data')` now.
* An `overrides` entry for hexo-filter-responsive-images, which still
declares `hexo: 3.x || 4.x || 5.x || 6.x || 7.x`. It requires no hexo
internals at all (only the injected global plus hexo-fs/sharp), so the
range is just stale metadata.
* hexo-cli floor raised to ^4.3.2.
Verified by building the whole site on 6.3.0 and on 8.1.2 and diffing
`public/`. After normalising the three nondeterministic bits (prism's
random code-block ids, the random xkcd element id, NexT's random
links-of-author colour) the only differences left are `article:tag`
ordering in og meta — same tag set, confirmed by hashing the sorted
lists — and property ordering inside publist's embedded CSS. No content,
structural or styling change. 43/43 tests pass and a headless render of
/, /blog, /about, /projects, /research and a post is clean.
BLOCKED: needs hexo-next-publist released with the Hexo 7/8 Box fix
(Aetf/hexo-next-publist). The lockfile here still resolves the published
2.2.1, which fails to load on Hexo 8, so `npm ci` + build will fail in CI
until that release lands and this lockfile is regenerated against it.
Co-Authored-By: Claude <noreply@anthropic.com>
Picks up the Hexo 7/8 Box fix (Aetf/hexo-next-publist#197), which is what this branch was blocked on. `npm ci` now resolves cleanly against Hexo 8.1.2 — previously it ERESOLVEd on 2.2.1's `hexo: ^6.3.0` peer. Co-Authored-By: Claude <noreply@anthropic.com>
Aetf
marked this pull request as ready for review
August 6, 2026 10:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocked —
hexo-next-publist2.2.4 is published with the Hexo 7/8 Box fix, sonpm ciresolves cleanly and CI is green.What had to change beyond the version number
1.
syntax_highlighter:in_config.yml— the big one.Hexo 7 replaced the
highlight.enable/prismjs.enableswitches with a singlesyntax_highlighterkey. The old ones are now silently ignored, and an unsetsyntax_highlighterfalls back to highlight.js. Itsbacktick_code_blockfilter shares priority 10 with hexo-prism-plus but is registered first, so it swallowed every fenced block:The symptom was bare
<pre>with no language class across the whole site, and a prism bundle reduced to only the languages reached via{% includecode %}(c,clike,cpp— nobash). Settingsyntax_highlighter:empty makes the built-in bail and hands the fences back to prism-plus.The old keys are kept alongside, because NexT still reads
config.highlight.wrapandconfig.prismjs.preprocesswhen computing its client-sidehljswrap/prismflags. Without them those becomeundefinedand drop out of the emitted next-config JSON — harmless in practice since both are only used in boolean contexts, but it made every page differ for no reason.2.
scripts/tags/random_xkcd.jsusedthis.site.data.xkcd.Hexo 7+ calls tags via
Reflect.apply(fn, context.ctx, ...), sothisis the nunjucks render context and has nosite. The build died withTypeError: Cannot read properties of undefined (reading 'data')reported against an "unknown path" template, which is not much to go on. Useshexo.locals.get('data')now, which works on every version.3. An
overridesentry forhexo-filter-responsive-images.It still declares
hexo: 3.x || 4.x || 5.x || 6.x || 7.x, sonpm ciERESOLVEs. Reading its source, it requires no hexo internals at all — only the injectedhexoglobal plus hexo-fs/sharp — so the range is just stale metadata.4.
hexo-clifloor raised to^4.3.2, andhexo-next-publistto^2.2.4.Verification
Built the entire site on 6.3.0 and on 8.1.2 and diffed
public/file by file. After normalising the three nondeterministic bits — prism's random code-block ids, the random xkcd element id, and NexT's random links-of-author colour — what is left is:article:tagordering in the og meta of 13 posts. Same tag set, verified by hashing the sorted list per file: all identical.43/43 tests pass. Headless render of
/,/blog,/about,/projects,/researchand a post is clean with zero page errors, including the publist badges on/research.Hexo 8 fixes a broken TOC
/blog/2016/08/03/gsoc-kdevelop-lldb-status/starts with<h3>headings and then introduces an<h2>. Hexo 6'stocObjmishandled that out-of-order sequence and emitted the level-2 entry as an unnumbered sibling with its children restarting at 1:1. Config Page/2. Debugging/(no number) Feature Implementation Status/1. Known Issues/2. Upstream Bugs1. Config Page/2. Debugging/3. Feature Implementation Status/3.1. Known Issues/3.2. Upstream BugsSame five entries, nothing hidden, correct hierarchy. Every other post's TOC is byte-identical.
🤖 Generated with Claude Code