You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be helpful to allow for configuration while running acetate in server/watch mode to have a pathname in addition to host and port.
Description:
When normally running acetate in server/watch mode the dev server will launch with http://localhost:3000/ where content is served from the build output folder configuration.
It would be helpful to have a configuration option where the build output folder configuration is served from http://localhost:3000/foo/bar and all page metadata would remain available.
Justification
This will help with content creators who are not familiar with the acetate build system to author relative links correctly in markdown (md) pages. Often content creators will go up too far in the relative directory tree [foo](../../../folder/index.html) which works fine when hosted from http://localhost:3000 but after deployment the link is broken.
Contact me if this does not accurately describe the issue.
In [email protected], acetate.load(pattern) now accepts an additional options object, acetate.load(pattern, options).
One of those options is a basePath which will be prepend to all page url and dest properties.
So:
acetate.load('**/*.+(html|md)',{basePath: 'javascript/latest'// no leading or trailing slashes})
would now mean that all files matching **/*.+(html|md) will now be output to build/javascript/latest and their URLs will be served accordingly so the dev server will serve the site under /javascript/latest/.
This does have implications for relativeUrl thought. Since relativeUrl is the relative path back to the root of the build folder if you use { basePath: 'javascript/latest' } your relative URL from index.htmlwill now be ../../ instead of ``. To me this is expected behavior but it would be easily worked around with a transformer.
This is part of [email protected] which we are currently testing on the developers site but I hope to have a stable release soon.
Hey Pat,
Request:
It would be helpful to allow for configuration while running acetate in server/watch mode to have a pathname in addition to
host
andport
.Description:
When normally running acetate in server/watch mode the dev server will launch with
http://localhost:3000/
where content is served from thebuild output
folder configuration.It would be helpful to have a configuration option where the
build output
folder configuration is served fromhttp://localhost:3000/foo/bar
and all page metadata would remain available.Justification
This will help with content creators who are not familiar with the acetate build system to author relative links correctly in markdown (
md
) pages. Often content creators will go up too far in the relative directory tree[foo](../../../folder/index.html)
which works fine when hosted fromhttp://localhost:3000
but after deployment the link is broken.Contact me if this does not accurately describe the issue.
--Lloyd
cc: @bsvensson
The text was updated successfully, but these errors were encountered: