Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instant loading doesn't work well when jumping to local .html file #1653

Closed
4 tasks done
VVsxmja opened this issue Apr 27, 2020 · 4 comments
Closed
4 tasks done

Instant loading doesn't work well when jumping to local .html file #1653

VVsxmja opened this issue Apr 27, 2020 · 4 comments
Labels
bug Issue reports a bug

Comments

@VVsxmja
Copy link

VVsxmja commented Apr 27, 2020

I checked that...

  • ... the documentation does not mention anything about my problem
  • ... the problem doesn't occur with the default MkDocs template
  • ... the problem is not in any of my customizations (CSS, JS, template)
  • ... there are no open or closed issues that are related to my problem

Description

When clicking a link to another local .html file (which is not generated by MkDocs) with instant feature on, the page won't load correctly.

Expected behavior

Instant loading should ignore that link.

Actual behavior

The page doesn't load correctly.

Steps to reproduce the bug

  1. Create a new MkDocs project.
mkdocs new test
  1. Set theme to "material" and enable "instant" feature.
theme:
  name: material
  features:
    - instant
  1. Create test.html.
<html>
    <body>
        <p>
            test
        </p>
    </body>
</html>
  1. Write a link to that page in index.md.
[test](/test.html)
  1. Run mkdocs serve and check that link.

Package versions

  • Python: 3.7.2
  • MkDocs: 1.1
  • Material: 5.1.0

Project configuration

site_name: Test

theme:
  name: material
  features:
    - instant

System information

  • OS: Windows 10
  • Browser: I've tried both Firefox and Chrome
@squidfunk
Copy link
Owner

Just a quick idea for later evaluation: when instant loading is executed and the response is received, we could check for the generator meta tag (or maybe others) and perform a full page load, if not found.

@squidfunk
Copy link
Owner

Potential fix in #1668. Note that there are currently some limitations when serving the docs locally, but it should fully work when deployed. Before merging and releasing, we need to collect some feedback.

@squidfunk squidfunk added the needs input Issue needs further input by the reporter label May 3, 2020
@squidfunk
Copy link
Owner

No feedback, so I guess I’ll just merge the stuff whenever I find some time and we see if it breaks something after releasing it.

@squidfunk squidfunk added resolved Issue is resolved, yet unreleased if open and removed needs input Issue needs further input by the reporter labels May 8, 2020
@squidfunk
Copy link
Owner

Released as part of 5.1.6

@squidfunk squidfunk removed the resolved Issue is resolved, yet unreleased if open label May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug
Projects
None yet
Development

No branches or pull requests

2 participants