Skip to content

Incorrect CSS/JS link href in projects with root site_url #6877

@Blacksmoke16

Description

@Blacksmoke16

Context

Previously discussed in #5800 (reply in thread).

Seemingly is a regression of #6437.

Bug description

When the root project of a projects plugin sets a site_url to root, e.g. http://example.com/ versus http://example.com/docs, and when the child projects setting something else, e.g. http://example.com/MyApp, then the href attribute of the generated link tags for the CSS/JS of the sub-project are incorrect. This causes them to 404 and not properly

Related links

Reproduction

bug.zip

Steps to reproduce

  1. python3 -m venv venv
  2. . venv/bin/activate
  3. pip install --upgrade --force-reinstall mkdocs-material
  4. Run mkdocs serve
  5. Try to navigate to the /MyApp page

Browser

Chrome

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions