Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:07
    squidfunk labeled #2586
  • 13:07
    squidfunk unlabeled #2586
  • 13:07
    squidfunk commented #2586
  • 12:37
    nzhangac commented #2586
  • 11:08
    squidfunk labeled #2586
  • 11:08
    squidfunk commented #2586
  • 08:57
    timvink commented #2579
  • 08:56
    timvink synchronize #2579
  • Apr 21 09:52
    squidfunk closed #2588
  • Apr 21 09:52
    squidfunk commented #2588
  • Apr 21 09:52
    squidfunk closed #2587
  • Apr 21 09:52
    squidfunk commented #2587
  • Apr 21 09:52

    github-actions[bot] on gh-pages

    Deployed 9296dc3 with MkDocs ve… (compare)

  • Apr 21 09:48

    github-actions[bot] on gh-pages

    Deployed 9296dc3 with MkDocs ve… (compare)

  • Apr 21 09:47

    squidfunk on master

    Added distribution files (compare)

  • Apr 21 08:21
    CarGod opened #2588
  • Apr 21 07:54
    codexetreme commented #2587
  • Apr 21 07:47
    dsuch opened #2587
  • Apr 21 07:39

    github-actions[bot] on gh-pages

    Deployed aea41d2 with MkDocs ve… (compare)

  • Apr 21 07:37

    squidfunk on master

    Improved style of footnote refe… (compare)

Martin Donath
@squidfunk
The indentation doesn't seem to be correct. Make sure it's indented exactly as listed in the documentation, e.g. alternate must be indented by two spaces, etc.
Quinton Woodmansee
@qwoodmansee
Hey! I just became a sponsor - thanks for your great work on the Theme. is there a way to easily apply an ovverride when using the install via git instructions at https://squidfunk.github.io/mkdocs-material/getting-started/#with-git ?
I could go in and modify the generated .html within the clone i'm working with, but wondered if there was a better way more akin to the custom_dir in the free tier
Martin Donath
@squidfunk
Thanks for sponsoring! As noted in the customization guide it's not easily possible to apply overrides when cloning from git.
Quinton Woodmansee
@qwoodmansee
thanks for the quick answer! much appreciated :)
Mikey O'Toole
@MikeyMJCO_gitlab
Has anyone experimented with embedding H5P content into MKDocs / MKDocs material sites?
Martin B
@martinbira
Perhaps an easy question:
For brand new pages, I'd like to append a class to the H1 using attribute lists that will place an SVG after the title. That works like a charm: { .new-page }
However, that seems to break the toc-hack in the toc.html-partial and the page title is the first item in the page ToC. Is it possible to check for a class with the template engine? I assume it's this line that should be appended:
{% if toc | first is defined and "\x3ch1 id=" in page.content %}
Martin Donath
@squidfunk
Ah, interesting. The TOC title hack assumes that the id is the first attribute, so I guess the class is inserted before? I'm happy in improving resilience on that front, and am quite surprised it didn't come up until now.
Martin B
@martinbira
Found a workaround: add an additional ifstatement in toc.html
  {% if toc | first is defined and "\x3ch1 class=" in page.content %}
    {% set toc = (toc | first).children %}
  {% endif %}
Just appending the first if with | first is defined and "\x3ch1 class=" in page.contentdid not play well :)
There is perhaps a nicer solution but it works :D
And yes, it does look like that the class is inserted before in the inspector
Robin ForGood
@robinforgood_gitlab

The indentation doesn't seem to be correct. Make sure it's indented exactly as listed in the documentation, e.g. alternate must be indented by two spaces, etc.

I have reviewed the indentation but doesn't work. Have there any project example with language selector?

