Mirror of
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: vscode-snippets slug rename

+16 -7
+3
astro.config.mjs
··· 189 189 rehypeGitHubBadgeLinks, 190 190 ], 191 191 }, 192 + redirects: { 193 + "/blog/starlight-vscode-snippets": "/blog/vscode-snippets", 194 + }, 192 195 });
+7 -3
lunaria.config.json
··· 36 36 } 37 37 ] 38 38 }, 39 - "customCss": ["./lunaria/styles.css"], 40 - "basesToHide": ["src/content/docs/"], 39 + "customCss": [ 40 + "./lunaria/styles.css" 41 + ], 42 + "basesToHide": [ 43 + "src/content/docs/" 44 + ], 41 45 "ui": { 42 46 "statusByLocale.heading": "Translation progress by locale", 43 47 "statusByLocale.incompleteLocalizationLink": "incomplete translation", ··· 46 50 "statusByFile.heading": "Translation status by file" 47 51 } 48 52 } 49 - } 53 + }
public/blog/starlight-vscode-snippets.jpg public/blog/vscode-snippets.jpg
src/assets/blog/starlight-vscode-snippets/screenshot-triggering-ffmt-snippet.png src/assets/blog/vscode-snippets/screenshot-triggering-ffmt-snippet.png
+4 -2
src/content/docs/blog/starlight-vscode-snippets.mdx src/content/docs/blog/vscode-snippets.mdx
··· 9 9 - trueberryless 10 10 cover: 11 11 alt: A collection of old newspaper sheets piled on a wooden table, displaying vintage articles and worn edges. 12 - image: ../../../../public/blog/starlight-vscode-snippets.jpg 12 + image: ../../../../public/blog/vscode-snippets.jpg 13 13 --- 14 14 15 15 This article demonstrates how code snippets can be created in Visual Studio Code that can significantly boost your productivity when regularly working with [Astro's content collections](https://docs.astro.build/en/guides/content-collections). ··· 17 17 :::note 18 18 This article arose from a suggestion by [Sarah Rainsberger](https://github.com/sarah11918) and highlights a feature contributed by [HiDeoo](https://github.com/HiDeoo) - all code examples are also by HiDeoo. 19 19 ::: 20 + 21 + {/* excerpt */} 20 22 21 23 ## The need for snippets 22 24 ··· 53 55 54 56 Create an empty Markdown (`.md`) or `.mdx` file. Start typing `ffmt` and press `TAB ⇥` to trigger the snippet. If you do not see any suggestions, you can manually trigger them with `Ctrl + Space` and select the `"Add Markdown frontmatter"` snippet. Depending on your exact configuration, you can now tab through the fields to edit them to your current use case. For example the snippet from above allows you to directly edit the heading and then jumps to the content. The title field of the frontmatter will be set to the file name without its extension. 55 57 56 - ![Screenshot of the Visual Studio Code editor, displaying generated content from a code snippet. ](../../../assets/blog/starlight-vscode-snippets/screenshot-triggering-ffmt-snippet.png) 58 + ![Screenshot of the Visual Studio Code editor, displaying generated content from a code snippet. ](../../../assets/blog/vscode-snippets/screenshot-triggering-ffmt-snippet.png) 57 59 58 60 ## Further resources 59 61
+2 -2
src/content/docs/credits.mdx
··· 262 262 usedOnUrl="/blog/starlight-sidebar-whitespace" 263 263 /> 264 264 <ImageCredit 265 - image="/public/blog/starlight-vscode-snippets.jpg" 265 + image="/public/blog/vscode-snippets.jpg" 266 266 title="Brown and White Cardboard Box" 267 267 author="Evelyn Clement" 268 268 authorUrl="https://unsplash.com/@e_clement" 269 269 sourceUrl="https://unsplash.com/photos/brown-and-white-cardboard-box-TgUwEK-RNUQ" 270 270 usedOn="How VS Code Snippets can improve your workflow in Starlight" 271 - usedOnUrl="/blog/starlight-vscode-snippets" 271 + usedOnUrl="/blog/vscode-snippets" 272 272 /> 273 273 <ImageCredit 274 274 image="/public/blog/tags/mindspace.jpg"