iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
😽

How to Convert Markdown to Google Docs Documents

に公開

More Like Converting to WORD Than Google Docs

It would be convenient to have tools like Confluence or Backlog for internal information sharing, but they are not always available.
However, GoogleDocs is usually available.

Google Docs cannot be described as easy to use, to put it mildly.
This is inevitable since it is based on MS Word.
So, I looked for a way to convert the Markdown I am used to into Google Docs, and I found it.
It is

Pandoc

A tool that converts between all kinds of document formats.
Converting Markdown to Word to support Google Docs.

There is some talk that Google Docs supports Markdown, but that is different from this case.
That is about supporting Markdown notation when writing in Google Docs.

ヾ(・ω<)ノ" 三三三● ⅱⅲ Roll, roll♪

------------------- ↓ The main topic starts here ↓-------------------

Installing Pandoc

Since it is registered in brew, use brew for Mac and Linux.
Windows can also install it using winget.

brew install pandoc
winget install --source winget --exact --id JohnMacFarlane.Pandoc

Converting Markdown to Word

Convert from Markdown to Word using the pandoc command.

pandoc -f markdown -t docx -o hello.docx hello.md

Conversion result

('ω')ノ Looks good

Uploading to Google Docs

Then, upload the created Word file to Google Docs.

Reference:
https://qiita.com/mocketech/items/4cd42ac1174dec8858e7

------------------- ↓ Afterword starts here ↓-------------------

Since it is converted with a certain level of formatting, it is easier than writing from scratch in Google Docs.
However, it does not support all of Markdown, so adjustments after conversion are necessary.

Discussion