# 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:** 6

<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:** [February 23, 2020, 3:25pm UTC](https://meta.discourse.org/t/embedding-external-markdown/118601/6 "2020-02-23T15:25:42Z")

</div>

I would use the [discourse\_api gem](https://github.com/discourse/discourse_api) for this:

1. Set a crontab to watch wanted topics (and posts) for changes
2. Whenever a change happens, download the latest version to a Git repository (e.g., a static site) and commit that. You would download either the original Markdown version of the post (`post_id.md`) or the cooked version for HTML (but then you’d have to rewrite the URI to ensure all are absolute and thus contain the protocol and hostname of the Discourse instance.)

[API documentation](https://docs.discourse.org/) is useful, as well as the `examples` directory in the gem.

---

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