--- import Layout from "../../layouts/Layout.astro"; import { getCollection } from "astro:content"; import { ChevronRight, Shield } from "@lucide/astro"; import { getCategory } from "../../utils/notes"; const notes = await getCollection("notes"); const sortedNotes = notes.sort( (a, b) => b.data.publishDate.getTime() - a.data.publishDate.getTime(), ); const categories = [...new Set(notes.map(getCategory))].sort(); const searchIndex = Object.fromEntries( sortedNotes.map((n) => [ n.id, [n.data.title, n.data.description, n.body ?? ""].join(" ").toLowerCase(), ]), ); ---

Notes

Reference sheets on cybersecurity tools and techniques.

use #tag to filter by tag

{ categories.map((cat) => { const catNotes = sortedNotes.filter((n) => getCategory(n) === cat); return (

/ {cat}

{catNotes.length} note{catNotes.length !== 1 ? "s" : ""}
); }) }

{notes.length} note{ notes.length !== 1 ? "s" : "" } total