Skip to content

Commit

Permalink
Add build option
Browse files Browse the repository at this point in the history
  • Loading branch information
agahkarakuzu committed Sep 9, 2024
1 parent d9c7f53 commit a42f55c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion example.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

hub.spawn_jupyter_hub()

MystBuilder(hub).build()
MystBuilder(hub).build()
12 changes: 12 additions & 0 deletions myst_libre/tools/myst_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit a42f55c

Please sign in to comment.