Hi Obsidian friends,
What I’m trying to do
I’d like to display config files incl. filename and their file contents in a code block, which would be a handy task for admins.
Things I have tried
As long as the config filename does not contain a file extension (separated by a dot), this already works out of the box with Obsidian core. As we can see in the following screenshot, the filename /etc/ssh/sshd_config
is displayed properly:
However, this does not work if the filename contains an extension, since the file extension gets cut off, In this particular case etc/sysctl.conf
becomes /etc/sysctl
without the .conf
extension:
I do understand I’m misusing the code block feature for something (using config filenames instead of programming languages as a title) it’s not supposed to be used for. This would a great feature anyway. I’m writing the filename above or below the code block as a workaround, although this is not ideal.
How do you guys display configfiles in Obsidian?
Best Regards
Mike