fzdwx

fzdwx

Hello , https://github.com/fzdwx

Previewing Hugo in Obsidian

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#

  1. Open a custom iframe to preview hugo (via https://github.com/Ellpeck/ObsidianCustomFrames)
  2. Start hugo server in the background

2. Problems encountered#

  1. 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#

  1. Support custom exec command, for example, it can be used to start a terminal. Use ALT+F12 to invoke.
    1. 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.
    2. Currently, only the cwd variable is provided, which will be replaced with the path of the current note.
  2. Add the ability to define the path of hugo. If not set, the system's hugo command will be used.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.