Search code examples
javascriptreactjsmarkdowndocusaurusmdxjs

How to load external (remote) Markdown files into Docusaurus?


Seems like a very basic question, but I could not find an answer in SO, docs or GH issues:

We are transferring an existing doc site to Docusaurus V2. Many of our .md files are stored across different GH repos (=different URLs), and we'd like to link and load them inDocusaurus. In our current setup, we achive that using an Axios GET request to each md remote URL and use ReactMarkdown to load its content.

In Docusaurus, is there a way to load remote md by simply providing their URL?


Solution

  • Using https://github.com/rdilweb/docusaurus-plugin-remote-content

    On Docusaurus v2 using a plugin that downloads content from remote sources.

    With this plugin, you can write the Markdown for your docs and blog somewhere else, and use them on your Docusaurus site.