Skip to content

Commit acefbeb

Browse files
Neural-Link Teamtensorflow-copybara
authored andcommitted
Internal
PiperOrigin-RevId: 266175219
1 parent 63c5887 commit acefbeb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

neural_structured_learning/tools/build_docs.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
from __future__ import division
3939
from __future__ import print_function
4040

41-
import os
42-
4341
from absl import app
4442
from absl import flags
4543

@@ -59,6 +57,9 @@
5957
flags.DEFINE_bool("search_hints", True,
6058
"Include metadata search hints in the generated files")
6159

60+
flags.DEFINE_string("site_path", "neural_structured_learning/api_docs/python",
61+
"Path prefix in the _toc.yaml")
62+
6263
FLAGS = flags.FLAGS
6364

6465

@@ -73,12 +74,12 @@ def main(_):
7374
py_modules=[("nsl", nsl)],
7475
code_url_prefix=FLAGS.code_url_prefix,
7576
search_hints=FLAGS.search_hints,
76-
site_path="neural_structured_learning/api_docs/python",
77+
site_path=FLAGS.site_path,
7778
# local_definitions_filter ensures that shared modules are only
7879
# documented in the location that defines them, instead of every location
7980
# that imports them.
8081
callbacks=[public_api.local_definitions_filter])
81-
doc_generator.build(output_dir=os.path.join(flags.FLAGS.out_dir))
82+
doc_generator.build(output_dir=FLAGS.out_dir)
8283

8384

8485
if __name__ == "__main__":

0 commit comments

Comments
 (0)