mkdocs 2.0.dev4__py3-none-any.whl → 2.0.dev5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mkdocs/__version__.py +1 -1
- mkdocs/extensions/relative_urls.py +1 -3
- mkdocs/mkdocs.py +13 -2
- mkdocs/theme/base.html +1 -1
- mkdocs/theme/navigation.html +3 -0
- {mkdocs-2.0.dev4.dist-info → mkdocs-2.0.dev5.dist-info}/METADATA +6 -4
- mkdocs-2.0.dev5.dist-info/RECORD +13 -0
- mkdocs-2.0.dev4.dist-info/RECORD +0 -12
- {mkdocs-2.0.dev4.dist-info → mkdocs-2.0.dev5.dist-info}/WHEEL +0 -0
- {mkdocs-2.0.dev4.dist-info → mkdocs-2.0.dev5.dist-info}/entry_points.txt +0 -0
mkdocs/__version__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__title__ = "mkdocs"
|
|
2
|
-
__version__ = "2.0.
|
|
2
|
+
__version__ = "2.0.dev5"
|
|
@@ -40,9 +40,7 @@ class URLProcessor(markdown.treeprocessors.Treeprocessor):
|
|
|
40
40
|
|
|
41
41
|
url_from = page.url
|
|
42
42
|
url_to = target.url
|
|
43
|
-
rewrite =
|
|
44
|
-
if url_to.endswith('/') and rewrite != '.':
|
|
45
|
-
rewrite += '/'
|
|
43
|
+
rewrite = mkdocs.link_to(url_from, url_to)
|
|
46
44
|
if url.query:
|
|
47
45
|
rewrite += f'?{url.query}'
|
|
48
46
|
if url.fragment:
|
mkdocs/mkdocs.py
CHANGED
|
@@ -37,6 +37,18 @@ def get_site():
|
|
|
37
37
|
return ctx
|
|
38
38
|
|
|
39
39
|
|
|
40
|
+
def link_to(path_from, path_to):
|
|
41
|
+
if path_from == path_to:
|
|
42
|
+
return '.'
|
|
43
|
+
p0 = path_from.split('/')
|
|
44
|
+
p1 = path_to.split('/')
|
|
45
|
+
for idx, pair in enumerate(zip(p0, p1)):
|
|
46
|
+
if pair[0] != pair[1]:
|
|
47
|
+
break
|
|
48
|
+
p = ['..' for i in p0[idx+1:]] + p1[idx:]
|
|
49
|
+
return '/'.join(p)
|
|
50
|
+
|
|
51
|
+
|
|
40
52
|
class Page:
|
|
41
53
|
def __init__(self, path):
|
|
42
54
|
self.path = path
|
|
@@ -194,8 +206,7 @@ class MkDocs:
|
|
|
194
206
|
@jinja2.pass_context
|
|
195
207
|
def url(ctx, url_to):
|
|
196
208
|
url_from = ctx['page'].url
|
|
197
|
-
|
|
198
|
-
return url_rel
|
|
209
|
+
return link_to(url_from, url_to)
|
|
199
210
|
|
|
200
211
|
dir = pathlib.Path(input_dir)
|
|
201
212
|
loader = jinja2.ChoiceLoader([
|
mkdocs/theme/base.html
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: mkdocs
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.dev5
|
|
4
4
|
Summary: HTTP, for Python.
|
|
5
5
|
Author-email: Kim Christie <noreply@lovelydinosaur.com>
|
|
6
6
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -24,13 +24,15 @@ Description-Content-Type: text/markdown
|
|
|
24
24
|
|
|
25
25
|
MkDocs is a smart, simple, website design tool.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
To install MkDocs, run the following command from the command line:
|
|
28
30
|
|
|
29
31
|
```shell
|
|
30
|
-
|
|
32
|
+
pip install mkdocs --pre
|
|
31
33
|
```
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
This will install the version 2.0 pre-release.
|
|
34
36
|
|
|
35
37
|
## Getting started
|
|
36
38
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
mkdocs/__init__.py,sha256=NwNA-Nxju0I4e1-Msqo_ewJLRcjJjEMiVs2bbfzoMCg,283
|
|
2
|
+
mkdocs/__version__.py,sha256=wk6npcQOpkv95xsvTaNoOpDNXZLjJ10qrE-tday-4e4,46
|
|
3
|
+
mkdocs/mkdocs.py,sha256=Lv_LVrZCLaznNfP9R_0CKS3ALVxuBok9Q_xWTux3PXM,10484
|
|
4
|
+
mkdocs/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
mkdocs/extensions/relative_urls.py,sha256=AS-d1CraHrAFT83RZlpJE8T4cL-CH8h5KC-pwNdd7G4,1848
|
|
6
|
+
mkdocs/extensions/short_codes.py,sha256=I2SwGMcG9OT_vpkJwPI8cHBTkwQAjSPZmoQKfctsHn4,950
|
|
7
|
+
mkdocs/extensions/strike_thru.py,sha256=GrCbfMrHz_2Vlh3E572EQYOSDzEGym34pkHElzF2HZY,577
|
|
8
|
+
mkdocs/theme/base.html,sha256=mioyexMGSzSLbjxINKd-V1Go5UqyhALVfqtkQ2n8UrQ,4286
|
|
9
|
+
mkdocs/theme/navigation.html,sha256=BI5tAPZva9MrAVcuUOBlTJi_Xn1XyBq_2-y69Bdkabw,174
|
|
10
|
+
mkdocs-2.0.dev5.dist-info/METADATA,sha256=RQhYo24CafCop9w3eojiL30avsbipnF9m0Ly9SVAQS8,2205
|
|
11
|
+
mkdocs-2.0.dev5.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
12
|
+
mkdocs-2.0.dev5.dist-info/entry_points.txt,sha256=5PqBrzYJLZ9-yQ0djvENWOQ-0x6Xj30JYNSzM_m70ZU,38
|
|
13
|
+
mkdocs-2.0.dev5.dist-info/RECORD,,
|
mkdocs-2.0.dev4.dist-info/RECORD
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
mkdocs/__init__.py,sha256=NwNA-Nxju0I4e1-Msqo_ewJLRcjJjEMiVs2bbfzoMCg,283
|
|
2
|
-
mkdocs/__version__.py,sha256=H32qhExLRVyUqFMfnUmHAtd8VRrtgzXcA5Xgp9BLsUA,46
|
|
3
|
-
mkdocs/mkdocs.py,sha256=xCa3TEcWJM4igJk7J2yo0clYTenwulMTyPpcZlr9bQY,10242
|
|
4
|
-
mkdocs/extensions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
mkdocs/extensions/relative_urls.py,sha256=iVwmxDeXVAP6MvdJkkdhPT3KZY-QskD8fOQAVX1R3e4,1954
|
|
6
|
-
mkdocs/extensions/short_codes.py,sha256=I2SwGMcG9OT_vpkJwPI8cHBTkwQAjSPZmoQKfctsHn4,950
|
|
7
|
-
mkdocs/extensions/strike_thru.py,sha256=GrCbfMrHz_2Vlh3E572EQYOSDzEGym34pkHElzF2HZY,577
|
|
8
|
-
mkdocs/theme/base.html,sha256=tWLme7GnwgJmWFLvkHCHmUYyDobxVqEBgtge47hClXY,4269
|
|
9
|
-
mkdocs-2.0.dev4.dist-info/METADATA,sha256=ZkPn54kDu5kJVRpJlisgu7O0D7kkWp9bwhmMk70vVI4,2151
|
|
10
|
-
mkdocs-2.0.dev4.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
11
|
-
mkdocs-2.0.dev4.dist-info/entry_points.txt,sha256=5PqBrzYJLZ9-yQ0djvENWOQ-0x6Xj30JYNSzM_m70ZU,38
|
|
12
|
-
mkdocs-2.0.dev4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|