# Hoping for ability to import/sync Markdown (.md) from GitHub into new/existing courses

**URL:** <https://discuss.openedx.org/t/hoping-for-ability-to-import-sync-markdown-md-from-github-into-new-existing-courses/1369>\
**Category:** Authoring\
**Created:** [February 7, 2020, 10:00pm UTC](https://discuss.openedx.org/t/hoping-for-ability-to-import-sync-markdown-md-from-github-into-new-existing-courses/1369 "2020-02-07T22:00:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrutkowski](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@mrutkowski](https://discuss.openedx.org/u/mrutkowski)\
**Post date:** [February 7, 2020, 10:00pm UTC](https://discuss.openedx.org/t/hoping-for-ability-to-import-sync-markdown-md-from-github-into-new-existing-courses/1369/1 "2020-02-07T22:00:01Z")

</div>

Hoping there is a way to create course module content (HTML it appears) from raw GitHub markdown maintained in an open source repo. We can currently create GitBooks and similar HTML content and allow our community to maintain the raw markdown source together as features are added or change over time. Is such a function possible? Initially, just import of .md to .html would be extremely helpful and then hoping for a future “sync” we could run and pull (rebuild html) from the github source repo. Any help in this direction would be appreciated and likely save weeks of effort creating several courses initially and simplify long term maint. which can be spread to the contribs/committers on our open source project…

---

<div class="post-metadata">

**Author:** ![xitij2000](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/xitij2000/32/141_2.png) [@xitij2000](https://discuss.openedx.org/u/xitij2000)\
**Post date:** [April 2, 2020, 9:49am UTC](https://discuss.openedx.org/t/hoping-for-ability-to-import-sync-markdown-md-from-github-into-new-existing-courses/1369/2 "2020-04-02T09:49:45Z")

</div>

Hi @mrutkowski,

What you are saying it possible if you create a script that converts the current markdown structure into a course structure that can be imported into the platform.

You create a script in the language of your choice that:

- reads the current gitbook/markdown structure and extracts a course structure out of it with sections, subsections, units and content blocks.
- Each block of HTML content can be put in an HTML block.
- The HTML content can be rendered using a markdown-to-html library
- Internal links can be modified to follow the URL structure of edx-platform.

Note that the internal link modification could be implemented as a plugin to the markdown converter. Python-Markdown for instance [supports such plugins](https://python-markdown.github.io/extensions/api/). GitBook itself might support the creation of plugins that simplify this, I am not familiar with it but it does seem to support plugins.

This is likely to take a bit of effort but will eventually allow automating the GitBook/markdown to course conversion process. You can read more about course imports/exports [here](https://edx.readthedocs.io/projects/edx-partner-course-staff/en/latest/releasing_course/export_import_course.html) and can see a sample XML importable demo course [here](https://github.com/edx/edx-demo-course).

---

<div class="post-metadata">

**Author:** ![valpierre](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/valpierre/32/1357_2.png) [@valpierre](https://discuss.openedx.org/u/valpierre)\
**Post date:** [August 5, 2020, 9:32pm UTC](https://discuss.openedx.org/t/hoping-for-ability-to-import-sync-markdown-md-from-github-into-new-existing-courses/1369/3 "2020-08-05T21:32:53Z")

</div>

Hi @mrutkowski @xitij2000, I’m curious to hear if you’ve implemented such a GitBook/markdown to course converter? it sounds like this approach could speed up course authoring in some cases and also provide versioning of the course content. Thanks!

---

<div class="post-metadata">

**Author:** ![xitij2000](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/xitij2000/32/141_2.png) [@xitij2000](https://discuss.openedx.org/u/xitij2000)\
**Post date:** [August 6, 2020, 9:23am UTC](https://discuss.openedx.org/t/hoping-for-ability-to-import-sync-markdown-md-from-github-into-new-existing-courses/1369/4 "2020-08-06T09:23:16Z")

</div>

We (OpenCraft) have not created any such script, but would be happy to help with that.

For versioning of course content, it is possible to store the course structure in git, as you can see here for the demo course by edX: [https://github.com/edx/edx-demo-course/](https://github.com/edx/edx-demo-course/)

You can also modify the course structure in studio, and export it after modification to keep a history.

---

<div class="post-metadata">

**Author:** ![valpierre](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/valpierre/32/1357_2.png) [@valpierre](https://discuss.openedx.org/u/valpierre)\
**Post date:** [August 7, 2020, 12:04am UTC](https://discuss.openedx.org/t/hoping-for-ability-to-import-sync-markdown-md-from-github-into-new-existing-courses/1369/5 "2020-08-07T00:04:29Z")

</div>

Thanks for your reply @xitij2000!

---

<div class="post-metadata">

**Author:** ![matthew-brett](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/matthew-brett/32/3023_2.png) [@matthew-brett](https://discuss.openedx.org/u/matthew-brett)\
**Post date:** [November 13, 2021, 4:53pm UTC](https://discuss.openedx.org/t/hoping-for-ability-to-import-sync-markdown-md-from-github-into-new-existing-courses/1369/6 "2021-11-13T16:53:59Z")

</div>

This is also something that would be extremely valuable to me and our team - we are very used to using Git / Github for collaboration - and having to do editing and review in the GUI will make things much harder.

I wonder whether it’s worth gathering a set of people who interested in this feature, to see what we can do?

---

<div class="post-metadata">

**Author:** ![mlebeda](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/mlebeda/32/3227_2.png) [@mlebeda](https://discuss.openedx.org/u/mlebeda)\
**Post date:** [February 1, 2022, 9:31am UTC](https://discuss.openedx.org/t/hoping-for-ability-to-import-sync-markdown-md-from-github-into-new-existing-courses/1369/7 "2022-02-01T09:31:08Z")

</div>

Same here. I agree, integrating with GIT would be the perfect move. I can imagine two different situations:

- Edit a course in edX and the changes are pushed to GIT
- Make a change in GIT and after the commit it updates the course on the edX server

---

<div class="post-metadata">

**Author:** ![sambapete](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/sambapete/32/4100_2.png) [@sambapete](https://discuss.openedx.org/u/sambapete)\
**Post date:** [February 1, 2022, 5:33pm UTC](https://discuss.openedx.org/t/hoping-for-ability-to-import-sync-markdown-md-from-github-into-new-existing-courses/1369/8 "2022-02-01T17:33:44Z")

</div>

I don’t know if this is what you are looking for, but there used to be something from MIT that might fit what you are looking for?

> **[GitHub - mitodl/gitreload: gitreload is a Flask/WSGI application for...](https://github.com/mitodl/gitreload)**
>
> gitreload is a Flask/WSGI application for responding to github triggers asynchronously. Out of the box it is primarily intended for use with the edx-platform but could be used for general updating...

Maybe @pdpinch or someone else from MIT can tell you more about it?

---

<div class="post-metadata">

**Author:** ![arbrandes](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/arbrandes/32/158_2.png) [@arbrandes](https://discuss.openedx.org/u/arbrandes)\
**Post date:** [February 2, 2022, 1:34pm UTC](https://discuss.openedx.org/t/hoping-for-ability-to-import-sync-markdown-md-from-github-into-new-existing-courses/1369/9 "2022-02-02T13:34:29Z")

</div>

In a previous incarnation I helped create [olx-utils](https://github.com/hastexo/olx-utils), and one of the design goals was precisely to allow creating course content in markdown and storing the source in git. It also makes reusing blocks possible via templates. And IIRC, it’s also possible to push the course directly into an Open edX instance from the command line.
