hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.28k stars 4.83k forks source link

fix: after enabling "post_asset_folder: true", only one format of posts can be rendered #5531

Open simonkimi opened 2 months ago

simonkimi commented 2 months ago

What does it do?

I added a configuration option post_extensions to address the issue where only posts with the same extension as new_post_name are rendered when post_asset_folder: true.

To resolve this, simply add the file extensions into this configuration to enable rendering, which is useful for handling posts in multiple different file formats.

When post_extensions is not filled in or is empty, the rendering method remains the same as before to ensure compatibility.

fix #5523

Pull request tasks

github-actions[bot] commented 2 months ago

How to test

git clone -b master https://github.com/simonkimi/hexo.git
cd hexo
npm install
npm test
github-actions[bot] commented 1 month ago

Flamegraph

https://0a33eaa03e636b7081233f058ecae290d1357c3c-14-hexo.surge.sh/flamegraph.html https://0a33eaa03e636b7081233f058ecae290d1357c3c-16-hexo.surge.sh/flamegraph.html https://0a33eaa03e636b7081233f058ecae290d1357c3c-18-hexo.surge.sh/flamegraph.html

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 10438819295

Details


Totals Coverage Status
Change from base Build 9746148173: 0.0%
Covered Lines: 9373
Relevant Lines: 9422

💛 - Coveralls