diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..fb00038dc --- /dev/null +++ b/docs/README.md @@ -0,0 +1,23 @@ +Docs +========== + + +## Building the docs + +To build and preview the docs run the following commands: + +```bash +cd docs +pip3 install -r requirements.txt +make html +python3 -m http.server 8082 --bind :: +``` + +Now you should be able to view the docs in your browser at the link provided in your terminal. + +To reload the preview after making changes, rerun: + +```bash +make html +python3 -m http.server 8082 --bind :: +``` diff --git a/docs/source/conf.py b/docs/source/conf.py index 807563ba7..a41bc3717 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -34,9 +34,15 @@ copyright = "2022, Meta" author = "Meta" +try: + # pyre-ignore + version = torchrec.__version__ +except Exception: + # when run internally, we don't have a version yet + version = "0.0.0" # The full version, including alpha/beta/rc tags # First 3 as format is 0.x.x.* -release = ".".join(torchrec.__version__.split(".")[:3]) +release = ".".join(version.split(".")[:3]) # -- General configuration ---------------------------------------------------