Closed eseidelGoogle closed 1 week ago
Presumably this means there is an index.html under dart-async/. Could there be a thing called "index" inside of a Dart library? If so, what kind of structure would we need to put all the things into sub-directories so that they don't collide with a name called "index" ?
We might be able to teach Firebase what the "index.html" file is actually called. But, that would be a solution specific to Flutter's docs. I think assuming an "index.html" is a safe assumption, so many web servers will look for that file.
Just need to be careful here with collisions... but yeah, +1 for anything we can do for more beautiful URLs
CC @athomas
CC @kevmoo @gspencergoog would you say this is still very desirable? I have a PR out.
Re collisions, @sethladd, good catch! Most pages are suffixed with a 'kind', like Ticker-class.html, but enums (AppLifecycleState), properties (channelBuffers), functions (clampDouble), typedefs (ChannelCallback) are not suffixed, so any named index
would collide with this. With that lower-case, this would particularly be a top-level property or top-level function that could cause a collision. I should probably use new paths for those like clampDouble-function.html
, and write redirecting files.
I think this is still VERY desirable.
Yes, I agree.
Right now to actually get to a library root page you need to know dartdocs pattern of doing name-library.html: https://docs.flutter.io/flutter/dart-async/dart-async-library.html
https://docs.flutter.io/flutter/dart-async/ would just get you a 404.
Obviously we could fix this in Flutter's doc generation script as well, but seems like something maybe all dartdoc users might want?