squidfunk/mkdocs-material

Editable variables in code block

Closed this issue · 2 comments

Context

No response

Description

It would be very useful for technical documentation to allow users to edit variable values live in the code blogs before copying.
I saw this on Google Cloud Docs and was hoping I could do the same with Materials.
Maybe I couldn't find it because I don't know exactly how to describe it, but I don't think it's possible with Materials at the moment.

Here is an example from Google Cloud Docs: https://cloud.google.com/kubernetes-engine/docs/how-to/creating-an-autopilot-cluster#create_an_autopilot_cluster

Related links

Use Cases

What I really like about Google Cloud Docs is that I can type in the values for my usecase and then just copy and paste the command into my terminal as is. This is much more convenient than having to copy a block of code with placeholders like "<name_here>" and having to edit it in my terminal.

Visuals

image

Before submitting

Thanks for suggesting! Unfortunately, this is currently out of scope for Material for MkDocs and an exact duplicate of:

Closing as duplicate.

I'm sorry I didn't find them myself when I searched for github issues. I think it was because I did not know how to name the feature correctly.
Anyway, thanks for the quick reply and for pointing out the other problems.