Skip to content

Latest commit

Β 

History

History
123 lines (91 loc) Β· 3.92 KB

File metadata and controls

123 lines (91 loc) Β· 3.92 KB

Hackheim Web

The official website for Hackheim. This site serves as both a public-facing website and documentation platform, built with Astro and Starlight.

πŸ—οΈ Tech Stack

  • Framework: Astro with Starlight for documentation
  • UI Components: Svelte
  • Styling: TailwindCSS
  • Content: Markdown/MDX with content collections
  • Deployment: Cloudflare Pages
  • Package Manager: pnpm

πŸš€ Getting Started

Prerequisites

  • Node.js (version 18 or higher)
  • pnpm (recommended package manager)

Installation

  1. Clone the repository:

    git clone https://github.com/hackheim/hackheimweb.git
    cd hackheim-web
  2. Install dependencies:

    pnpm install
  3. Start the development server:

    pnpm dev

The site will be available at http://localhost:4321

πŸ“ Project Structure

.
β”œβ”€β”€ public/                 # Static assets (favicons, images, etc.)
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/            # Build-time assets (logos, etc.)
β”‚   β”œβ”€β”€ components/        # Reusable components
β”‚   β”‚   └── starlight/     # Custom Starlight components
β”‚   β”œβ”€β”€ content/           # Content collections
β”‚   β”‚   β”œβ”€β”€ docs/          # Documentation pages
β”‚   β”‚   β”œβ”€β”€ news/          # News articles
β”‚   β”‚   β”œβ”€β”€ pages/         # General pages
β”‚   β”‚   └── projects/      # Project showcases
β”‚   β”œβ”€β”€ layouts/           # Page layouts
β”‚   β”œβ”€β”€ pages/             # Route pages
β”‚   β”‚   β”œβ”€β”€ index.astro    # Homepage
β”‚   β”‚   β”œβ”€β”€ news/          # News listing pages
β”‚   β”‚   └── projects/      # Project listing pages
β”‚   β”œβ”€β”€ styles/            # Global styles
β”‚   └── content.config.ts  # Content collection schemas
β”œβ”€β”€ astro.config.mjs       # Astro configuration
β”œβ”€β”€ wrangler.toml          # Cloudflare deployment config
└── package.json

πŸ“ Content Management

Content is organized into collections defined in src/content.config.ts:

  • docs: Documentation pages (Starlight integration)
  • news: News articles and announcements
  • projects: Project showcases and tutorials
  • pages: General website pages

Adding Content

  1. Documentation: Add .md files to src/content/docs/
  2. News: Add .md files to src/content/news/ with frontmatter
  3. Projects: Add .md files to src/content/projects/ with required schema
  4. Pages: Add .md files to src/content/pages/

πŸ› οΈ Development Commands

Command Description
pnpm dev Start development server
pnpm build Build for production
pnpm preview Preview production build locally
pnpm devdeploy Build and deploy to Cloudflare
pnpm astro ... Run Astro CLI commands

🌍 Internationalization

The site supports both Norwegian (default) and English:

  • Default locale: Norwegian (nb-NO)
  • Alternate locale: English (en)

Content can be localized by adding language suffixes to files or using Starlight's built-in i18n features.

πŸš€ Deployment

The site is deployed to Cloudflare Pages using Wrangler:

  1. Development deployment: pnpm devdeploy
  2. Production: Automatic deployment via GitHub integration

Configuration is managed through wrangler.toml.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test locally with pnpm dev
  5. Build to ensure no errors: pnpm build
  6. Submit a pull request

πŸ“ž Contact