Dmytro-Shulha / obsidian-css-snippets

Most common appearance solutions for Obsidian now in a single place. Initially collected by Klaas: https://forum.obsidian.md/t/how-to-achieve-css-code-snippets/8474
1.41k stars 148 forks source link

CSS files instead of Markdown files with embedded CSS code blocks? #8

Open ewa opened 3 years ago

ewa commented 3 years ago

This is definitely a feature request rather than an "issue," but...

Right now, all of these examples are markdown (.md) files containing CSS in code blocks, meaning that a person can't just download them into their snippets directory and use them. And (at least in my case) meaning there's a lot of opportunity for human error in copy-and-pasting those code blocks.

What do you think of changing the files over to straight CSS? That would mean giving up some of the nicely-formatted explanatory text in the files themselves, but I think it might be a win overall.

Thanks for your consideration :-) -Eric

Dmytro-Shulha commented 3 years ago

It is actually a good idea! It may be difficult to avoid conflicts with all currently used CSS themes for Obsidian. It definitely will improve Obsidian customization experience.

fkSoc1ety commented 5 months ago

Linux users:

File renaming from the snippets directory recursive...

find . -type f -name "*.md" -print0 | while IFS= read -r -d '' file; do mv "$file" "${file%.md}.css"; done

Rgds

santochen commented 1 month ago

@fkSoc1ety , its not working for some files such as Table.md , the format had already been updated to use .md format with '```css' so need to be careful with some files if they are not working..