Martin Donath
@squidfunk
@martinbira could you create an issue for that? I'd like to revisit this when I find some time
Martin B
@martinbira
Sure thing!
Martin Donath
@squidfunk
@robinforgood_gitlab if you copy it from the docs, it works as expected. I just checked.
You can check the FastAPI docs, the use the language selector.
Robin ForGood
@robinforgood_gitlab
Hi, thanks for your quickly response! I have been tried so hard but I can't see the option "Site language selector" and the toggle to switch to dark mode. I have upload a test project in gitlab: https://gitlab.com/robinforgood/test-docs
And it is accesible here: https://robinforgood.gitlab.io/test-docs/
Thanks for your attention, it's an awesome project :)
Robin ForGood
@robinforgood_gitlab
Okey, if I clone the repo, I can see the option of "Site language selector", but if I use pip, I can't see it the options of translation and darkmode
Martin Donath
@squidfunk
It's likely related to indentation or formatting errors in mkdocs.yml.
Robin ForGood
@robinforgood_gitlab
Which type of installation do you recommend?
Martin Donath
@squidfunk
Mikey O'Toole
@MikeyMJCO_gitlab
Anyone got an example of linting/preview/test building MkDocs books with GitLab CI (or really any CI!)
Robin ForGood
@robinforgood_gitlab

It's likely related to indentation or formatting errors in mkdocs.yml.

The same project with docker works as expected but with pip it's wrong.

Martin Donath
@squidfunk
Make sure that you're installing into the correct location. The site language selector was added in 7.1.0, so maybe you're mixing up install locations. It's best to use a virtual environment to be sure.
See the troubleshooting section for a short tutorial on virtual environments
Benjamin Staneck
@Stanzilla
@squidfunk did your dependabot die or did you move it to a different day?
Martin Donath
@squidfunk
I've changed nothing
But I haven't received any updates on any repository today
Benjamin Staneck
@Stanzilla
@squidfunk maybe they finally shut down the old version? I noticed that you don't have a config file in your repo which is what the new one uses
merging dependencies has become my monday morning routine :D
Benjamin Staneck
@Stanzilla
@squidfunk your experimental thing for navigation positioning is not hooked up to anything yet, right?
Martin Donath
@squidfunk
No, I'm using the external integration on all of my projects because GitHub's integration doesn't work reliably with my private repositories. Maybe we can switch to GitHubs integration for Material for MkDocs.
The external dependabot integration will also create PRs for npm packages in GitHub's private package registry. GitHub's integration won't. Maybe they fixed it by now but this was the problem some months ago why I decided to go with the external integration for now.
The experimental navigation positioning doesn't need configuration. For now, it should just work. I'm still thinking whether I'll put that behind a flag or not, but I think I'll decide when I'm tackling navigation state preserving (i.e. keep dropdowns open when switching sites)
It's already working on the Insiders docs.
At least in the browsers I tested. If not, please create an issue 😃
Benjamin Staneck
@Stanzilla
okay what should it do exactly?
Martin Donath
@squidfunk
Position the active entry in the sidebar so that its visible. See the video in the issue for a demo
the OP described the problem pretty well
Benjamin Staneck
@Stanzilla
oh it actually is that, nvm then. I was confused
love it, thank you!
Robin ForGood
@robinforgood_gitlab
Hi, I've created a mkdocs material template with pdf conversion through pandoc and Eisvogel LaTeX template.
Accesible on: https://docs.gsi.upm.es/docs/mkdocs-material/
Repo: https://lab.gsi.upm.es/docs/mkdocs-material/
Pdf generated example: https://lab.gsi.upm.es/docs/mkdocs-material/-/blob/main/pdfs-examples/eisvogel_template.pdf
Robin ForGood
@robinforgood_gitlab

But I still have problems with multilanguage. Now I can see the button and it goes to /es/index.md, but I can't see nav translated. Then, I think that I don't know how it is the correct structure of files or if it is neccesary a new mkdocs.yml in docs/es/mkdocs.yaml. Anyone has any idea?

My mkdocs.yml is:

extra:
  alternate:
  - link: /docs/mkdocs-material/
    name: en - English
    lang: en
  - link: /docs/mkdocs-material/es/
    name: es - español
    lang: es

My folder structure is:

docs/en/index.md/
    /en/example.md
    /es/index.md
    /es/example.md
    /es/mkdocs.yml
mkdocs.yml
Martin Donath
@squidfunk
Robin ForGood
@robinforgood_gitlab
Thanks so much! :)
Lars Wilhelmer
@wilhelmer
@squidfunk Did you notice that lunr 0.6.0 has been released, with yeraydiazdiaz/lunr.py#75?
May be useful to optimize search