Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 07:55
    squidfunk labeled #4421
  • 07:39
    hellt opened #4421
  • 05:41
    squidfunk labeled #4420
  • 05:41
    squidfunk commented #4420
  • 05:34
    squidfunk commented #4392
  • Sep 27 18:21
    HonkingGoose opened #4420
  • Sep 27 16:29

    github-actions[bot] on gh-pages

    Deployed 290de4acc with MkDocs … (compare)

  • Sep 27 16:23

    github-actions[bot] on gh-pages

    Deployed 290de4acc with MkDocs … (compare)

  • Sep 27 16:22

    squidfunk on master

    Fixed jumping chevrons in sideb… (compare)

  • Sep 27 15:19
    squidfunk labeled #4419
  • Sep 27 15:17
    squidfunk closed #4419
  • Sep 27 15:17
    squidfunk commented #4419
  • Sep 27 14:18
    squidfunk labeled #4419
  • Sep 27 14:18
    squidfunk commented #4419
  • Sep 27 14:04

    github-actions[bot] on gh-pages

    Deployed 978eab02f with MkDocs … (compare)

  • Sep 27 14:02

    squidfunk on master

    Added SealVault to premium spon… (compare)

  • Sep 27 14:00

    github-actions[bot] on gh-pages

    Deployed 8202d13c2 with MkDocs … (compare)

  • Sep 27 13:58

    squidfunk on master

    Documentation (compare)

  • Sep 27 13:58
    skwde opened #4419
  • Sep 27 13:48
    squidfunk commented #4396
Martin Donath
@squidfunk
Jup, by using Snippets
Jason Li
@zeshengli
What would be your recommended way of having an interactive component for pip installation instruction like the one here for spaCy? We were using MDX and including a react component before but it's not supported as discussed here Thanks!
Martin Donath
@squidfunk
Well, you can add your component as HTML to Markdown, and then provide extra JavaScript to mount the component. I'm doing the same in the documentation with the Insiders sponsorship overview.
Note that this is not based on React or some other SPA framework since we're doing progressive enhancement. The whole workflow is based on RxJS, which is a great fit for enhancing static sites.
Thus, write your component as plain JavaScript and then mount it with RxJS. You can easily hook into instant loading and Material for MkDocs features.
I might write a blog article explaining how to mount custom stuff in the future.
Jason Li
@zeshengli
Really appreciate the detailed explanation!
Martin Donath
@squidfunk
8.3.0 is out, including the features from the funding goal we just reached! Many thanks to all sponsors for making this possible and allowing me to work on this project! ❤️
Arthri
@Arthri
where can I add a license for the wiki? is there somewhere I can place a CC button?
Arthri
@Arthri
2022.06.03 13.00.02.462.png
on an unrelated note, I found a small search bug where content tabs display like this in search
C and C++ become CC++
Martin Donath
@squidfunk
@Arthri I'm not sure what you mean by Wiki, but you can place a button anywhere in a Markdown file. For other locations on the page you'd need to extent the theme.
Arthri
@Arthri
I see, thanks
Some wikis(especially MediaWiki) https://www.mediawiki.org/wiki/MediaWiki have a notice they're under a CC license, and they're usually at the bottom of every page. Is there a equivalent for MkDocs/Material?
Arthri
@Arthri
thanks again
Timo Toups
@lampensau
love the new anchor links :heart_eyes:
Martin Donath
@squidfunk
Hehe, thanks! I also think they turned out pretty great
Blueswen
@Blueswen
@squidfunk , the Chinese searching bug fixed in squidfunk/mkdocs-material-insiders@95aea95 is really awesome. I think this could also help those language need composition like Japanese. Thanks again.
Martin Donath
@squidfunk
Perfect, glad to hear! As we intercept the composition(start|end) events, it should be fixed for Japanese and all languages using composition as well.
Blueswen
@Blueswen
@squidfunk I also found another Chinese searching highlighting bug. If target query string is behind other Chinese text, searching highlighting mark does not show up. I think it's because match expression in highlighter/index.ts can not deal with this scenario. I am not good at regex, but I found it could solved by adding another | in first group of expression (replace (^|${config.separator}|\\b) with (^|${config.separator}|\\b|)). Though it seems to work, I am not sure that could cause any side effect or not. Maybe you can fix this with a better way ?
image.png
With query parameter h=公司, but searching highlighting is not working
image.png
With query parameter h=公司 then modify match expression first group to (^|${config.separator}|\\b|), and searching highlighting is working fine.
Blueswen
@Blueswen
Should I open an issue to discuss this bug?
Martin Donath
@squidfunk
I guess it's related to word boundaries. Yes, you can open an issue. I'll wanted to revisit search highlighting at some point anyway, but this might take longer because my next weeks are pretty packed.
In essence, search highlighting should be based on the tokens we have in the index anyways, but it's currently still implemented as a regex.
Blueswen
@Blueswen
I guess it's related to word boundaries. Yes, you can open an issue. I'll wanted to revisit search highlighting at some point anyway, but this might take longer because my next weeks are pretty packed.
It's not a big problem, take your time. Thanks for your hard work these days.

In essence, search highlighting should be based on the tokens we have in the index anyways, but it's currently still implemented as a regex.

I think maybe regex is the only way to implement search highlighting. Because it's hard to map those tokens back to their original string position in Chinese.

Jordan Halterman
@kuujo
Hi. I’m having trouble enabling. Avigayio
Ugh… I’m having trouble enabling navigation tabs. Here’s an example MkDocs configuration that’s showing the problem: https://github.com/atomix/docs/blob/master/mkdocs.yml#L40 I can see that the search features are enabled, so it’s not a syntax error. But for some reason I cannot see any tabs on top of the page when navigation.tabs is enabled. What am I missing?
Martin Donath
@squidfunk
I'm not sure what you're doing with the !import statement in nav. In general, navigation tabs are the first level of nesting, see https://github.com/squidfunk/mkdocs-material/blob/08f38332448fa954a44c0bf42e2e3f423d865912/mkdocs.yml#L164-L228, i.e. Home, Getting started, Setup, Reference, Insiders and Blog
If you define your nav structure this way, navigation tabs should work as advertised.
Jordan Halterman
@kuujo
@squidfunk that’s just syntax supported by the multirepo pkygin
But FTR I have tried it with various nested “nav” structures of various depths and disabled the multirepo plugin, and nothing has worked.
Martin Donath
@squidfunk
That is very weird. Navigation tabs have been there for so long, it's very likely a config error, but I'm not seeing it either. If you can provide a minimal reproducible example, please open an issue so I can look into it.
bradumbaugh
@bradumbaugh_twitter
Martin, just FYI — I don’t see those new date icons you mentioned on Twitter yesterday. Not a big deal obviously… just went to admire your handiwork, and it looks like maybe they didn’t get deployed?
Martin Donath
@squidfunk
@bradumbaugh_twitter thanks for noting! They're only added to the 3-4 latest Insiders features, e.g. https://squidfunk.github.io/mkdocs-material/reference/tooltips/#improved-tooltips
It's just to bring the reader's attention to "this is brand new"
Jordan Halterman
@kuujo
@squidfunk I think it was something with my machine. After I updated updated Mac OS, it worker exactly as expected. I suspect it just needed that restart to reset the environment or something.
I guess if someone sees this again, you might suggest they do something similar.
For reference, I had just installed Python/pip with Homebrew and used it to install MkDocs and the Material theme. 🤷‍♂️