Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:15
    squidfunk commented #3053
  • 07:44
    squidfunk labeled #3053
  • 07:44
    squidfunk unlabeled #3053
  • 06:09
    squidfunk reopened #3053
  • 01:07
    albertkun commented #3053
  • 01:07
    albertkun commented #3053
  • Sep 27 08:45
    CAFxX commented #3059
  • Sep 27 08:37
    squidfunk commented #3059
  • Sep 27 08:22
    CAFxX commented #3059
  • Sep 27 08:21
    CAFxX commented #3059
  • Sep 27 08:09
    squidfunk closed #3059
  • Sep 27 08:09
    squidfunk commented #3059
  • Sep 27 07:34
    CAFxX edited #3059
  • Sep 27 07:33
    CAFxX edited #3059
  • Sep 27 07:33
    CAFxX opened #3059
  • Sep 26 18:36

    github-actions[bot] on gh-pages

    Deployed 8bbe06a with MkDocs ve… (compare)

  • Sep 26 18:35

    github-actions[bot] on gh-pages

    Deployed 8bbe06a with MkDocs ve… (compare)

  • Sep 26 18:34

    squidfunk on master

    Fixed author component in blog (compare)

  • Sep 26 15:58

    github-actions[bot] on gh-pages

    Deployed 4668b79 with MkDocs ve… (compare)

  • Sep 26 15:57

    squidfunk on master

    Updated social card description (compare)

Martin Donath
@squidfunk
3 replies
Alex Woo
@alexwoo1900
Can someone tell me whether annotation supports XML format block? JS code works well but XML failed.
Martin Donath
@squidfunk
Bildschirmfoto 2021-09-27 um 11.31.26.png
Just tested it - works as expected
``` xml
<?xml version="1.0" encoding="UTF-8" ?>
<class_list>
   <student>
      <name>Tanmay</name> <!-- (1) -->
      <grade>A</grade>
   </student>
</class_list>
```

1. Test
Alex Woo
@alexwoo1900
Thanks, I found the key. Annotation failed if I wrote the comment code inside the tag.
Like <name><!-- (1) -->Tanmay</name>
Alex Woo
@alexwoo1900
In fact, I want to make some explanations for my XML tag attributes.
Alex Woo
@alexwoo1900
All is well now, thanks
Martin Donath
@squidfunk
Bildschirmfoto 2021-09-27 um 12.56.51.png
Annotations do work inside tags
They work everywhere a comment can be placed
Vijay kumar kaushik
@vijaykkaushik
while running mkdocs serve, getting, TypeError: unhashable type: 'dict' this error. Can anyone suggest why it might be happening.
Martin Donath
@squidfunk
Could be related to customizations you have in-place that need to be updated. Did you upgrade?
If so, try to remove your customizations and work step-by-step from there.
Otherwise, it might be a misconfiguration in mkdocs.yml.
Vijay kumar kaushik
@vijaykkaushik
No upgradation done, can you please give some reference for upgrading
Martin Donath
@squidfunk
Vijay kumar kaushik
@vijaykkaushik

Ok Thanks @squidfunk . Can you once tell one more thing
theme:
name: "material"
logo:
icon: "stars"

In this configuration do i need to change something, as after removing this logo key. That unhashable type error gets removed but still something went wrong.

Martin Donath
@squidfunk
remove the logo.
logo can't stand without child entries.
Ah wait, you are using the old syntax. If you want to set an icon for the logo, use icon.logo: https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/#configuration
Vijay kumar kaushik
@vijaykkaushik
@squidfunk Thank you so much, It helped alot
bradumbaugh
@bradumbaugh_twitter
Screen Shot 2021-09-27 at 8.45.07 AM.png
Been loving all exciting new search features. Really cool. Question, though — was playing around with them last night... installed Insiders using pip, ran mkdocs new, and then here's how search results appear (above)
It looks to me like the first result contains the entire doc (saw this in other examples I tried, too) — is this intended?
(this is 7.3.0+insiders.3.1.1)
bradumbaugh
@bradumbaugh_twitter
Seems to be fixed by downgrading (uninstalled, and then tried to install @7.3.0-insiders-3.1.0... which seems to install mkdocs-material 7.3.0+insiders.3.0.1)
Martin Donath
@squidfunk
Thanks! 3.1.0 is correct, I just forgot to bump the version in the package, stupid me.
The problem is likely related to #3053.
The current most likely explanation are stale caches, i.e., an invalid search_index.json file.
Martin Donath
@squidfunk
I've just verified this again:
$ virtualenv venv
$ . ./venv/bin/activate
$ pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
$ mkdocs new . # then add theme.name: material to mkdocs.yml
$ mkdocs serve
screenshot-localhost-8000-1632759787804.png
If you can provide a reproducible example, I'm happy to fix this once and for all, but until then the most likely explanation is stale caches.
bradumbaugh
@bradumbaugh_twitter
Ah, I'd missed #3053, apologies for the redundancy here. I literally just installed MkDocs Material Insiders, created a new MkDocs site with material as the theme name in config file, and then did an mkdocs serve, and that's where I saw it.
Martin Donath
@squidfunk
That's very weird. Did you use a virtualenv?
And how did you install Insiders? With pip?
bradumbaugh
@bradumbaugh_twitter
I did not use a virtualenv, can give that a whirl. Yes, installed with pip.
Martin Donath
@squidfunk
Okay, give the virtualenv a try, if it works, then we can look into why it doesn't work without.
bradumbaugh
@bradumbaugh_twitter
Yeah, sounds good! Will report back.
Martin Donath
@squidfunk
I've now tested it outside of the virtual environment and it also works
$ pip3 show mkdocs-material

Name: mkdocs-material
Version: 7.3.0+insiders.3.1.1
Summary: A Material Design theme for MkDocs
Home-page: https://squidfunk.github.io/mkdocs-material/
Author: Martin Donath
Author-email: martin.donath@squidfunk.com
License: MIT
Location: /usr/local/lib/python3.9/site-packages
Requires: pillow, cairosvg, requests, mkdocs-material-extensions, pymdown-extensions, cssutils, mkdocs, markdown, pygments
Required-by:
Which OS are you using?
bradumbaugh
@bradumbaugh_twitter
macOS 11.6
Martin Donath
@squidfunk
I'm also on macOS
bradumbaugh
@bradumbaugh_twitter
Checked on another computer, seems to work with virtualenv and without. Hm.
Martin Donath
@squidfunk
It's actually an easy fix in MkDocs core, so I'm hoping for some constructive discussion.
bradumbaugh
@bradumbaugh_twitter
Awesome, thank you! Will try the workaround.