-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Japanese search is broken after v4.0.1 #1023
Comments
Thanks for reporting and narrowing it down! Will look into it ASAP! |
There are no errors, but it simply won't work for me to use v4.0.2
And everything goes well for v4.0.1 and versions earlier. If you don't mind, you can check out my repository below. Hopefully it will reproduce the problem. |
And the search turns out to work quite well after the reinstalling. |
I’m sorry but I don’t have he time to debug individual repositories. My tests have shown that the package works exactly as intended, so the error is most likely within your setup. Could you try running it using the Docker container? |
Browser console errorsThere appears to be errors in the browser console:
In Firefox 60.0.1 64-bit:
File module.exports=require("./lunr.ja"); Not a configuration problem of pythonI ran the whole project in a docker container and the problem occurs as well. FROM python:3.7.1
WORKDIR /ckcers-tutorial
RUN git clone https://github.com/celestialphineas/ckcers-tutorial /ckcers-tutorial
RUN pip install mkdocs mkdocs-material python-markdown-math
CMD mkdocs serve
A few remarks on my repo
Here is a list of extensions I am using: extra_javascript:
- https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML
markdown_extensions:
- admonition
- codehilite
- footnotes
- meta
- toc:
permalink: true
- pymdownx.arithmatex
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.critic
- pymdownx.emoji:
emoji_generator: !!python/name:pymdownx.emoji.to_svg
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
- mdx_math Additional info
|
Thanks for your research - the error in the console is a good indicator of what's going wrong. I will look into it. |
Regarding Docker: I was asking whether you could try the official MkDocs Material Docker image, see https://hub.docker.com/r/squidfunk/mkdocs-material/ |
I can still reproduce this problem in the official MkDocs Material Docker image. DockerfileFROM squidfunk/mkdocs-material:latest
WORKDIR /ckcers-tutorial
RUN git clone https://github.com/celestialphineas/ckcers-tutorial /ckcers-tutorial
RUN pip install python-markdown-math Command lines
In Chrome
|
It is not related to
Diff of the extention configuration: markdown_extensions:
- admonition
- codehilite
- footnotes
- meta
- toc:
permalink: true
- pymdownx.arithmatex
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.critic
- pymdownx.emoji:
emoji_generator: !!python/name:pymdownx.emoji.to_svg
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
# - mdx_math |
I was able to finally reproduce the issue. A potential fix is included with commit 9a16b9c in |
I don't know if I am building the master branch correctly in a docker container. Is there an image to use? Here is my dockerfile: FROM python:2.7
WORKDIR /tmp
RUN rm -rf /tmp/*
RUN git clone https://github.com/squidfunk/mkdocs-material /tmp
RUN pip install -r /tmp/requirements.txt
RUN pip install python-markdown-math
RUN python /tmp/setup.py install
RUN git clone https://github.com/celestialphineas/ckcers-tutorial /ckcers-tutorial
WORKDIR /ckcers-tutorial
RUN rm -rf /tmp
EXPOSE 8000
CMD mkdocs serve The building process is smooth though. Command line:
And it does not build the site in the right way, with some .js scripts missing. Browser console
Terminal
|
I probably forgot to mention that you have to change from |
I'm afraid I was building mkdocs-material in an improper way. Some JS scripts are missing when running Thank you so much for the bug fix, Martin. If you find it is working alright, just draft new release and I'll check it out in the new release right away. |
Description
The Japanese/Chinese search is no longer working for mkdocs-material v4.0.2. But the behaviors are as expected for v4.0.1 and earlier versions.
I believe this unexpected behavior is related to the update of lunr-languages, or some DOM behavior changes of the search box. But I have not figured it out yet.
Expected behavior
Actual behavior
And strangely the hint is saying "Type to start searching", not "No matching document".
Steps to reproduce the bug
Package versions
Project configuration
System information
The text was updated successfully, but these errors were encountered: