Checking for pagetree
parent fails on Windows.
Closedopened 2 years ago by leemeichin · 3 comments
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Given a pagetree with nesting (i.e.
And a template,
And the file
raco pollen starton Windows and visiting
<h1>It works</h1>won't render.
raco pollen starton Linux and visiting
<h1>It works</h1>will render.
Upon further inspection, there is some confusion with path separators, as the rendered ptree looks like this:
I suspect there's something within pagetrees that misses out a normalised path when creating a nested pagetree.
here-pathis the absolute path according to local platform conventions (on the idea that this is the least astonishing way to present a local path).
hereis the same path, converted to an output path that is relative to the current project root. You are running Windows, so both
hereadhere to Windows path conventions. Whereas your pagetree seems to assume Linux path conventions.
See also previous discussion on this issue: https://github.com/mbutterick/pollen-users/issues/71
That's an enlightening discussion! @otherjoel I'd actually borrowed something from one of your repos, when looking for inspiration. Namely,
include-files, here: https://github.com/otherjoel/thenotepad/blob/master/index.ptree#L3-L6.
This wasn't an issue with Pollen after all, it was just the hard-coded
"~a/~a"format string. I'm still pretty new to Racket so I hodge-podged a tweak into it so it calls
simplify-pathand ensures the string is normalised.
Apologies for the mis-filed issue here :) I'll close it as there's nothing to fix.
Thank you also @mbutterick for the fantastic library and extensive documentation and tutorials. I came here from Beautiful Racket and thought I'd give it a shot; it's fascinating!