assemble / grunt-assemble-permalinks

Permalinks middleware for Assemble, the static site generator for Grunt.js and Yeoman. This plugin enables powerful and configurable URI replacement patterns, presets, uses Moment.js for parsing dates, and much more.
MIT License
43 stars 11 forks source link

Fix the assets path #70

Open slhwi opened 4 years ago

slhwi commented 4 years ago

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

assemblebot commented 4 years ago

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