hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
39.64k stars 4.87k forks source link

How can I deploy my site on a subdirectory #4310

Closed schtonn closed 4 years ago

schtonn commented 4 years ago

Check List

Please check followings before submitting a new issue.

Question

1775 did not solve this

is this configuration just changes the meta things and links

It's actually working well in server mode but did not deploy well

so after deploying what I see is a site lost its css and js files and still in its original directory

Environment & Settings

Node.js & npm version

npm -v
6.13.4
node -v
v12.16.1

Your site _config.yml (Optional)

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://schtonn.github.io/blog
root: /blog/
permalink: posts/:title/
permalink_defaults:
pretty_urls:
  trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: true # Set to false to remove trailing '.html' from permalinks

Your theme _config.yml (Optional)

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

+-- @upupming/hexo-renderer-markdown-it-plus@2.0.2
+-- babel-core@6.26.3
+-- babel-preset-es2015@6.24.1
+-- gulp@4.0.2
+-- gulp-babel@7.0.1
+-- gulp-htmlclean@2.7.22
+-- gulp-htmlmin@5.0.1
+-- gulp-imagemin@7.1.0
+-- gulp-minify-css@1.2.4
+-- gulp-remove-use-strict@1.0.0
+-- gulp-rename@2.0.0
+-- gulp-uglify@3.0.2
+-- hexo@4.2.0
+-- hexo-deployer-git@2.1.0
+-- hexo-generator-archive@1.0.0
+-- hexo-generator-category@1.0.0
+-- hexo-generator-index-pin-top@0.2.2
+-- hexo-generator-tag@1.0.0
+-- hexo-renderer-ejs@1.0.0
+-- hexo-renderer-markdown-it-plus@1.0.4
+-- hexo-renderer-stylus@1.1.0
+-- hexo-server@1.0.0
+-- imagemin-gifsicle@7.0.0
+-- imagemin-jpegtran@6.0.0
+-- imagemin-mozjpeg@8.0.0
+-- imagemin-svgo@7.1.0
`-- picomatch@2.2.2

Your package.json package.json

Others

stevenjoezhang commented 4 years ago

There is a discussion about it: https://github.com/hexojs/hexo-deployer-git/issues/76#issuecomment-312907772

dimaslanjaka commented 2 years ago

Related for hexo@6.3.0 https://github.com/hexojs/hexo/issues/5086