This repository contains a PowerShell-based Discord mirror that publishes selected Discord channel content into the Hugo site under /discord/.
- Pulls messages from specific allowlisted channels in the PowerShell.org Discord server.
- Applies moderation controls before any content is published.
- Generates Hugo content pages in
content/discord/. - Generates search assets in
static/discord/. - Leaves all attachments and images hosted by Discord and links back to them.
Add this repository secret:
DISCORD_BOT_TOKEN
Edit config/discord-mirror.json:
- Replace
discord.guildId - Replace each placeholder channel ID
- Tune moderation mode per channel
- Tune
minMessageAgeMinutesper channel - Optionally adjust regex filters
Publish everything in that channel after the minimum age filter.
Use for:
- announcements
- release channels
- moderator-curated channels only
Only publish messages that have the approval reaction, such as ✅.
Use for:
- help channels
- showcase channels
- Q&A highlights
Only publish messages whose content starts with a configured prefix, such as [publish].
Use for:
- moderator repost channels
- copy-edited summaries
Only publish messages authored by users with one of the configured role names.
Use for:
- staff summaries
- trusted publisher channels
Publish a message if any of the enabled approval mechanisms match.
Use for:
- flexible moderation workflows
- On
mainbranch pushes, the workflow runs the Discord exporter ifDISCORD_BOT_TOKENis present. - On pull requests or when the secret is missing, the Hugo build still runs but the Discord export step is skipped.
- Confirm the bot can read the selected channels.
- Confirm the bot can read message history.
- Confirm
https://powershell.org/discord/renders. - Confirm
https://powershell.org/discord/search/loads search results. - Confirm no private or unapproved messages appear.
- Confirm attachment links point to Discord URLs.
Do not point this at high-noise general chat and hope for the best. That is how you build a searchable landfill.