-
Notifications
You must be signed in to change notification settings - Fork 705
Referring to API docs
TODO: Add info on setting these variables. TODO: Add examples of links in Markdown (so you can see, e.g., that only the API name has the link).
Use the site.dart_api
and site.data.pkg-vers.SDK.channel
config variables to make sure you point to the right version of API docs. Some examples:
-
https://api.dartlang.org/stable/1.24.3/index.html
->{{site.dart_api}}/{{site.data.pkg-vers.SDK.channel}}
which resolves to https://api.dartlang.org/stable or https://api.dartlang.org/dev. -
https://api.dartlang.org/stable/1.24.3/dart-core/dart-core-library.html
->{{site.dart_api}}/{{site.data.pkg-vers.SDK.channel}}/dart-core
which resolves to https://api.dartlang.org/stable/dart-core or https://api.dartlang.org/dev/dart-core
(Note: Drop the/libname-library.html
at the end of the URL.) -
https://api.dartlang.org/stable/1.24.3/dart-core/Iterable-class.html
-> {{site.dart_api}}/{{site.data.pkg-vers.SDK.channel}}/dart-core/Iterable-class.html
which resolves to https://api.dartlang.org/stable/dart-core/Iterable-class.html or https://api.dartlang.org/dev/dart-core/Iterable-class.html -
https://api.dartlang.org/stable/1.24.3/dart-core/Iterable/first.html
-> {{site.dart_api}}/{{site.data.pkg-vers.SDK.channel}}/dart-core/Iterable/first.html
which resolves to https://api.dartlang.org/stable/dart-core/Iterable/first.html or https://api.dartlang.org/dev/dart-core/Iterable/first.html