# Codeblock formatting with filename

**URL:** <https://forum.obsidian.md/t/codeblock-formatting-with-filename/36191>\
**Category:** Help\
**Tags:** ui-ux\
**Created:** [April 20, 2022, 12:33pm UTC](https://forum.obsidian.md/t/codeblock-formatting-with-filename/36191 "2022-04-20T12:33:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![God\_An](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@God\_An](https://forum.obsidian.md/u/God_An)\
**Post date:** [April 20, 2022, 12:33pm UTC](https://forum.obsidian.md/t/codeblock-formatting-with-filename/36191/1 "2022-04-20T12:33:08Z")

</div>

Hi,

I’m looking for a way to paste codeblocks with a “contextual” information like filename.  
Right now, I can just write it but it’s not part of the codeblock.

Example how I would like to see it in Obsidian:  
 ![image](https://forum.obsidian.md/uploads/default/original/3X/0/1/016fcb49a8943c1ca507a398e831b542477310f8.png)  
Instead of `C#` I would like to give some filename.

So that when I see my code snippet, I see the filename of the snippet. Right now I can just write it above or below but it doesn’t get rendered as codeblock.

Is there any plugin / theme hack to implement this?

Thanks!

---

<div class="post-metadata">

**Author:** ![Y-jiji](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/y/3d9bf3/32.png) [@Y-jiji](https://forum.obsidian.md/u/Y-jiji)\
**Post date:** [May 6, 2022, 5:10pm UTC](https://forum.obsidian.md/t/codeblock-formatting-with-filename/36191/2 "2022-05-06T17:10:18Z")

</div>

Try this: [tadashi-aikawa/obsidian-embedded-code-title: It is an Obsidian plugin which can embeds title to code blocks. (github.com)](https://github.com/tadashi-aikawa/obsidian-embedded-code-title)

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [August 4, 2022, 5:10pm UTC](https://forum.obsidian.md/t/codeblock-formatting-with-filename/36191/3 "2022-08-04T17:10:42Z")

</div>

Closed on August 4, 2022, 5:10pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
