Skip to content

Issue with swup and javascript #2081

Closed
Closed
@garazdawi

Description

@garazdawi

In order to create links from the sidebar to other application I generate markdown files that look like this:

# compiler

<script>window.location.replace("../lib/compiler/doc/html/index.html");</script>

This no longer works as swup does not execute the javascript. I tried using the new exdoc:loaded:

# compiler

<script>window.addEventListener("exdoc:loaded", () => { window.location.replace("../lib/compiler/doc/html/index.html"); });</script>

and while that works, the event is triggered rather late so that you can see the rendered page flicker by before the redirect happens.

Any suggestions on what I should do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions