| Total Complexity | 2 | 
| Total Lines | 16 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | import os  | 
            ||
| 2 | |||
| 3 | from doorstop.core import publisher, builder  | 
            ||
| 4 | from doorstop.cli import utilities  | 
            ||
| 5 | |||
| 6 | |||
| 7 | def on_pre_build(config):  | 
            ||
| 8 | cwd = os.getcwd()  | 
            ||
| 9 | path = os.path.abspath(os.path.join(cwd, "docs/gen"))  | 
            ||
| 10 | tree = builder.build(cwd=cwd)  | 
            ||
| 11 | |||
| 12 | published_path = publisher.publish(tree, path, ".md", index=True)  | 
            ||
| 13 | |||
| 14 | if published_path:  | 
            ||
| 15 |         utilities.show("published: {}".format(published_path)) | 
            ||
| 16 |