mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 17:17:28 +02:00
Update server routing for static assets
This commit is contained in:
parent
a455ca9745
commit
ee82575df0
2 changed files with 1 additions and 3 deletions
|
@ -379,8 +379,6 @@ function execute(port) {
|
||||||
/* serve static content first from user folder then from docusaurus */
|
/* serve static content first from user folder then from docusaurus */
|
||||||
app.use(siteConfig.baseUrl, express.static(CWD + "/static"));
|
app.use(siteConfig.baseUrl, express.static(CWD + "/static"));
|
||||||
app.use(siteConfig.baseUrl, express.static(__dirname + "/../static"));
|
app.use(siteConfig.baseUrl, express.static(__dirname + "/../static"));
|
||||||
app.use(express.static(CWD + "/static"));
|
|
||||||
app.use(express.static(__dirname + "/../static"));
|
|
||||||
|
|
||||||
app.get(/\/[^\.]*\/?$/, (req, res) => {
|
app.get(/\/[^\.]*\/?$/, (req, res) => {
|
||||||
if (req.path.toString().endsWith("/")) {
|
if (req.path.toString().endsWith("/")) {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"shelljs": "^0.7.8"
|
"shelljs": "^0.7.8"
|
||||||
},
|
},
|
||||||
"name": "docusaurus",
|
"name": "docusaurus",
|
||||||
"version": "1.0.0-alpha.20",
|
"version": "1.0.0-alpha.21",
|
||||||
"bin": {
|
"bin": {
|
||||||
"docusaurus-start": "./lib/start-server.js",
|
"docusaurus-start": "./lib/start-server.js",
|
||||||
"docusaurus-build": "./lib/build-files.js",
|
"docusaurus-build": "./lib/build-files.js",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue