diff --git a/example.py b/example.py index 5aeb8be..204c149 100644 --- a/example.py +++ b/example.py @@ -19,4 +19,4 @@ hub.spawn_jupyter_hub() -MystBuilder(hub).build() \ No newline at end of file +MystBuilder(hub).build() diff --git a/myst_libre/tools/myst_client.py b/myst_libre/tools/myst_client.py index eaf9ff6..a3187f5 100644 --- a/myst_libre/tools/myst_client.py +++ b/myst_libre/tools/myst_client.py @@ -142,6 +142,18 @@ def build(self): env = os.environ.copy() self.env_vars.update(env) return self.run_command('build', '--execute', '--html',env_vars=self.env_vars) + + def build_site(self): + """ + Build the MyST markdown project. + + Returns: + str: Command output or None if failed. + """ + os.chdir(self.build_dir) + env = os.environ.copy() + self.env_vars.update(env) + return self.run_command('build', '--site',env_vars=self.env_vars) def convert(self, input_file, output_file): """