'.json': 'application/json; charset=utf-8',
'.png': 'image/png',
'.svg': 'image/svg+xml',
+ '.ttf': 'application/octet-stream',
+ '.woff': 'font/woff',
+ '.woff2': 'font/woff2',
'.xml': 'text/xml; charset=utf-8'
}
},
}
Site.prototype.serve_dir = async function(env, pathname, components) {
- if (await this.serve_jst(env, pathname + '.dir.jst', components))
+ if (await this.serve_jst(env, pathname + '.dir.jst', pathname, components))
return
let stats
env,
components.length > 1 ?
`not directory ${pathname}` :
- `unknown extension "${extension}" in ${env.parsed_url.pathname}`
+ `unknown file type in ${env.parsed_url.pathname}`
)
return
}