hexo
hexo copied to clipboard
Proposal: introduces PostHTML into Hexo
Since Hexo is a framework outputting HTML files. So we should introduce an HTML transformer into Hexo's core. PostHTML is a tool to transform HTML/XML. With PostHTML we can:
- Migrate away from RegExp and manipulate PostHTML AST instead.
-
meta_generator
: https://github.com/hexojs/hexo/blob/master/lib/plugins/filter/after_render/meta_generator.js -
external_link
: https://github.com/hexojs/hexo/blob/4.2.1/lib/plugins/filter/after_render/external_link.js - Injector plugin: https://github.com/hexojs/hexo/blob/master/lib/extend/injector.js
-
- Enables possibility for more features that require manipulation of HTML (E.g. lazyload images. We can set the
data-src
attribute directly in the Hexo, and inject thelazyload.js
directly to the output, without being limited by the themes) - Integrate htmlnano directly into Hexo.
Reminds me of soupault, an SSG that can parse/manipulate HTML.
Integrate htmlnano directly into Hexo.
Do you mean posthtml itself instead? htmlnano is just a minifier like hexo-html-minifier, not everyone uses a minifier.
Do you mean posthtml itself instead? htmlnano is just a minifier like hexo-html-minifier, not everyone uses a minifier.
Yeah, not everyone wants a minifier. But I want to make the minifier feature kinda a switch (set to true
and boom! enabled) instead of a plugin.
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.