How does rendering of the blocks work?

This is similar to my previous post. How does the rendering for this page on the doc website work?

I assume it uses another similar iframe method, but how do you manage to render the entire category of blocks? Could this be used to render all the blocks from extensions?

4 Likes

If i’m recalling correctly, before we had the default simulator github page, this bit

referencing https://makecode.com/gh-pages-embed.js did that automatically on gh pages, which is a good starting point to look at for that

3 Likes

That seems to be doing a similar thing to what they talk about on this page which links to this fiddle. I want to see this though:

in pxt-arcade I see it just looks like this though:

# Blocks Gallery

Listing of the blocks and their images in @name@.

## Sprites

```apis
sprites
\```

## Controller

```apis
controller
\```

(without the backslashes obviously)

Which gets rendered to this HTML:

<pre><code class="lang-apis">sprites</code></pre>

But that doesn’t work in the fiddle.

3 Likes