PieCrust icon indicating copy to clipboard operation
PieCrust copied to clipboard

Pretty URLs for page assets in CMS mode?

Open gerundt opened this issue 11 years ago • 1 comments

I tried the CMS mode and have problems with the page assets.

I have the page _content/pages/foo.html and a image _content/pages/foo-assets/bar.jpg. If I use <img src="{{ assets['bar'] }}" ... the URL get translated to http://webserver/_content/pages/foo-assets/bar.jpg. Of course is the path correct, but he is ugly. ;)

If I bake the site, I get the nice http://webserver/foo/bar.jpg.

Are pretty URLs possible for page assets?

Greetings, Tim

gerundt avatar Aug 03 '14 12:08 gerundt

The idea was originally to prevent unnecessarily copying page assets around, since we can serve them directly from their original path... I'll have to add this to the long list of feature requests :) (I'm busy on PieCrust 2.0 right now so that list is getting pretty long)

ludovicchabant avatar Aug 05 '14 17:08 ludovicchabant