File tree Expand file tree Collapse file tree 4 files changed +46
-3
lines changed Expand file tree Collapse file tree 4 files changed +46
-3
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ all = ["style", "typing"]
90
90
91
91
[envs .pages ]
92
92
# detached = true
93
- dependencies = [
93
+ extra- dependencies = [
94
94
" mkdocs>=1.4.2" ,
95
95
" mkdocs-material" ,
96
96
# Plugins
@@ -105,10 +105,13 @@ dependencies = [
105
105
" pymdown-extensions~=9.6.0" ,
106
106
# Necessary for syntax highlighting in code blocks
107
107
" pygments" ,
108
+ " mike" ,
108
109
]
109
110
110
111
[envs .pages .scripts ]
111
112
build = [" mkdocs build" ]
113
+ deploy = [" python scripts/deploy_docs.py" ]
114
+
112
115
113
116
[envs .build ]
114
117
detached = true
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ copyright: >
11
11
12
12
theme :
13
13
name : material
14
+ custom_dir : overrides
14
15
language : en
15
16
icon :
16
17
repo : fontawesome/brands/github
@@ -107,6 +108,13 @@ extra:
107
108
- accept
108
109
- reject
109
110
- manage
111
+ version :
112
+ provider : mike
113
+ default : latest
114
+
115
+ plugins :
116
+ - mike :
117
+ canonical_version : latest
110
118
111
119
extra_css :
112
120
- stylesheets/extra.css
116
124
- Features : features.md
117
125
- Installation : installation.md
118
126
- CLI :
119
- - About : cli/about.md
120
- - Reference : cli/reference.md
127
+ - About : cli/about.md
128
+ - Reference : cli/reference.md
Original file line number Diff line number Diff line change
1
+ {% extends "base.html" %}
2
+
3
+ {% block outdated %}
4
+ You're not viewing the latest version.
5
+ < a href ="{{ '../' ~ base_url }} ">
6
+ < strong > Click here to go to latest.</ strong >
7
+ </ a >
8
+ {% endblock %}
Original file line number Diff line number Diff line change
1
+ from subprocess import run
2
+
3
+ from scripts .tools import get_current_version_from_git
4
+
5
+
6
+ def main () -> None :
7
+ version = get_current_version_from_git ()
8
+ alias = "latest"
9
+
10
+ if version .prerelease :
11
+ version = version .next_minor ()
12
+ alias = "dev"
13
+
14
+ version .major , version .minor
15
+
16
+ run (
17
+ "mike deploy --push --update-aliases --rebase --force "
18
+ f'--title "v{ version .major } .{ version .minor } .x ({ alias } )" { version .major } .{ version .minor } { alias } ' ,
19
+ shell = True ,
20
+ ).check_returncode ()
21
+
22
+
23
+ if __name__ == "__main__" :
24
+ main ()
You can’t perform that action at this time.
0 commit comments