javascript - Express res.render breaks extends layout when using deep url paths -


if stay 1 level deep in app /level1 , call res.render(mypage.jade) runs great when go /level1/level2 res.render(mypage.jade) 404s on css/js , styling breaks.

folder structure

  • views
  • pages
  • pages/mypage.jade
  • layout.jade

mypage.jade

extends ../layout 

you must use absolute link resource try /css/... not use css/... (same js file)


Comments

Popular posts from this blog

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -