The RedSec learning site: a free, open learning platform for offensive security. No accounts, no trackers. Built with Astro + MDX.
This is the
learnsite. The marketing/landing site (redsec.cc) lives on themainbranch ofredsecc/website. Deploy this one from its own repo (e.g.redsecc/learn) since GitHub Pages serves one site per repo.
Learning content is organized into sections, each a stack of MDX lessons, rendered with a persistent left sidebar, an "on this page" TOC, and prev/next navigation.
- Section metadata + ordering:
src/lib/learn.ts(SECTIONS). - Content:
src/content/learn/<section>/<page>.mdx. - Routes:
/(landing),/<section>(section index),/<section>/<page>(lesson). - Bulk generated lessons:
npm run generate:learn.
- Drop an MDX file in
src/content/learn/<section>/with frontmatter:--- title: My page order: 2 summary: One-line description. level: intro kind: tutorial duration: 20 min ---
- It appears in that section's sidebar and index automatically (ordered by
order), with prev/next wired across the whole learning library.
Add an entry to SECTIONS in src/lib/learn.ts, then create
src/content/learn/<new-section>/ with pages.
Use import Callout from '../../../components/Callout.astro' for note/tip/warning
callouts; fenced code blocks get copy buttons + terminal frames via Expressive
Code.
npm install
npm run dev # http://localhost:4321
npm run build # static output → ./dist
npm run previewastro.config.mjs sets site: https://learn.redsec.cc; public/CNAME pins the
domain; .github/workflows/deploy.yml builds + publishes via GitHub Pages.
- Push this branch as
mainto its own repo (redsecc/learn). - Settings → Pages → Source: GitHub Actions.
- Settings → Pages → Custom domain:
learn.redsec.cc, and add DNS:CNAME learn → redsecc.github.io.
MIT. For authorized testing and education only.