-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
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
Won't generate with post_asset_folder on and permalink ending with ".html" #2134
Comments
I am met this problem too, did you find the way to resolve this ? |
@mogita I am already solved this problem; I midified the file post_asset.js in path
you can try it! |
Hi @leokongwq Thanks for the solution. I haven't tried your code yet, but I assume it will only process the slugs ending with "html", am I right? What if the permalink ends with, say, ".eva"? (This one was used on my wordpress blog in the past years :D) |
If the |
Maybe, the |
This needs a fix, running into the same issue. This is helpful for being able to migrate from other blogging platforms like blogger. |
Today, I find if the path segment is begin with File: var postPath = post.path;
if (/\.html$/.test(postPath)) {
postPath = postPath.slice(0, postPath.lastIndexOf('.'));
}
return pathFn.join(postPath, this.slug); |
@Alex1990 Could you please create a PR for it? |
@NoahDragon Yes. But I don't understand how to implement a test for it. How to mock the |
@Alex1990 Thanks. Hmmm... I see the problem. I'm also not familiar with that part. I will take a look. |
Environment Info
Node version(
node -v
)Your site
_config.yml
Your theme
_config.yml
Plugin version(
npm ls --depth 0
)For BUG
ENOTDIR
post_asset_folder: true
andpermalink: :year/:month/:title.html
in Hexo's _config.yml. Thenhexo new a-new-post
, put an image into the foldera-new-post
created by hexo'snew
command. To change or not thea-new-post.md
file is not essential. Nowhexo generate
and the error should emerge.Thank you for reading thru, looking forward to a solution.
The text was updated successfully, but these errors were encountered: