feat: Flat import of markdown repo
This is a flat (without history) import of (some of) the content from our markdown module. We've imported this without history because the repo contains our blog posts and showcases posts content prior to porting them to strapi. Since this contains many images, it would balloon the size of this repo to import the full history. Instead, please refer to the history of the (archived) markdown repo at: https://github.com/freesewing/markdown
This commit is contained in:
parent
1671a896b5
commit
b34a2ee2ed
6132 changed files with 244167 additions and 0 deletions
46
markdown/dev/howtos/design/sprinkle-snippets/en.md
Normal file
46
markdown/dev/howtos/design/sprinkle-snippets/en.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
title: Add several of the same snippets with the sprinkle macro
|
||||
for: developers
|
||||
about: Adding multiple snippets doesn't need to be a chore with this handy macro
|
||||
---
|
||||
|
||||
<Note>
|
||||
|
||||
##### See this example in our source code
|
||||
|
||||
- [packages/jaeger/src/front.js](https://github.com/freesewing/freesewing/blob/8474477911daed3c383700ab29c9565883f16d66/packages/jaeger/src/front.js#L381)
|
||||
|
||||
</Note>
|
||||
|
||||
Adding multiple snippets at the same time results in a lot of repetitive code.
|
||||
|
||||
Better to use the `sprinkle` macro instead:
|
||||
|
||||
```js
|
||||
macro('sprinkle', {
|
||||
snippet: 'notch',
|
||||
on: [
|
||||
'neck',
|
||||
'shoulder',
|
||||
'armholePitch',
|
||||
'chestPocketBottomLeft',
|
||||
'chestPocketBottomRight',
|
||||
'lapelBreakPoint',
|
||||
'notchMax',
|
||||
'notch',
|
||||
'innerPocketLeft',
|
||||
'innerPocketRight',
|
||||
'frontPocketTopLeft',
|
||||
'frontPocketBottomLeft',
|
||||
'armholeHollow',
|
||||
'waist'
|
||||
]
|
||||
})
|
||||
```
|
||||
|
||||
<Tip>
|
||||
|
||||
Refer to [the sprinkle macro documentation](/reference/macros/sprinkle/) for details on how
|
||||
to use this macro
|
||||
|
||||
</Tip>
|
Loading…
Add table
Add a link
Reference in a new issue