Skip to content

TheKoTech/obsidian_code_snippet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Neat code block snippet

This snippet makes your Obsidian.md code blocks look a little fancier

image

How to install

  1. Download the files (Code -> Download ZIP)
  2. Open your Obsidian.md vault in explorer
  3. Copy and paste the .obsidian folder in it
  4. Go to: Obsidian app -> Settings -> Appearance -> CSS Snippets
  5. Turn on "Neat code blocks"
  6. (optional) copy and paste the 'Showcase.md' file to your vault too

How to add my language?

  1. Go to: Obsidian app -> Settings -> Appearance -> CSS Snippets
  2. Open in explorer
  3. Open the Neat code blocks.css
  4. In the :root { ... } add:
	/* I recommend copying the lang's logo color to here */
	--NAME-color: rgb(0, 0, 0);  /* or #ffffff. Left border color */
	--NAME-content: 'NAME';      /* displayed name */
  1. Copy and paste this to the end of the file and change the NAME:
pre>code.language-NAME {
	border-color: var(--NAME-color); /* change the name */
}

pre>code.language-NAME::after {
	content: var(--NAME-content);    /* change the name */
}

Might as well contribute after that

About

A code block snippet for Obsidian.md

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages