Embedding external markdown

I would use the discourse_api gem 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 is useful, as well as the examples directory in the gem.

2 Likes