Skip to content
Discussion options

You must be logged in to vote

Hi @astrowonk what are your constraints?

For what you described, I'm moving my documents to use Observable. Consider the following minimal working example:

---
title: "Reactive Markdown"
---

Example of Observable demonstrating inclusion of result of Python calculation: ${my_output}.

## Long Calculation

```{python}
1 + 1
```

```{python}
my_output = 2
```

```{python}
ojs_define(my_output = my_output)
```

When you render the .qmd or .ipynb with Quarto, it will process the Python cells and by using the ojs_define you will export the value of the variable to Observable. When you open the HTML file, Observable will replace the ${my_output} with the value exported.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@rgaiacs
Comment options

@astrowonk
Comment options

@rgaiacs
Comment options

@astrowonk
Comment options

@cscheid
Comment options

Answer selected by astrowonk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
4 participants