Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:32
    sechurity commented #4059
  • 05:30
    sechurity edited #4060
  • 05:29
    sechurity opened #4060
  • Jun 25 23:12
    squidfunk commented #4059
  • Jun 25 21:34
    sechurity opened #4059
  • Jun 25 21:12
    hellt commented #4058
  • Jun 25 21:12
    hellt commented #4058
  • Jun 25 20:22
    squidfunk labeled #4058
  • Jun 25 20:22
    squidfunk labeled #4058
  • Jun 25 20:22
    squidfunk unlabeled #4058
  • Jun 25 20:21
    squidfunk closed #4058
  • Jun 25 20:21
    squidfunk commented #4058
  • Jun 25 20:21

    github-actions[bot] on gh-pages

    Deployed d524af291 with MkDocs … (compare)

  • Jun 25 20:20

    squidfunk on master

    Updated Insiders changelog (compare)

  • Jun 25 20:16
    squidfunk commented #4058
  • Jun 25 19:56
    hellt commented #4058
  • Jun 25 19:46
    squidfunk commented #4058
  • Jun 25 19:45
    squidfunk labeled #4058
  • Jun 25 19:44
    squidfunk commented #4058
  • Jun 25 19:25
    hellt edited #4058
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
GL513
@gl513:matrix.org
[m]
Yes, I have.
Blueswen
@Blueswen

@Blueswen could you please create an issue providing a minimal reproducible example?

Ok , I will create an issue. BTW I also found this only happen on macOS. The char selecting is fine on Windows.

Blueswen
@Blueswen

... 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.

Yes, exactly. Before I fond the OS issue, I think using what you said may be a solution.

Martin Donath
@squidfunk
My problem is that I don't know how to type Chinese characters, which is why I'm not getting the context menu to select from (where keyup is captured). We will have to do this in tandem, if that's okay for you.
Arthri
@Arthri
1 reply
GL513
@gl513:matrix.org
[m]
Martin Donath
@squidfunk
Thanks! There was a typo in the link, fixed in the latest commit. Give it 5min until the docs are deployed.
GL513
@gl513:matrix.org
[m]
Hey, is there a way to put the git timestamp below the comments?
– or –
Blueswen
@Blueswen

My problem is that I don't know how to type Chinese characters, which is why I'm not getting the context menu to select from (where keyup is captured). We will have to do this in tandem, if that's okay for you.

It's okay. Thanks for your helping.

Jason Li
@zeshengli
Hi! I have two questions regarding customizing the header part. Is it possible to increase the icon size? And is it possible to not show the site_name that I defined in mkdocs.yml? Thanks in advance!
Martin Donath
@squidfunk
Both possible. You can change the icon size with CSS and remove the site name by customizing the template. See the customization guide.
Jason Li
@zeshengli

Thanks for your reply! I was able to hide the site_name by overriding the header.html partial. I removed the header title and kept everything else the same.
But no luck with the icon size. I have two different logo images for light mode and dark mode, so I used the setup mentioned in this discussion. And in my extra.css I just add this block:

.md-typeset .md-header__button\ md-logo img {
   height: 3rem;
}

But the icon size does not change with the number, am I missing something here?

Robin Opletal
@fourstepper:robinopletal.com
[m]
Is it possible to include, during build time, markdown from directories that is not in the docs folder?
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.