Can I use a Vue interpolation inside a VuePress code block

89 Views Asked by At

In my VuePress project I have a code block that looks like this

```cs
   string pageName = getPageName("{{ $page.key }}");
```

What I want to see on the static site is:

```cs
   string pageName = getPageName("v-10013ae8");
```

Where the interpolation of {{ $page.key }} is rendered as v-10013ae8

I've tried

  • ~~~{{ $page.key }}~~~
  • ````{{ $page.key }}````

This is the VuePress documentation I have been following

0

There are 0 best solutions below