Markdown
Code Blocks
This documentation is for the preview version of the Dev Portal. If you are not part of the preview program, please refer to the current Dev Portal docs.
Dev Portal supports code blocks in Markdown using the Prism.js syntax highlighting library.
Syntax Highlighting
Code blocks are text blocks wrapped around by strings of 3 backticks. You may check out this reference for the specifications of MDX.
```js console.log("Every repo must come with a mascot."); ```markdown
The code block above will render as:
console.log("Every repo must come with a mascot.");js
Supported Languages
Currently, Dev Portal supports the following languages for syntax highlighting:
- Markup -
markup
,html
,xml
,svg
,mathml
,ssml
,atom
,rss
- Ruby -
ruby
,rb
- Bash -
bash
,sh
,shell
- PHP -
php
- JSON -
json
,webmanifest
- Java -
java
- C# -
csharp
,cs
,dotnet
- Objective-C -
objectivec
,objc
- Markdown -
markdown
,md
- JavaScript -
javascript
,js
- TypeScript -
typescript
,ts
Language customization is coming soon! See #86