Skip to content

Instantly share code, notes, and snippets.

@efr2et
Forked from HarshitRuwali/obsidian-docx.md
Created December 3, 2024 15:52
Show Gist options
  • Save efr2et/33dc0aea6c4f78e4f1563efed1aa68c4 to your computer and use it in GitHub Desktop.
Save efr2et/33dc0aea6c4f78e4f1563efed1aa68c4 to your computer and use it in GitHub Desktop.
Export Obsidian/Markdown notes to docx

Firstly use obsidian-export to export the Obsidian Vault/Notes to regular markdown files.

Once after exporting in the regular markdown format use the following script to convert the markdown to docx. This will require Pandoc.

pandoc md-file.md \
-o out-docx-file.docx \
--from markdown+yaml_metadata_block+raw_html \
--top-level-division=chapter

Here the images are exported successfully, no issues at all, even with relative paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment