We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
之前有几个issues已经提到该问题,但由于hexo更新,hexo-asset-image插件集成到hexo-renderer-marked
粗略的看了下代码,确实与abbrlink插件无关。于是硬着头皮研究了好久,现附解决方案。
node_modules\hexo\lib\models\post_asset.js目录中
node_modules\hexo\lib\models\post_asset.js
改动1:
return join(post.path.replace(/\.html?$/, ''), this.slug);
改为:
return join(dirname(post.path), post.slug, this.slug);
改动2:
const { join} = require('path');
改为
const { join, dirname } = require('path');
本想写个Scripts优雅地解决,尝试了很久都无法实现,只能改hexo的代码。希望后来者有人能研究出来。
The text was updated successfully, but these errors were encountered:
这个问题由hex-asset-image 应该早就解决了才是 xcodebuild/hexo-asset-image#58 不知道为啥继任者又出这个问题 😢
Sorry, something went wrong.
之前有几个issues已经提到该问题,但由于hexo更新,hexo-asset-image插件集成到hexo-renderer-marked 粗略的看了下代码,确实与abbrlink插件无关。于是硬着头皮研究了好久,现附解决方案。 node_modules\hexo\lib\models\post_asset.js目录中 改动1: return join(post.path.replace(/\.html?$/, ''), this.slug); 改为: return join(dirname(post.path), post.slug, this.slug); 改动2: const { join} = require('path'); 改为 const { join, dirname } = require('path'); 本想写个Scripts优雅地解决,尝试了很久都无法实现,只能改hexo的代码。希望后来者有人能研究出来。
请问大佬现在这个版本的文件是这样的如何改动? "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; const warehouse_1 = __importDefault(require("warehouse")); const path_1 = require("path"); module.exports = (ctx) => { const PostAsset = new warehouse_1.default.Schema({ _id: { type: String, required: true }, slug: { type: String, required: true }, modified: { type: Boolean, default: true }, post: { type: warehouse_1.default.Schema.Types.CUID, ref: 'Post' }, renderable: { type: Boolean, default: true } }); PostAsset.virtual('path').get(function () { const Post = ctx.model('Post'); const post = Post.findById(this.post); if (!post) return; // PostAsset.path is file path relative to public_dir // no need to urlescape, #1562 // strip /.html?$/ extensions on permalink, #2134 return (0, path_1.join)(post.path.replace(/.html?$/, ''), this.slug); }); PostAsset.virtual('source').get(function () { return (0, path_1.join)(ctx.base_dir, this._id); }); return PostAsset; }; //# sourceMappingURL=post_asset.js.map
public_dir
No branches or pull requests
之前有几个issues已经提到该问题,但由于hexo更新,hexo-asset-image插件集成到hexo-renderer-marked
粗略的看了下代码,确实与abbrlink插件无关。于是硬着头皮研究了好久,现附解决方案。
node_modules\hexo\lib\models\post_asset.js
目录中改动1:
改为:
改动2:
改为
本想写个Scripts优雅地解决,尝试了很久都无法实现,只能改hexo的代码。希望后来者有人能研究出来。
The text was updated successfully, but these errors were encountered: