Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.

Commit 42a4e63

Browse files
authored
Adds links in readme to stable and latest docs (#4186)
* add finer documentation links * add links to docs as well * improve
1 parent d67e721 commit 42a4e63

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424

2525
## Quick Links
2626

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)
3535

3636
## Package Overview
3737

mkdocs-skeleton.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ repo_name: allenai/allennlp
2323
# TODO(markn): Consider adding GA here, if we care about it.
2424

2525
nav:
26-
- AllenNLP: README.md
26+
- Home: README.md
27+
- Versions:
28+
- Latest: /latest/
29+
- Stable: /stable/
30+
- Master: /master/
2731
- Tutorials:
2832
- Predicting Paper Venues (pt1): tutorials/getting_started/predicting_paper_venues/predicting_paper_venues_pt1.md
2933
- Predicting Paper Venues (pt2): tutorials/getting_started/predicting_paper_venues/predicting_paper_venues_pt2.md

scripts/build_docs_config.py

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
from ruamel.yaml import YAML
1212

13+
from allennlp.version import VERSION
14+
1315

1416
API_TOC_KEY = "API"
1517

@@ -22,6 +24,7 @@ def parse_args():
2224
parser.add_argument(
2325
"api_docs_path", help="The root of the API docs within the markdown docs root folder."
2426
)
27+
parser.add_argument("--docs-version", type=str, default=f"v{VERSION}")
2528
return parser.parse_args()
2629

2730

@@ -47,6 +50,9 @@ def main():
4750

4851
nav_entries = build_api_toc(Path(opts.api_docs_path), Path(opts.docs_root))
4952

53+
# Add version to name.
54+
source_yaml["site_name"] = f"AllenNLP {opts.docs_version}"
55+
5056
# Find the yaml sub-object corresponding to the API table of contents.
5157
site_nav = source_yaml["nav"]
5258
for nav_obj in site_nav:

0 commit comments

Comments
 (0)