# Embedding external markdown

**URL:** <https://meta.discourse.org/t/embedding-external-markdown/118601>\
**Category:** Feature\
**Created:** [May 24, 2019, 11:08am UTC](https://meta.discourse.org/t/embedding-external-markdown/118601 "2019-05-24T11:08:30Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)\
**Post date:** [May 24, 2019, 11:08am UTC](https://meta.discourse.org/t/embedding-external-markdown/118601/1 "2019-05-24T11:08:30Z")

</div>

## Use Case

1. A software project maintains its documentation in a Git repository.
2. The master version of a file is the canonical version of this documentation
3. We want to use Discourse to facilitate collaborative edition and criticism of the living document

## Approach

1. Copy the link to the raw markdown file from the Git repository, e.g., `https://git.example/org/documentation/raw/master/INSTALL.md` in the new topic title field
2. Discourse retrieves title and markdown content that becomes topic content
3. Discourse watches for changes and rebuilds HTML when needed, maintaining versions

Then the readers always have access to the latest markdown version in Git, while editors can use the power of Discourse to discuss changes.

## Down the road

When ActivityPub support is added to Discourse and Git (via ForgeFed), this type of integration can be expanded to include cross-application document synchronization, without the need to know about Git.

The first step is to “onebox” external markdown. This would as well allow to integrate with a static blog directly from it’s Git repository, consolidating the publication process (i.e., by generating topics matching static pages at publication time)

* * *

What current solutions (API calls?) exist to do this besides embedding comments on the static page? How far from embed.js would that lead us?

---

_[View the full topic](https://meta.discourse.org/t/embedding-external-markdown/118601)._
