Official news from the Hack Club Slack; built with Astro; highlighting stories that matter to hackers and makers. Run by Hack Club.
- Bun 1.2.9 or later (install)
- Node.js 18+ (optional, for compatibility)
Clone the repository and install dependencies:
git clone https://github.com/hackclub/slacker-news.git
cd slacker-news
bun installStart the development server with hot reload:
bun run devThe site will be available at http://localhost:3000 by default. Changes to content files, components, and styles rebuild automatically.
Styles are authored in src/styles/main.scss and bundled by Astro.
Posts live in src/content/posts/ as MDX files. Slack user mentions use the shared SlackMention component inside post bodies.
Create an optimized production build:
bun run buildOutput is generated in the dist/ directory.
Preview the production build locally:
bun run previewsrc/
├── components/ # Shared Astro components
├── content/ # Astro content collections
│ ├── pages/ # About and submissions pages
│ └── posts/ # MDX articles
├── data/ # Site/frontpage/changelog/acknowledgements JSON data
├── layouts/ # Page layouts (BaseLayout, PageLayout)
├── lib/ # Utilities (content loading, site config)
├── pages/ # Routes and pages
│ ├── [slug].astro # Dynamic post routes
│ ├── index.astro # Homepage
│ ├── feed.xml.js # RSS feed endpoint
│ └── ... # Section pages
└── styles/ # SCSS stylesheets
public/ # Static assets
Create new posts in src/content/posts/ with the naming format: slug.mdx
---
title: Post Title
date: 2026-04-15
excerpt: Brief description shown in listings
---
Post content in Markdown format goes here.To mention a Slack user in a post, import and use the shared component:
import SlackMention from "../../components/SlackMention.astro";
<SlackMention name="eps" id="U09Q8MLTE58" />Site configuration and frontpage data live in src/data/ JSON files:
- src/data/site.json — Site title and description
- src/data/frontpage.json — Pinned posts and sections on homepage
- src/data/changelog.json — Changelog entries
- src/data/acknowledgements_frontpage.json — Featured contributors
Slack channel references are explicit. Use SlackChannel in MDX when you want a linked channel mention:
import SlackChannel from "../../components/SlackChannel.astro";
<SlackChannel id="confessions" />Run Astro checks:
bun run checkThe project includes a Dockerfile for containerized deployment. Build and run with:
docker build -t slacker-news .
docker run --rm --name slacker-news -p 8080:80 slacker-newsThe container uses Bun for all build and runtime operations and serves the static production build.
The container listens on port 80, so map it to whatever host port you want, for example 8080:80.
Open the site over HTTP (not HTTPS):
http://localhost:8080
If you send HTTPS to this container port (for example https://localhost:8080), nginx will log binary TLS bytes and return 400 because this image serves plain HTTP only.
Quick sanity check:
curl -I http://localhost:8080If Docker says the port is already allocated, stop the existing container and rerun:
docker ps
docker stop <container_id_or_name>
docker run --rm --name slacker-news -p 8080:80 slacker-newsOpen an issue or pull request to discuss changes.
MIT