You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@yodasw16 We have also experienced the need for this kind of flexibility.
Are you thinking that this would be a new property defined in the front-matter of a pattern with the arbitrary code provided as a fenced code block?
As a temporary workaround, you can always include code samples within the notes front-matter property (since it is parsed as Markdown), and use the sourceless flag to hide the default code sample. Example:
name: Button
sourceless: true
notes: |
This is a button. Here is some code:
```html
<button class="Button">Wooo</button>
```
```css
.Button { }
```
Although you may need to add a little CSS to properly style the <pre> and/or <code> elements output by the Markdown engine.
Yeah, I think it would have to either be a property in the front-matter or for things like showing css or js maybe having another file in the directory that get's pulled in to another <pre><code>. Not sure how that would work, but it would be useful.
Is there a way to add arbitrary code samples to a pattern template? A few examples:
The text was updated successfully, but these errors were encountered: