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

BUG: image link not include config.root #3951

Closed
5 tasks done
sKawashima opened this issue Dec 14, 2019 · 2 comments
Closed
5 tasks done

BUG: image link not include config.root #3951

sKawashima opened this issue Dec 14, 2019 · 2 comments

Comments

@sKawashima
Copy link

Please help me 💦

Check List

Please check followings before submitting a new issue.

  • I have already read Docs page & Troubleshooting page
  • I have already searched existing issues and they are not help to me
  • I examined error or warning messages and it's difficult to solve
  • Using the latest version of Hexo (run hexo version to check)
  • Node.js is higher than 8.6.0

Expected behavior

I set config.root '/blog/', so img.src should to be '/blog/~~~'.

Actual behavior

img.src is not include config.root
image

How to reproduce?

  • Step1
  • Step2
  • etc...

Environment & Settings

Node.js & npm version

node -v
v12.4.0
npm -v
6.9.0

Your site _config.yml (Optional)

url: http://***.com/blog
root: /blog/
permalink: :year/:month/:title/
permalink_defaults:

Your theme _config.yml (Optional)

empty

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

Your package.json package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.9.0"
  },
  "dependencies": {
    "dotenv": "^8.2.0",
    "ftp-deploy": "^2.3.6",
    "hexo": "^4.1.1",
    "hexo-clean-css": "^1.0.0",
    "hexo-filter-flowchart": "^1.0.4",
    "hexo-fontawesome": "^2.1.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-feed": "^2.2.0",
    "hexo-generator-index": "^1.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-html-minifier": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-jade": "^0.5.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-renderer-stylus": "^1.1.0",
    "hexo-server": "^1.0.0",
    "hexo-tag-googlemaps": "^1.2.1",
    "hexo-tag-link-preview": "^1.2.3",
    "hexo-tag-soundcloud": "^1.0.2",
    "hexo-tag-twitter": "^1.0.1",
    "hexo-toc": "^1.1.0",
    "hexo-uglify": "^1.1.0",
    "textlint": "^11.5.0",
    "textlint-rule-preset-ja-technical-writing": "^3.1.3"
  },
  "scripts": {
    "dev": "hexo clean;hexo s",
    "generate": "hexo g",
    "deploy": "node deploy.js",
    "lint": "textlint -f pretty-error source/_posts/*.md",
    "lintfix": "textlint --fix source/_posts/*.md",
    "new": "hexo new",
    "blc": "blc http://localhost:4000/"
  },
  "devDependencies": {
    "barba.js": "^1.0.0",
    "broken-link-checker": "^0.7.8"
  }
}

Others

@curbengh
Copy link
Contributor

Fixed in hexojs/hexo-renderer-marked#111, but the option is disabled by default. To enable:

marked:
+  prependRoot: true

We plan to enable it by default in next major version (v3) of hexo-renderer-marked.

@sKawashima
Copy link
Author

@curbengh
Thank you for your quick reply.
And I was happy to hear the news.
The problem has also been resolved.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants