DoIt
DoIt copied to clipboard
[FEATURE] Code Block Title
Describe the feature you want 描述你的功能需求
I don't know if this feature already exist or not (which I already try difference method).
Example:-
```rust:main.rs
code...
```
or
````rust {title="main.rs"}
code...
```
Image below are reference what I mean by "title".
-
TOML
toconfig.toml
-
Javascript
toApp.js
- etc ...
Useful reference 有价值的参考
Maybe this is a the right one, (not quite sure because I can't try this).
- https://gohugo.io/contribute/documentation/#code-block-shortcode
It is not supported yet but I think it is possible with the new 0.93.0 code block hook.
https://gohugo.io/templates/render-hooks/#render-hooks-for-code-blocks
I don't know if this was helpful but you can try take a look - https://koki-nakamura22.github.io/blog/2019/10/02/hugo-code-block-title/#add-javascript-code