Skip to content

Print variable values in code snippets #471

@deevannaveed

Description

@deevannaveed

Is your feature request related to a problem? Please describe.

Basically I want to add dynamic values in code snippets see the example below, I want the links to have a dynamic version number.

MyMarkDown.md

<script setup>
  import { version } from '../../../packages/myPackage/package.json'
</script>
# Below is a code snippet that will contain our latest version.

```html
<!-- stylesheet -->
<link rel="stylesheet" href="https://mycdn.com/css/{{ version }}/style.min.css" />

<div>Some content</div>

<!-- 🚨 Script must be loaded after the component -->
<script src="https://mycdn.com/js/{{ version }}/script.min.js" ></script>

Describe the solution you'd like

I want to be able to print dynamic values in code snippets as show in the example above.

Describe alternatives you've considered

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions