fbrctr / fabricator

A tool for building website UI toolkits and style guides
http://fbrctr.github.io/
MIT License
1.11k stars 124 forks source link

Change {{baseurl}} on build? #244

Closed Sensiblemnd closed 7 years ago

Sensiblemnd commented 8 years ago

I noticed that when you run the build the base URL will go to / I need it to not have that

Sensiblemnd commented 8 years ago

More details when I do a build the html is deployed to a subfolder in a domain foo.com/build. Now since the URL of all scripts in the html start with /asset/ all css and js are trying to load from the root which breaks the site.

halovanic commented 8 years ago

Adding this else block to the fabricator-assemble script resolved the issue for me:

if (collection) {
    pageMatter.data.baseurl = '..';
} else {
    pageMatter.data.baseurl = '.';
}

It should make all paths using baseurl relative.