Skip to content

It is an Obsidian plugin which can embeds title to code blocks.

Notifications You must be signed in to change notification settings

yo-goto/obsidian-embedded-code-title

 
 

Repository files navigation

Obsidian Embedded Code Title Plugin

This is an Obsidian plugin which can embeds title to code blocks.

⚠ There is a possibility that this plugin doesn't work someday because it depends on the internal DOM structure of Obsidian.

Demo

💻Install

For now, I don't have registered community plugins. So you need to install it manually with git and npm.

git clone https://github.com/tadashi-aikawa/obsidian-embedded-code-title.git
cd obsidian-embedded-clone-title
npm run build
mkdir -p <your_vault>/.obsidian/obsidian-embedded-clone-title
cp main.js styles.css manifest.json <your_vault>/.obsidian/obsidian-embedded-clone-title/

🖋 Examples

No file name

```python
def main():
    pass
```

img.png

No file name but show a language name

```python:
def main():
    pass
```

img_1.png

With a file name

```python:main.py
def main():
    pass
```

img_2.png

With a file name includes half spaces

If you configure as the follows.

img_4.png

Then

```python:main\sincludes\sspace.py
def main():
    pass
```

img_3.png

🌍 Use on Obsidian Publish

You can also use it on the published site by Obsidian Publish with publish/publish.js and publish/publish.css. Please see my published site as examples.

About

It is an Obsidian plugin which can embeds title to code blocks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 48.2%
  • JavaScript 43.1%
  • CSS 8.7%