1596 Commits

Author SHA1 Message Date
Oleh Prypin
6c1eb589f4 Release 1.2.4 (#2805) 1.2.4 2022-03-26 20:33:54 +01:00
Oleh Prypin
2d642b3863 Compatibility with Jinja2 3.1.0 (#2800) 2022-03-26 20:28:46 +01:00
Oleh Prypin
d167eab473 Release 1.2.3 (#2614) 1.2.3 2021-10-12 23:27:41 +02:00
Oleh Prypin
5629b09f1a Re-format translation files to pass a lint check (#2621)
Apparently the file 'mkdocs/themes/readthedocs/locales/pt_BR/LC_MESSAGES/messages.po' was just copied from '/mkdocs/' theme, making the translation incomplete, and the reformat just tries its best to pick up the pieces.
2021-10-12 23:17:52 +02:00
Oleh Prypin
2c4679b00a Re-format translation files to pass a lint check (#2620) 2021-10-12 22:52:24 +02:00
Oleh Prypin
9262cc576d Fix the code to abbreviate Python's version (#2618)
This breaks for Python >= 3.10

Co-authored-by: Álvaro Mondéjar Rubio <mondejar1994@gmail.com>
2021-10-12 22:29:07 +02:00
Álvaro Mondéjar
8345850060 Add hint about -f/--config-file in configuration documentation (#2616) 2021-10-12 22:10:48 +02:00
Andre Piantino
815af480d6 Added translation for Brazilian Portuguese (#2535)
* Added pt message translation file

* added  pt translations

* adjust pt_BR translation

* Added pt message translation file

* added  pt translations

* adjust pt_BR translation

* adjust to underscores

* Added pt message translation file

* added  pt translations

* adjust pt_BR translation

* Added pt message translation file

* added  pt translations

* adjust pt_BR translation

* adjust to underscores

Co-authored-by: nibuitoni <nicole.buitoni@rdstation.com>
2021-10-11 21:51:49 +02:00
Oleh Prypin
6563439956 Update contact instructions: announce chat, preference for issues (#2610)
* Update contact instructions: announce chat, preference for issues

* Fix mistake in sentence
2021-10-11 21:48:47 +02:00
Oleh Prypin
6b72eef748 We can again announce support of zh_CN locale (#2609)
This reverts commit 1c72c12472.
2021-10-11 19:20:27 +02:00
Álvaro Mondéjar
b18ae29659 Drop assert_mock_called_once compat method from tests (#2611)
Not needed for Python >= 3.6
2021-10-11 19:19:09 +02:00
Oleh Prypin
7a27572d0e Isolate strict warning counter to just the ongoing build (#2607)
Refactor to eliminate global state.
Fixes the issue with the webserver's warnings being able to abort the build.
2021-10-11 19:17:14 +02:00
Oleh Prypin
57540911a0 Prevent directory traversal in the dev server (#2604) 2021-10-11 19:16:05 +02:00
Oleh Prypin
ba83f90298 Depend on 'colorama' on Windows to fix color output in terminal (#2606)
Adding the explicit dependency, because

1. 'click' prior to v8.0 did not have this dependency, it was used "only if present"
2. We *are* importing it, let's declare it as such
2021-10-11 19:15:34 +02:00
Oleh Prypin
e579117efe Reduce the range of directories checked by codespell (#2608)
The main goal was to exclude translations, because obviously they're not in English.
But this also starts with an allowlist on top-level directories because locally myself I had a few false positives such as '.git', 'node_modules'.
2021-10-11 17:37:15 +02:00
ChrisLasar
17a48105e1 Fix theme related links in first box on starting page (#2603) 2021-10-10 11:09:44 +02:00
Ultrabug
c426455878 search plugin: do not crash on missing lang options, inform instead (#2602)
* search plugin: do not crash on missing lang options, inform instead

- fallback to english on missing search.lang option
- support search.lang territory pt_BR -> pt
2021-10-10 09:44:08 +02:00
Ultrabug
0937f7df51 fix translation installation for locales with script name (#2565)
when a locale like zh_CN is parsed by babel.core.Locale, the
result Locale is zh_Hans_CN which is then used to find out if
translations exist for this locale name

the Hans part is the guessed script name part of the babel Locale
but is almost never contributed as translation locale name so
we have to make sure what we look for the language + territory
locale name instead of the fully parsed name from babel
2021-10-08 16:45:24 +02:00
Martin Donath
4ea78da2e9 Allow third-party plugins to override core plugins (#2591)
* Allow third-party plugins to override core plugins

* Improve resilience of check for core plugin
2021-10-07 09:57:14 +02:00
Oleh Prypin
1779c181a3 Delete IP validation test that fails on some versions of Python (#2587) 2021-09-28 08:02:27 +02:00
Jules Topart
0d8fc8b922 user guide: correct word repetition (#2567) 2021-09-10 18:08:02 +02:00
Ultrabug
ba7f63ac81 dev guide: remove misleading usage of 'entry_point' wording (#2563)
closes mkdocs/mkdocs#2558 thx to @hwittenborn
2021-09-08 08:48:47 +02:00
Goto Hayato
519d2d32c3 Add Japanese (ja) translation for built-in themes (#2525) 2021-09-07 22:30:18 +02:00
Álvaro Mondéjar
1dc66b76b4 Add __repr__ method to File class (#2550) 2021-08-30 14:32:54 +02:00
Álvaro Mondéjar
c93c05341d Add codespell step to CI lint workflow (#2551) 2021-08-23 19:50:25 +02:00
Kuba Andrýsek
98b1d0e991 Fix Jinja Environment link (#2552) 2021-08-23 18:25:22 +02:00
Álvaro Mondéjar
220684d6c6 Add missing readthedocs theme Spanish translations (#2545) 2021-08-23 17:47:11 +02:00
Álvaro Mondéjar
4d1d1c1ba5 Fix various typos using codespell (#2549) 2021-08-20 17:06:01 +02:00
Oleh Prypin
15601c67c8 Refactor file sorting using a "new-style" key function (#2541) 2021-08-20 14:13:26 +02:00
Álvaro Mondéjar
ea0ac7a07a Update contribution guide links (#2548) 2021-08-20 12:30:26 +02:00
Álvaro Mondéjar
98cc11a7de Fix minor errors in documentation (#2515) 2021-07-28 14:11:46 +02:00
Oleh Prypin
52ed45a58c Release 1.2.2 (#2496) 1.2.2 2021-07-18 21:17:36 +02:00
Oleh Prypin
1c72c12472 Don't announce support of zh_CN locale yet, as there's a bug (#2510)
https://github.com/mkdocs/mkdocs/issues/2509
2021-07-18 20:57:54 +02:00
Oleh Prypin
1b15412f4c Don't require trailing slash when serving a directory index (#2507)
in the livereload/local server.

Instead of showing a 404 error, detect if it's a directory and redirect to a path with a trailing slash added
2021-07-18 17:08:21 +02:00
Oleh Prypin
e0ba6d7bd9 Tighten the docs and tests around site_url (#2506)
Some of the docs were accidentally reverted with other things, so I'm restoring them and adding a bit more.

Fixing an edge case: it is in fact possible to specify a URL with scheme and without netloc. Adding new tests to also catch that.
2021-07-17 03:11:30 +02:00
Ultrabug
ccc4ce8d13 Merge pull request #2497 from xingkong0113/zh_CN
zh_CN: Complete the translation of the mkdocs theme
2021-07-15 11:19:07 +02:00
xingkong0113
8091fab09d Merge branch 'master' into zh_CN 2021-07-15 15:53:55 +08:00
Oleh Prypin
6f5443caee CI: Run all lint checks in one job (#2501)
This is more considerate of the computational resources. The lint checks are not the bottleneck, and now they won't starve other jobs from starting.
All checks will still run and a failure in any of them will fail the job.

Also upgrade Python and Node versions

+ Remove unused 'max-parallel'
2021-07-14 22:02:15 +02:00
Oleh Prypin
fd0e9dedd2 Replace urlparse with urlsplit (#2502)
https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlsplit

It's the same but doesn't treat ';' as a special character in paths; and I don't think anyone would expect it to be special
2021-07-14 22:01:33 +02:00
xingkong0113
b4a471b684 Merge branch 'master' into zh_CN 2021-07-14 06:19:42 +08:00
xingkong0113
0a7e707129 add "Last-Translator: >
Add translator name and email
2021-07-14 06:11:46 +08:00
Oleh Prypin
b12804d97e Fix some spelling typos (#2489) 2021-07-13 19:07:59 +02:00
xingkong0113
c257235204 Update Docs 2021-07-13 20:06:32 +08:00
xingkong0113
a29c337f2d zh_CN
Finish translating both mkdocs and readthedocs topics.

Signed-off-by: xingkong0113 <26911141+xingkong0113@users.noreply.github.com>
2021-07-13 11:02:28 +08:00
Oleh Prypin
ae556572d4 Revert "Ensure site_url and use_directory_urls do not conflict." (#2490)
This reverts commit b89ec5792e.

That commit claims to fix some bugs in interactions with `use_directory_urls`, but in fact there are currently no known unfixed bugs.
So there is no need to have that breaking change.
2021-07-12 22:26:04 +02:00
Urs Liska
47d7571697 Add link to README to contributing.md (#1978)
In https://github.com/mkdocs/mkdocs/issues/1972#issuecomment-582952604
I was pointed to the README, but I hadn't looked for contact information there.
I think looking on the website is a reasonable way, and pointing to the README
from the "Contributing" page looks like a good help to me.
2021-07-08 23:43:20 +02:00
Oleh Prypin
cdb1f7107a Revert livereload file watching to use polling observer (#2477)
This goes back to the approach that was always used with 'livereload' library (but now just using the 'watchdog' implementation of the same), meaning the same downsides with latency and CPU usage.
But we have to do this to reasonably support usages that span virtual filesystems such as non-native Docker and network mounts.

This also simplifies the code, as the polling observer already follows symlinks and happens to support watching paths of files directly
2021-07-08 18:32:36 +02:00
Oleh Prypin
06d8b4742c Allow mkdocs.yaml when '--config' is not passed + refactor (#2478)
Co-authored-by: Olaf Gladis <olaf.gladis@trivago.com>
2021-07-08 18:29:55 +02:00
Oleh Prypin
f6d883035a Optimize getting relative page URLs (#2407)
This is a custom implementation that's significantly faster but gives the exact same results as the current one. The use of `posixpath.relpath` pulled in several path-specific transformations that are never needed here.

Efficiency is important because calls to `normalize_url` (e.g.) on a site with ~300 pages currently take up ~10% of the total run time due to the sheer number of them. The number of calls is at least the number of pages squared.
2021-07-07 18:51:40 +02:00
Jerzy Kozera
a012d2e65d Fix reversed breadcrumbs in rtd theme (#2179) 2021-07-07 18:38:22 +02:00