From b00e9d14e211e42851ede645ecc1e325120c4e3e Mon Sep 17 00:00:00 2001 From: Endilie Yacop Sucipto Date: Sun, 3 Jun 2018 02:28:04 +0800 Subject: [PATCH] Fix assets not found in Express server (#720) --- lib/server/server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/server/server.js b/lib/server/server.js index 6444e9eb7fd4..47e0db30db7c 100644 --- a/lib/server/server.js +++ b/lib/server/server.js @@ -516,11 +516,11 @@ function execute(port) { // serve static assets from these locations app.use( - join(siteConfig.baseUrl, 'docs', 'assets'), + `${siteConfig.baseUrl}docs/assets`, express.static(join(CWD, '..', readMetadata.getDocsPath(), 'assets')) ); app.use( - join(siteConfig.baseUrl, 'blog', 'assets'), + `${siteConfig.baseUrl}blog/assets`, express.static(join(CWD, 'blog', 'assets')) ); app.use(siteConfig.baseUrl, express.static(join(CWD, 'static')));