grunt-assemble-permalinks icon indicating copy to clipboard operation
grunt-assemble-permalinks copied to clipboard

Fix the assets path

Open slhwi opened this issue 4 years ago • 1 comments

The path to the assets folder is calculated based on the relative path of the assets folder to the dest directory.

E.g. dest: "dest" assets: "dest/assets" permalink: "dest/blog/2020-05-13.html"

The result for the assets helper is "../../assets" but it shall be "../assets". The reason is that the path to the assets folder was already calculated relatively to the dest.

Fix should be in index.js:100

page.assets = calculate(page.dest, path.join(page.dirname, originalAssets));

v0.4.0

slhwi avatar May 13 '20 09:05 slhwi

@slhwi Thanks for the issue! If you're reporting a bug, please be sure to include:

  • The version of assemble you are using.
  • Your assemblefile.js (This can be in a gist)
  • The commandline output. (Screenshot or gist is fine)
  • What you expected to happen instead.

assemblebot avatar May 13 '20 09:05 assemblebot