Giter VIP home page Giter VIP logo

Comments (8)

squidfunk avatar squidfunk commented on June 15, 2024 1

If you read #6704, you'll see that navigation.instant.preview predates the Markdown extension. Enabling this feature flag led to all internal links rendering previews. And no, the Markdown extension without any options should do exactly nothing, so that's an error we have to fix.

Anchor links to headers on the same page work fine for my website, so it doesn't really matter to me, but I also think if I had the option to disable that behavior I probably would.

We can check if we can add this as another option to the Markdown extension.

from mkdocs-material.

squidfunk avatar squidfunk commented on June 15, 2024

Thanks for reporting.

Ideally I'd like to enable material.extensions.preview on every page, but it looks bad when hovering over footnote links.

I strongly recommend not to do that. We'll also likely be removing the global feature flag again, as it was one of the earliest ideas of how instant previews could look, and we really should make them selective. Otherwise, too many links will get previews. We'll look into whether we can somehow "catch" instant previews adding a link to footnotes, but I recommend using our new Markdown extension. I'm curious, does this relate to #7040?

from mkdocs-material.

jonaharagon avatar jonaharagon commented on June 15, 2024

but I recommend using our new Markdown extension.

The automatic markdown extension is what I'm reporting the bug with though? Sorry if that wasn't clear. Your documentation says "you can use them on any internal link that points to a header on another page," but they are also being generated on internal links that point to footnotes, which is the whole problem.

Actually, I've otherwise been pretty happy with having them enabled globally, with the exception of a couple pages we added to sources.exclude.

from mkdocs-material.

jonaharagon avatar jonaharagon commented on June 15, 2024

Just to be perfectly clear, this report is not related to this setting (which I didn't know was a thing, but I might've been confusing with my use of the term "globally"):

theme:
  features:
    - navigation.instant.preview

from mkdocs-material.

squidfunk avatar squidfunk commented on June 15, 2024

Oops, sorry. I wasn't on my laptop and could only answer quickly, so I got stuck on:

Ideally I'd like to enable material.extensions.preview on every page, but it looks bad when hovering over footnote links.

Which I mixed up with navigation.instant.preview due to "every page" 🤦‍♂️ I agree that footnotes should definitely not be mounted, so we'll need to find a way to ensure that. I'm still not sure how to handle links to the same page. Previously, we excluded anchor links, but added them back because it was asked for, see #6704 (comment). Any thoughts?

from mkdocs-material.

jonaharagon avatar jonaharagon commented on June 15, 2024

I'm kind of confused now, because I seem to get the same behavior as navigation.instant.preview by simply enabling material.extensions.preview without any options (i.e. all internal links get previews, even without the data-preview attribute set). That is how the Markdown extension is supposed to work though right? I just don't get why both options to enable them globally exist.

Anchor links to headers on the same page work fine for my website, so it doesn't really matter to me, but I also think if I had the option to disable that behavior I probably would.

from mkdocs-material.

squidfunk avatar squidfunk commented on June 15, 2024

Fixed in 1f5fb72.

from mkdocs-material.

squidfunk avatar squidfunk commented on June 15, 2024

Released as part of 9.5.19+insiders-4.53.8.

from mkdocs-material.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.