Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 27 15:29

    github-actions[bot] on gh-pages

    Deployed 7d578d82d with MkDocs … (compare)

  • Jun 27 15:27

    squidfunk on master

    Updated zh-TW translations (#40… (compare)

  • Jun 27 15:27
    squidfunk closed #4071
  • Jun 27 15:27
    squidfunk commented #4071
  • Jun 27 12:54
    ofek commented #4063
  • Jun 27 10:17
    squidfunk commented #4070
  • Jun 27 10:16
    squidfunk labeled #4070
  • Jun 27 10:16
    squidfunk closed #4070
  • Jun 27 10:16
    squidfunk commented #4070
  • Jun 27 10:14
    squidfunk commented #4069
  • Jun 27 10:08
    blueswen opened #4071
  • Jun 27 09:57
    Changccs commented #4069
  • Jun 27 09:53
    ashlymat opened #4070
  • Jun 27 09:34
    huangyinhaow commented #4068
  • Jun 27 09:33
    huangyinhaow commented #4068
  • Jun 27 09:32
    huangyinhaow commented #4068
  • Jun 27 09:31
    huangyinhaow commented #4068
  • Jun 27 09:31
    huangyinhaow commented #4068
  • Jun 27 09:29
    huangyinhaow commented #4068
  • Jun 27 09:28
    huangyinhaow commented #4068
GL513
@gl513:matrix.org
[m]
I cloned the repository and set it up as a local site hosted with mkdocs serve, but I noticed, it's in the older style. Does this mean the actual documentation is outdated too?
Martin Donath
@squidfunk
What do you mean by "older style"?
3 replies
GL513
@gl513:matrix.org
[m]
Okay, thanks :)
alkisg
@alkis:matrix.org
[m]
Is it possible to omit the TOC (at the right side) for a specific page?
1 reply
GL513
@gl513:matrix.org
[m]
wait no, you said right side.
what about removing the classes for it?
No, I was right the first time.
alkisg
@alkis:matrix.org
[m]
Indeed the link you provided covers it. Thank you very much
mondle
@mondle:matrix.org
[m]
When making a table with a right aligned field, the alignment goes to the sort button instead of the field text
It looks weird because that sort icon only appears on hovering
Sidenote, it would be nice to turn on and off sortable per table
4 replies
Oleg Polakow
@polakowo
Hello, I'm getting high CPU usage of any page published with Mkdocs Material (Insiders). For example, if you go to your page https://squidfunk.github.io/mkdocs-material/publishing-your-site/ and this tab remains active, the CPU usage jumps to 40-50% and stays the same even without scrolling or any activity on the page. I tried analyzing the performance on both Safari and Chrome and the issue is coming from constant "recalculating style". Any ideas how to mitigate the issue? It becomes worse the longer the page is.
Martin Donath
@squidfunk
Interesting. However, I'm not seeing this problem:
Bildschirmfoto 2022-05-24 um 13.04.50.png
The style recalculations might come from the animation of the code annotations
Bildschirmfoto 2022-05-24 um 13.05.37.png
If you can narrow it down, I'm happy to look into it. We need a reproducible example that shows the issue clearly.
One thing you could try: try setting prefers-reduced-motion: reduce via the Chrome dev tools and see whether the issue persists. If it goes away, it's very likely related to animations.
Oleg Polakow
@polakowo
Screen Shot 2022-05-24 at 13.06.06.png
Hmm seems to be indeed coming from annotations. Here's the timeline on Safari for the same page (see above)
Screen Shot 2022-05-24 at 13.08.56.png
License page (https://squidfunk.github.io/mkdocs-material/license/) doesn't have this problem, as there are no annotations apparently
mondle
@mondle:matrix.org
[m]
Did find a couple examples (not material design) where the sort button is visible all the time which makes it look less strange
But your thinking of putting it on the left is probably better
Oleg Polakow
@polakowo
As you suggested, prefers-reduced-motion helps. I'll probably remove the following lines since my documentation has just too many annotations.
-webkit-animation: pulse 2s infinite;
animation: pulse 2s infinite;
Martin Donath
@squidfunk
@polakowo please create a new issue, we can only enable animations when annotations are visible using IntersectionObserver.
This is actually a reasonable feature request
Blueswen
@Blueswen
I got a Chinese typing issue when using the Chinese search feature with insider version. Selecting Chinese words with down arrow key will trigger the default down arrow key to move the focus to search results and insert same words again in input for unknown reason.
Blueswen
@Blueswen
The google-search.mov demos how the selecting words works. The mkdocs-search.mov shows the selecting bug when search with "中文"(with result), and when search with "測試"(without result) everything is fine.
Blueswen
@Blueswen
Maybe we can change the keyup event in search/query/index.ts with CompositionEvent to fix the selecting bug?
Martin Donath
@squidfunk
@Blueswen could you please create an issue providing a minimal reproducible example?
I've actually never heared about CompositionEvent – let's discuss in an issue 😊
Martin Donath
@squidfunk
... so to understand: we must essentially filter keyup events when there's a composition going on, right? So when compositionstart starts, we filter keyup until compositionend occurs.
GL513
@gl513:matrix.org
[m]
Hello, I have another question.
I wanted to add Giscus in a github repo, and enable it only on certain pages, but the guide doesn't make it entirely clear how one is supposed to do that. Can I get some pointers?
I can enable it universally, no problem, but there seems to be a disconnect.
I have a file in my overrides called "giscuschat.html", but when I put this in my .md files, it says this
jinja2.exceptions.TemplateNotFound: giscuschat.html
Martin Donath
@squidfunk
Use a specific template for that.
The documentation explains this as part of the "adding a comment system guide":
You can either integrate Giscus on every page by overriding the main.html template, or create a new template (e.g. blog.html) to extend from main.html which includes the comment system, so you can decide for each page whether you want to allow comments or not.
Thus, create a new template, extend from main.html, and just follow the steps in the guide.
4 replies
You can then opt-in a page into Giscus by setting the page template
GL513
@gl513:matrix.org
[m]
I did make a github issue for admonitions, you may have seen a bit of activity because I was trying to get the code block to work, but it doesn't want to no matter what 😅
Martin Donath
@squidfunk
The admonition issue is a non-issue, you're using the wrong syntax.
If you stick to the documentation, you should be fine.
GL513
@gl513:matrix.org
[m]
Ah, so I created a trash issue, sorry
Martin Donath
@squidfunk
If you're using undocumented behavior, i.e., something that is not contained in our documentation, you're in unchartered territory.
No worries. If you find something that doesn't work as intended the next time you might first create a discussion or ask here, as you don't need to go through the formal process of creating an issue, saving both, you and me, time.
GL513
@gl513:matrix.org
[m]
yeah, thanks