Metadata
- Source
- FLUID-5588
- Type
- Bug
- Priority
- Major
- Status
- Closed
- Resolution
- Fixed
- Assignee
- Jonathan Hung
- Reporter
- Jonathan Hung
- Created
2015-01-20T10:26:23.741-0500 - Updated
2020-03-12T09:00:40.238-0400 - Versions
- N/A
- Fixed Versions
- N/A
- Component
-
- Website
Description
Docpad does not handle paths well for sites which are not deployed to root. To work around this, an url value is defined in docpad.coffee which must be changed prior to deployment to a new server. This URL value is being used in the scripts and styles partials to create absolute paths to javascript and CSS files.
This url value and the scripts and styles partials should be replaced with helper function that properly builds relative URLs to scripts and styles files so everything runs independently of deployment configuration.
Comments
-
Giovanni Tirloni commented
2018-04-29T16:19:21.976-0400 I'd like to add that hard-coding URLs in the website configuration makes it hard to deploy the website in various ad-hoc environments, specially for testing, because then a configuration file needs to be modified instead of relying on relative URLs working everywhere.
-
Justin Obara commented
2020-03-11T12:33:42.162-0400 Merged PR ( https://github.com/fluid-project/fluidproject.org/pull/40 ) into the project repo. Note that this doesn't use a helper function, so it assumes that the site is always deployed at root. However both
npm run docpad
which runs a local server and our actual site are hosted at root. Because we are going to be changing the static site generation soon as part of this GSoC project, I figure we can handle other uses cases in the new site generator.