Coder Social home page Coder Social logo

Comments (7)

squidfunk avatar squidfunk commented on May 17, 2024

Thank you for the notice, I will investigate.

from mkdocs-material.

squidfunk avatar squidfunk commented on May 17, 2024

I cannot reproduce this issue. What I tried:

mkdocs new test
cd test
git clone [email protected]:squidfunk/mkdocs-material.git
echo "theme_dir: mkdocs-material/material" >> mkdocs.yml
mkdocs serve

Then go to localhost:8000 and everything's working fine, no error in the console. I even tried checking out the latest release 0.2.4, but also, no error. Can you elaborate on what you did exactly?

from mkdocs-material.

markallasread avatar markallasread commented on May 17, 2024

I see what the issue is now — sort of, here's what I was doing:

git clone [email protected]:squidfunk/mkdocs-material.git
cd mkdocs-material
mkdocs serve

Everything would work aside from search.

I just assumed that was appropriate because a) the mkdocs.yml in that folder references 'material', a folder within the cloned repo.

Cloning it into a subfolder like you've got setup sorts it outright.
Solved.

from mkdocs-material.

squidfunk avatar squidfunk commented on May 17, 2024

Could you please give some more details on the browser and operating system you are using when you encountered the error, because the thing you did should work as well. Thank you!

from mkdocs-material.

markallasread avatar markallasread commented on May 17, 2024

Macosx (latest non-beta). Chrome. Safari, all browsers — same issue.
I am making one modification to a core file — that is, nav.html — and rebuilding the theme using the commands you've provided. Doing my mod. with the pip version works fine, just not the cloned version.

The npm process does output a few warnings which look like the culprit:

npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

It really does look like whatever's going wrong is during the gulp build --production process (minification failure?) — I copied the application.js over from the pip installed variant & it's good to go.

For ref — obv. the application.js file name will differ lightly, but my fix for now:

cp /usr/local/lib/python3.5/site-packages/material/assets/javascripts/application.js application-85b9f474c2.js

from mkdocs-material.

squidfunk avatar squidfunk commented on May 17, 2024

The npm warnings should be no problem, they are generated by the dependencies of the packages the theme is using. However, I can now finally reproduce the error! It originates in the pegasus library which is used to load the search JSON file:

1095: pegasus.timeout && xhr.timeout = pegasus.timeout;

This change was introduced in 0.3.4. I pinned the version to 0.3.3, as this change was introduced in 0.3.4. With Material 1.0.0 there will be no need for pegasus, so as a temporary fix this should be okay.

Thank you for your cooperation!

from mkdocs-material.

markallasread avatar markallasread commented on May 17, 2024

Most excellent! Thanks for your persistence & all your effort with the project — <3

from mkdocs-material.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.