Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mnjm/joplin2hugo
A script to convert Joplin Markdown exports to Hugo site generator as content.
https://github.com/mnjm/joplin2hugo
hugo joplin
Last synced: about 1 month ago
JSON representation
A script to convert Joplin Markdown exports to Hugo site generator as content.
- Host: GitHub
- URL: https://github.com/mnjm/joplin2hugo
- Owner: mnjm
- License: mit
- Created: 2024-02-20T12:14:09.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-02-22T13:15:24.000Z (12 months ago)
- Last Synced: 2024-11-09T11:05:51.082Z (3 months ago)
- Topics: hugo, joplin
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Joplin to Hugo
This is a simple python converter script to convert Joplin Markdown exports to Hugo site generator as content.
Works with Joplin's Markdown save.
## How to
```
usage: python3 joplin2hugo.py [-h] [--hugo_base_dir HUGO_BASE_DIR] [--debug] joplin_in content_pathThis is a simple python converter script to convert Joplin Markdown exports to Hugo site generator as content.
positional arguments:
joplin_in Directory where joplin markdown is saved
content_path Hugo content base path used in `hugo new content` command, content will be named by the scriptoptions:
-h, --help show this help message and exit
--hugo_base_dir HUGO_BASE_DIR
Hugo site base directory (default: ..)
--debug debug_flag (default: False)
```### Intended use
This repo is intended to be used as submodule to your hugo git repo but straight cloning/download should also work.
You can add it as submodule using `git submodule add https://github.com/mnjm/joplin2hugo.git`### Example
`python3 joplin2hugo.py ~/joplin-save-dir posts/ --hugo_base_dir ~/hugo_site`
Assuming there is a Joplin markdown file named `An Another Blog.md` saved in `~/joplin-save-dir/Blog` and its associated images in `~/joplin-save-dir/_resources`. Upon executing the above command, the content will be saved in `~/hugo_site/content/posts/An-Another-Blog/index.md` with images in the same directory, and URLs adjusted.