I played with obsidian for a few days a while ago, but it was too troublesome, so I switched to hugo. I tried writing MD directly in a text editor, but the experience wasn't great. Then I remembered that there is obsidian software, so I created this plugin.
Repository: https://github.com/fzdwx/hugo-preview-obsidian
1. Current main features#
- Open a
custom iframe
to preview hugo (via https://github.com/Ellpeck/ObsidianCustomFrames) - Start
hugo server
in the background
2. Problems encountered#
I didn't know the API (cwd) to get the directory opened in obsidian, but after raising an issue, I found out the method to get it
3. Updates#
- Support custom exec command, for example, it can be used to start a terminal. Use
ALT+F12
to invoke.- Since I use git for synchronization, I often need to open a terminal and enter a specific directory. So I need a quick way to start a terminal with the command
wezterm start --class float --cwd ${cwd}
in the current directory. - Currently, only the
cwd
variable is provided, which will be replaced with the path of the current note.
- Since I use git for synchronization, I often need to open a terminal and enter a specific directory. So I need a quick way to start a terminal with the command
- Add the ability to define the path of
hugo
. If not set, the system'shugo
command will be used.