-
Notifications
You must be signed in to change notification settings - Fork 118
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
Canonical URL calculation is off for top-level functions #2122
Comments
Not only for top-level ones, but other files too, e.g.:
vs
|
This seems only to impact pub, but they are an important customer. Maybe there is some bad interaction with the --rel-canonical-prefix flag. |
@isoos Does the --use-base-href flag makes any difference? |
It does: the canonical URL is good, and it brings back the |
We should consider it a temporary fix until we can figure out what's wrong with the URL generation. Future versions of dartdoc can't rely on base href because markdown can't work well with it. |
I actually removed I think I know what's happening, but it may take a bit to figure out a fix. In the meantime, you can use |
The patch for the canonical URL is not too bad in our code, so I'd rather wait for a future release to get this fixed (not in a hurry with that), than going back and forth with the |
leaving as P1 since there is a workaround. |
dartdoc:
0.30.0+1
example top-level function:
arguments:
--rel-canonical-prefix https://pub.dartlang.org/documentation/pana/0.12.2
expected content in HTML:
<link rel="canonical" href="https://pub.dartlang.org/documentation/pana/0.12.2/pana/prettyJson.html">
actual content in HTML:
<link rel="canonical" href="https://pub.dartlang.org/documentation/pana/0.12.2/../pana/prettyJson.html">
(note the
/../
segment between/0.12.2/
and/pana/
)The text was updated successfully, but these errors were encountered: