use pre javascript block to set the base path