Skip to content

Won't generate with post_asset_folder on and permalink ending with ".html" #2134

@mogita

Description

@mogita

Environment Info

Node version(node -v)

v6.5.0

Your site _config.yml

# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: 御宅型
subtitle: mogita 的技术博客
description: mogita 的技术博客
author: mogita
language: zh-CN
timezone: Asia/Shanghai

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://otaku.mogita.com
root: /
permalink: :year/:month/:title.html
permalink_defaults:

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :year-:month-:day-:title.md
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: true
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace:

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: clean-blog

#### Analytics
cnzz: true

feed:
  type: atom
  path: atom.xml
  limit: 20
  hub:

Your theme _config.yml

# Header
menu:
  关于: /about

# Title on top left of menu. Leave empty to use main blog title
menu_title: 

# URL of the Home page image
index_cover: /img/header.jpg

# Default post title
default_post_title: Untitled

# Comments. Choose one by filling up the information
comments:
  # Disqus comments
  disqus_shortname: otaku-mogita

# Google Analytics Tracking ID
google_analytics:

# Addthis ID
addthis:

# Social Accounts
twitter_url: https://twitter.com/mogita
twitter_handle:
facebook_url:
github_url: https://github.com/mogita
gitlab_url:
linkedin_url:
mailto:

Plugin version(npm ls --depth 0)

hexo-site@0.0.0 /Users/mogita/Documents/Dev/otaku_blog
├── hexo@3.2.2
├── hexo-deployer-ftpsync@0.1.1
├── hexo-generator-archive@0.1.4
├── hexo-generator-category@0.1.3
├── hexo-generator-feed@1.2.0
├── hexo-generator-index@0.2.0
├── hexo-generator-tag@0.2.0
├── hexo-renderer-ejs@0.2.0
├── hexo-renderer-marked@0.2.11
├── hexo-renderer-stylus@0.3.1
└── hexo-server@0.2.0

For BUG

  • Generation always fails with a fatal error ENOTDIR
  • To reproduce this, set post_asset_folder: true and permalink: :year/:month/:title.html in Hexo's _config.yml. Then hexo new a-new-post, put an image into the folder a-new-post created by hexo's new command. To change or not the a-new-post.md file is not essential. Now hexo generate and the error should emerge.

Thank you for reading thru, looking forward to a solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions