Skip to content

Instantly share code, notes, and snippets.

@HarshitRuwali
Last active December 3, 2024 15:52
Show Gist options
  • Save HarshitRuwali/fa0ab646e8c5cc4163e13b92305586ca to your computer and use it in GitHub Desktop.
Save HarshitRuwali/fa0ab646e8c5cc4163e13b92305586ca 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