Custom Components

Code Block - Custom Title

Enabling custom title in code blocks


Custom Title

Note

The default title is detect using language name, but it can be override using title="..." meta string.

Enabling custom title in code blocks

Code Example

Show custom title using the title="..." meta tag.

mdx
```go title="Custom Title"
import "fmt"
 
func main() {
    fmt.Println("Hello, World!")
}
```

It must be showing an go title (detect from language), but because i passing title="Custom Title" it will show custom title like this.

Custom Title
import "fmt"
 
func main() {
    fmt.Println("Hello, World!")
}