Skip to content

Page styles and links broken on angular_components StepDirective page #1721

Open
@chalin

Description

@chalin

The Problem

Visiting https://pub.dartlang.org/documentation/angular_components/0.9.0-beta/material_stepper_material_step/StepDirective results in an unstyled page:
screen shot 2018-07-04 at 11 22 35

The problem is that the page contains <base href="../.."> but the style files are at ...

Why its happening

The cause of the problem is that StepDirective has a field named index, and so the API doc page for this field is index.html. A get request for

One might argue that we shouldn't be attempting to access https://pub.dartlang.org/documentation/angular_components/0.9.0-beta/material_stepper_material_step/StepDirective, but it isn't that simple as I explain next.

API docs on webdev.dartlang.org

For a server configured to support clean URLs w/o trailing slashes, a request for

Solution ideas

A possible solution might be to have a dartdoc option in support of doc servers configured with clean URLs and no trailing slashes. This option would ensure that the base href for API pages named index.html gets set to .. rather than ../...

Another option might be to set the base href dynamically, but that might get tricky.

Note that in the meantime I've been manually patching the generated API docs, setting the base href to a proper value.

cc @kwalrath @kevmoo @nshahan

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work oncustomer-google3Issues originating from or important to Angulartype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions