Export Discussions in a repo as .md files. Also generate an index of posts as well as feed (rss or json).
- "Use this template" to create a repo for discussions Or create a workflow like this in an existing repo
- Edit or overwrite
script/config.jsas needed - The workflow will run automatically when a discussion is created or edited
- Install deno (developed on
1.25) - Set environment variable
GITHUB_TOKENin command line or in.envfile in project directory - Edit
script/config.jsas needed deno run --allow-net --allow-env --allow-read --allow-write scripts/fetchPosts.js
Some projects (e.g. YeungKC/Hakuba) use Github Discussions as a Content Management System for blogs. (In fact, Github Discussions works very well as a blog by itself.) Basically, the workflows of those projects are
- Export discussions to
.mdfiles - Use static site generator to build
.htmlpages
This project only does 1. Then the files can be used for any SSG or just as backup. The generated feed can be used by a feed reader (demo link).