LogoNavigate back to the homepage

Creating .mdx file support and snippet in VSCode

Yish
December 8th, 2019 · 1 min read

Recently I used .mdx file to write my post, I found VSCode doesn’t support .mdx by default. So how to do it to support mdx?

First of all, install MDX support, or you can search from Extension: marketplace: mdx.

Next, edit the settings.json file, adding associate to mdx.

1"files.associations": {
2 "*.md": "mdx"
3},

Second, we need to create a snippet, Preferences > User Snippets and new snippet.

You can create local snippet and put it into your project, also you can create global snippet what you need.

1{
2 "mdx": {
3 "prefix": "mdx",
4 "body": [
5 "---",
6 "title: $1",
7 "date: ${2:$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE}",
8 "tags:",
9 " - $0",
10 "---"
11 ],
12 "description": "MDX file."
13 },
14}

More articles from Yish

How to get client id from a request in Laravel passport?

For my situation, I need to get client id from per request and record it into the database, but how to get it from a request in laravel passport? There are many ways to do it.

December 3rd, 2019 · 1 min read

VuePress integrates into Laravel

I assume you can build vuepress standalone, so you know vuepress is compiled by node.js and it generated .html file in dist by default. We can use this feature to integrate into laravel.

November 20th, 2019 · 1 min read
© 2019–2020 Yish
Link to $https://twitter.com/yishlaiLink to $https://github.com/Mombuyish