This repository contains a Go program that allows converting and copying contents from a custom Obsidian directory to Hugo-compatible content. Obsidian is a note-taking app that utilizes Markdown as its file format. Hugo, on the other hand, is a static site generator that allows creating websites from Markdown content.
Óscar M. Lage
ad9b786f45
If frontmatter doesn't exist in the sourfe file, add it automatically so you don't have to remember it. |
||
---|---|---|
go.mod | ||
go.sum | ||
main.go | ||
obs2hugo.ini.sample | ||
README.md |
obs2hugo
This repository contains a Go program that allows converting and copying contents from a custom Obsidian directory to Hugo-compatible content. Obsidian is a note-taking app that utilizes Markdown as its file format. Hugo, on the other hand, is a static site generator that allows creating websites from Markdown content.
Key Features
- Content Conversion: The program converts Markdown files from the Obsidian directory to Hugo-compatible Markdown files.
- Image Copying: It copies the images included in Markdown files to a specific directory within Hugo's directory structure.
- Configuration File Generation: It creates additional configuration files necessary for Hugo to correctly process the content.
Configure
Configuration runs in ~/.config/obs2hugo/obs2hugo.ini
or ~/.config/obs2hugo.ini
, something like this:
watcher_dir = /Users/johndoe/vaults/obsidian/posts-hugo
hugo_dir = /Users/johndoe/code/hugo/src/content/posts
Usage
- Clone the repository to your local machine.
- Run the program providing the path to the Obsidian directory and the destination directory for Hugo.
- The program will convert Markdown files, copy images, and generate necessary configuration files.
$ go run main.go
Requirements
- Go installed on your system.
- Have a Hugo project set up and ready to receive content.
- Have an Obsidian vault on your system.
Contribution
Contributions are welcome! If you find bugs or wish to improve the program, feel free to open an issue or submit a pull request.