# A basic Discourse archival tool

**URL:** https://meta.discourse.org/t/a-basic-discourse-archival-tool/62614
**Category:** Development
**Created:** [May 12, 2017, 8:20pm UTC](https://meta.discourse.org/t/a-basic-discourse-archival-tool/62614 "2017-05-12T20:20:12Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![mcmcclur](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcmcclur/32/115456_2.png) [@mcmcclur](https://meta.discourse.org/u/mcmcclur)
#### Post date: [May 12, 2017, 8:20pm UTC](https://meta.discourse.org/t/a-basic-discourse-archival-tool/62614/1 "2017-05-12T20:20:12Z")

</div>

**Archival tool updated with Codex May 2026**

It seems that it’s pretty tricky to save an entire discourse site to a static version. According to [this post](https://meta.discourse.org/t/archive-an-old-forum-in-place-to-start-a-new-discourse-forum/13433/10) by Jeff Atwood, it’s “much harder than you’d think”. It doesn’t appear that this is a priority for the Discourse team, either, which is perfectly understandable.

For my purposes, though, I found that I really needed some way to generate _basic, static HTML_ versions of my Discourse sites. I’ve been using Discourse for a couple of years now as a discussion board when teaching my college math classes so, every few months, I retire one or two sites and start one or two more. Obviously, the discussions on the retiring sites have value so I really needed some way to save them. Ultimately, I figured I’d build my own tool.

The basic idea is simple: Use the Discourse API to crawl the site, grab the cooked version of each post, and massage that into HTML. The tool focuses largely on my own needs as a college math professor who uses small Discourse forums to support my math classes. As such, mathematical content, like f(x)=e^{-x^2}, should be automatically typeset with MathJax V4 and fenced code blocks tagged as `sage` are translated to active Sage Cells.

If interested, you can view

- A small [portion of Discourse Meta](https://marksmath.org/share/discourse/),
- The [forum for my Math for Machine Learning class](https://marksmath.org/classes/Spring2026MML/discourse/), and/or
- The [GitHub Repository](https://github.com/mcmcclur/ArchiveDiscourse/).

## Note

The update of the archival tool was performed largely with Codex.

---

_[View the full topic](https://meta.discourse.org/t/a-basic-discourse-archival-tool/62614)._
