We built a static blog with Discourse as the backend

Glad you like it :slight_smile:

  1. We use React.js both for static/server-side rendering for the blog posts, and dynamic/client-side rendering for the comments. Specifically, metalsmith supports React.js for page templates, which is how the static HTML is built. The comment box is implemented as a React component, and rendered on a DOM element when the client loads the page (this is when the comment component queries Discourse API to retrieve the comments.)
  2. We use a set of scripts to pull articles from several topics in Discourse, and write the posts along with their metadata to the posts directory of metalsmith. Then we run metalsmith to update the blog. Currently we just periodically re-pull everything. A mechanism to notify a blog update whenever a new article is posted, whether with some form of webhook or through a message queue, would be optimal, of course.
3 Likes