Skip to content
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

why hexo generate none empty _drafts posts into public folder? #4127

Open
benbendemo opened this issue Feb 13, 2020 · 0 comments
Open

why hexo generate none empty _drafts posts into public folder? #4127

benbendemo opened this issue Feb 13, 2020 · 0 comments

Comments

@benbendemo
Copy link

@benbendemo benbendemo commented Feb 13, 2020

Expected behavior

Hi, i have set up post_asset_folder: true in _config.yml within my Hexo site.

Recently i found a really strange thing that once there is something (eg: like a 'xxx.jpg' picture) exist in a draft post folder, Hexo will generate the draft post's content into public folder;

However if there is none in draft post folder, even there are full of words in draft.md post, Hexo wouldn't generate the draft post's content into public folder.

Why would this be happen?

How could i disable this, i want make all the draft posts not generated in public folder? could you give some help for this?

How to reproduce?

step1:
Use hexo new draft 'test-help', you will get a test-help.md file and test-help folder because i set post_asset_folder to true.

step2:
Use hexo g,'test-help.md' draft post would not be generated in public folder

step3:
Add a 'test.jpg' into test-help folder, then use hexo g, the draft post would be generated into public folder.

Environment & Settings

Node.js & npm version

hexo: 3.3.9
hexo-cli: 3.1.0
os: Darwin 18.6.0 darwin x64
http_parser: 2.8.0
node: 10.16.3
v8: 6.8.275.32-node.54
uv: 1.28.0
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 64
nghttp2: 1.39.2
napi: 4
openssl: 1.1.1c
icu: 64.2
unicode: 12.1
cldr: 35.1
tz: 2019a
npm: 6.9.0

Hexo and Plugin version(npm ls --depth 0)

hexo-site@0.0.0 /Users/jacksonshawn/hexoblog/benbendemo
├── dtrace-provider@0.8.8
├── hexo@3.3.9
├── hexo-asset-image@0.0.3
├── hexo-deployer-git@0.3.1
├── hexo-generator-archive@0.1.4
├── hexo-generator-category@0.1.3
├── hexo-generator-index@0.2.1
├── hexo-generator-search@2.1.1
├── hexo-generator-sitemap@1.2.0
├── hexo-generator-tag@0.2.0
├── hexo-renderer-ejs@0.3.1
├── hexo-renderer-marked@0.3.0
├── hexo-renderer-stylus@0.3.3
├── hexo-server@0.2.2
└── hexo-wordcount@3.0.2

Your package.json package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.3.9"
  },
  "dependencies": {
    "dtrace-provider": "^0.8.8",
    "hexo": "^3.2.0",
    "hexo-asset-image": "0.0.3",
    "hexo-deployer-git": "^0.3.1",
    "hexo-generator-archive": "^0.1.4",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-index": "^0.2.1",
    "hexo-generator-search": "^2.1.1",
    "hexo-generator-sitemap": "^1.2.0",
    "hexo-generator-tag": "^0.2.0",
    "hexo-renderer-ejs": "^0.3.0",
    "hexo-renderer-marked": "^0.3.0",
    "hexo-renderer-stylus": "^0.3.1",
    "hexo-server": "^0.2.0",
    "hexo-wordcount": "^3.0.2"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.