Skip to content

Article path problem #5414

Closed Answered by FurryRbl
FurryRbl asked this question in Question / Answer
Discussion options

You must be logged in to vote

It looks like hexo doesn't have such a feature.

You can consider placing the folder in source/ instead of source/_post/, just like hexojs/site does.

Thank you for your answer but I have actually written a script to meet my needs XD

"use strict";

var hexo = hexo || {};

hexo.extend.filter.register("post_permalink", function (data) {
	const parts = data.split("/").filter((part) => part !== "");

	if (parts.length > 1) {
		parts.pop();
		return parts.join("/") + "/";
	} else {
		return "/";
	}
});

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by uiolee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants