Skip to content
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

Support mkdocs 1.0 #834

Closed
akhmerov opened this issue Aug 3, 2018 · 16 comments
Closed

Support mkdocs 1.0 #834

akhmerov opened this issue Aug 3, 2018 · 16 comments
Labels
needs help Issue needs help by other contributors needs input Issue needs further input by the reporter

Comments

@akhmerov
Copy link

akhmerov commented Aug 3, 2018

Follow-up from #831 that set the correct dependency version on v2.9.4.

Known problems:

  • Because mkdocs 1.0 changed the URL schema, paths "nest" (all URLs are relative and add up).
@squidfunk
Copy link
Owner

Thinking about it - let's do a PR, so we can directly make changes. In this PR we could set MkDocs to version 1.0 and so see directly if it builds.

@loic-sharma
Copy link

loic-sharma commented Aug 4, 2018

Ah, I setup my docs today without realizing that mkdocs v1.0 isn't supported yet. Everything seemed to work except:

  1. URLs were broken. It looks like the recommended fix is at the end of this section: https://www.mkdocs.org/about/release-notes/#template-variables-and-base_url
  2. pages is deprecated and nav was recommended instead

@squidfunk
Copy link
Owner

Yep, I think there's not much we need to do to support MkDocs 1.0, but I don't want to support multiple versions of MkDocs because it introduces breaking changes that would mean we'd need to publish multiple versions of Material which does not really work with PyPI. Once MkDocs 1.0 is out I will make the changes and we will set the minimum required version to 1.0 and drop support for 0.17.x.

@akhmerov
Copy link
Author

akhmerov commented Aug 4, 2018

Once MkDocs 1.0 is out

It's out since yesterday 😆

@squidfunk
Copy link
Owner

Haha oh man, I missed it 😅 I will try to push out a new version this weekend.

@squidfunk
Copy link
Owner

squidfunk commented Aug 4, 2018

I added basic MkDocs 1.0 support in d7a32d0.

Feel free to check out the latest master and try it out on your project. Would be great to get some feedback before we release a new major version. However, the following things need to be addressed before pushing out the next release:

  • Check, while MkDocs 1.0 cannot be installed on Travis with pip (see screenshot)
  • Evaluate, if we can use MkDocs new plugin configuration to configure the search
  • ...?

bildschirmfoto 2018-08-04 um 19 57 54

@squidfunk squidfunk added needs help Issue needs help by other contributors needs input Issue needs further input by the reporter labels Aug 4, 2018
@Ir1d
Copy link

Ir1d commented Aug 4, 2018

@squidfunk Thanks for your work. I'm writing here to report some of my recent discovery.

while MkDocs 1.0 cannot be installed on Travis with pip

I've checked the recent CI log in this repo, it's strange that mkdocs 1.0 can't be installed with pip. Actually I installed successfully with pip yesterday (which caused my CI to fail because of the new version).

Feel free to check out the latest master and try it out on your project.

check this link: OI-wiki/OI-wiki#61
two CI builds happen at the same moment, and only the first one got accepted. so I guess there's a bug inside this. (I guess that the second build fetched a newer mkdocs-material, and failed to build.)

log of the failed one: https://travis-ci.org/24OI/OI-wiki/builds/412135494
my build.sh in .travis.yml: https://github.com/24OI/OI-wiki/blob/master/build.sh

UPD: tested on my own computer and resulted the same error.
UPD2: git reset 7ef1dd08f8aff842d4ac2c5f290de649dcf2d3df --hard works well. so i guess that there is something wrong in the recent commits.

Evaluate, if we can use MkDocs new plugin configuration to configure the search

Really looking forward to this, it'll be great if the new search will be able to work well with Chinese characters, XD.

@squidfunk
Copy link
Owner

@Ir1d: thanks for reporting! The failing build uses version 0.17.3, therefore it fails because we need to make backward incompatible changes. The search should actually work with Chinese characters, there are some projects using it with the Chinese language.

@Ir1d
Copy link

Ir1d commented Aug 4, 2018

@squidfunk Thanks for informing. i forgot i was using 0.17.3. the ci has passed now and i'll test more later today.

(I'll update the comment here) As what I've checked today, the refactored search in v1.0 didn't provide much help in supporting Chinese tokenizing. A popular workaround is to modify some files in mkdocs to use nodejieba for tokenizing.

@squidfunk
Copy link
Owner

Travis fails over and over again with the error I stated above. Already tried to clear the caches, still happening. Does somebody with Python experience have an idea why this might be happening?

@Ir1d
Copy link

Ir1d commented Aug 5, 2018

@squidfunk not sure about this, but perhaps you can try pip3 ?

@facelessuser
Copy link
Contributor

Maybe upgrade pip? I had some weird issues locally installing new packages a while ago because I was on an old pip. They changed a number of things. I can maybe take a look soon.

@akhmerov
Copy link
Author

akhmerov commented Aug 5, 2018

  • mkdocs on pypi is available for python v2, so this is unlikely the root of the problem
  • looking at the warnings, it may be that pip silently fails due to the connection security problems, although I would find it surprising that it would. However running pip from Python 2.7.8 seems to indicate that it should work.
  • EDIT: I also checked that pip 9.0.1 seems to work

@squidfunk
Copy link
Owner

Well, it's the Travis pip installation. But I'll try upgrading it before installing the dependencies. It would be awesome if somebody with a Python background could try debug this and maybe make some improvements on the build. I'm really not a Python pro and find it really hard to even get a reproducible dev environment up and running (does somebody have some guidelines)?

@squidfunk
Copy link
Owner

Switching Travis to Python 3.6 seems to work fine

@squidfunk
Copy link
Owner

Just released 3.0.0 - Please see the release notes for instructions how to upgrade.

Unfortunately, pre-building the index is currently not supported as this needs some more work and I wanted to get 1.0 support out as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs help Issue needs help by other contributors needs input Issue needs further input by the reporter
Projects
None yet
Development

No branches or pull requests

5 participants