This repository was archived by the owner on Dec 16, 2022. It is now read-only.
File tree 3 files changed +19
-9
lines changed
3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change 24
24
25
25
## Quick Links
26
26
27
- * [ Website] ( https://allennlp.org/ )
28
- * [ Tutorial] ( https://allennlp.org/tutorials )
29
- * [ Forum] ( https://discourse.allennlp.org )
30
- * [ Documentation] ( https://docs.allennlp.org/master/ )
31
- * [ Contributing Guidelines] ( CONTRIBUTING.md )
32
- * [ Pretrained Models] ( https://github.com/allenai/allennlp-hub/blob/master/allennlp_hub/pretrained/allennlp_pretrained.py )
33
- * [ Continuous Build] ( https://github.com/allenai/allennlp/actions )
34
- * [ Nightly Releases] ( https://pypi.org/project/allennlp/#history )
27
+ - [ Website] ( https://allennlp.org/ )
28
+ - [ Tutorial] ( https://allennlp.org/tutorials )
29
+ - [ Forum] ( https://discourse.allennlp.org )
30
+ - Documentation ( [ latest ] ( https://docs.allennlp.org/latest/ ) | [ stable ] ( https://docs.allennlp.org/stable/ ) | [ master] ( https://docs.allennlp.org/master/ ) )
31
+ - [ Contributing Guidelines] ( CONTRIBUTING.md )
32
+ - [ Pretrained Models] ( https://github.com/allenai/allennlp-hub/blob/master/allennlp_hub/pretrained/allennlp_pretrained.py )
33
+ - [ Continuous Build] ( https://github.com/allenai/allennlp/actions )
34
+ - [ Nightly Releases] ( https://pypi.org/project/allennlp/#history )
35
35
36
36
## Package Overview
37
37
Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ repo_name: allenai/allennlp
23
23
# TODO(markn): Consider adding GA here, if we care about it.
24
24
25
25
nav :
26
- - AllenNLP : README.md
26
+ - Home : README.md
27
+ - Versions :
28
+ - Latest : /latest/
29
+ - Stable : /stable/
30
+ - Master : /master/
27
31
- Tutorials :
28
32
- Predicting Paper Venues (pt1) : tutorials/getting_started/predicting_paper_venues/predicting_paper_venues_pt1.md
29
33
- Predicting Paper Venues (pt2) : tutorials/getting_started/predicting_paper_venues/predicting_paper_venues_pt2.md
Original file line number Diff line number Diff line change 10
10
11
11
from ruamel .yaml import YAML
12
12
13
+ from allennlp .version import VERSION
14
+
13
15
14
16
API_TOC_KEY = "API"
15
17
@@ -22,6 +24,7 @@ def parse_args():
22
24
parser .add_argument (
23
25
"api_docs_path" , help = "The root of the API docs within the markdown docs root folder."
24
26
)
27
+ parser .add_argument ("--docs-version" , type = str , default = f"v{ VERSION } " )
25
28
return parser .parse_args ()
26
29
27
30
@@ -47,6 +50,9 @@ def main():
47
50
48
51
nav_entries = build_api_toc (Path (opts .api_docs_path ), Path (opts .docs_root ))
49
52
53
+ # Add version to name.
54
+ source_yaml ["site_name" ] = f"AllenNLP { opts .docs_version } "
55
+
50
56
# Find the yaml sub-object corresponding to the API table of contents.
51
57
site_nav = source_yaml ["nav" ]
52
58
for nav_obj in site_nav :
You can’t perform that action at this time.
0 commit comments