-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug/issue 386 graph not matching filesystem order #449
Bug/issue 386 graph not matching filesystem order #449
Conversation
@@ -33,7 +33,7 @@ class HTMLTransform extends TransformInterface { | |||
let body = await getAppTemplate(barePath, this.workspace); | |||
body = await getAppTemplateScripts(body, this.workspace); | |||
body = getUserScripts(body, this.workspace); | |||
body = getMetaContent(url, this.config, body); | |||
body = getMetaContent(url.replace('index.html', ''), this.config, body); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was sending URLs w/ index.html in the url
so this strips that to keep nice clean URLs, e.g.
www.example.com/about/index.html
is now
although this makes more sense to do in getMetaContent
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edit x2: actually, looks like I don't need it there, the tests pass without it, so I must have fixed the issue that caused this. 😎
b2be2da
to
70e9dc4
Compare
* init refactor with synchronous approach working * robust nested directory output testing * formatting * robust nested directory output testing * graph page object clean up * graph lifecycle refactor: * revert transform changes * fix #455 * fix routing logic * fix incorrect output when pages have index in the name
* init refactor with synchronous approach working * robust nested directory output testing * formatting * robust nested directory output testing * graph page object clean up * graph lifecycle refactor: * revert transform changes * fix #455 * fix routing logic * fix incorrect output when pages have index in the name
Related Issue
resolves #386 (and incorporates #455 / #331 somewhat) , as I have noticed it is happening in my personal project still, and fairly consistently- thegreenhouseio/www.thegreenhouse.io#174 (comment)
Summary of Changes
walkDirectory
logic synchronous, which makes this issue go away at least (async programming is hard 😞 )route
is normalized and "safe" to use and always end with/
, solves routes with and without trailing forward slash causes route "misses" #331Nice To Have
walkDirectory
to not rely oncontext
, so it can move out of the scope ofmodule.exports
edit: tracking both of the above in Trello for post 1.0 efforts / optimizations