Skip to content

Commit a42f55c

Browse files
committed
Add build option
1 parent d9c7f53 commit a42f55c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919

2020
hub.spawn_jupyter_hub()
2121

22-
MystBuilder(hub).build()
22+
MystBuilder(hub).build()

myst_libre/tools/myst_client.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,18 @@ def build(self):
142142
env = os.environ.copy()
143143
self.env_vars.update(env)
144144
return self.run_command('build', '--execute', '--html',env_vars=self.env_vars)
145+
146+
def build_site(self):
147+
"""
148+
Build the MyST markdown project.
149+
150+
Returns:
151+
str: Command output or None if failed.
152+
"""
153+
os.chdir(self.build_dir)
154+
env = os.environ.copy()
155+
self.env_vars.update(env)
156+
return self.run_command('build', '--site',env_vars=self.env_vars)
145157

146158
def convert(self, input_file, output_file):
147159
"""

0 commit comments

Comments
 (0)