spaceship Svelte Themes

Spaceship

Spaceship is a high-performance, premium blog and portfolio template built with Astro 5, Svelte 5 Runes, and Tailwind CSS 4.

Spaceship ๐Ÿš€

Spaceship is a high-performance, premium blog and portfolio template built with Astro 5, Svelte 5 Runes, and Tailwind CSS 4. It is designed for developers and designers who want a modern, ultra-fast, and SEO-optimized web experience.

โœจ Features

  • ๐Ÿš€ High Performance: Built with Astro for lightning-fast speeds and minimal JavaScript.
  • โšก Optimizations:
    • Partytown: Google Analytics is offloaded to web workers.
    • Loading Indicator: Smooth progress bar for better navigation UX.
  • ๐ŸŽจ Modern Design: Clean aesthetics with dark mode support and fluid typography.
  • Svelte 5 Runes: Leveraging the latest Svelte reactivity system ($state, $derived, $props).
  • Tailwind CSS 4: Next-gen CSS framework for high performance and zero-runtime.
  • ๐Ÿ“ Interactive Blog:
    • MDX Support: Embed Svelte components directly in your posts.
    • Series Support: Group related posts into a series with automatic navigation.
    • Draft Mode: Hide draft posts in production, visible in development.
    • Publication Date Filtering: Schedule posts with future dates.
    • Customizable CTA: Add call-to-action blocks at the end of posts.
    • Per-Post Controls: Toggle CTA and comments individually per post.
  • ๐Ÿ’ฌ Comments System:
    • GitHub Discussions: Powered by Giscus for privacy-friendly comments.
    • Fully Customizable: Configure theme, language, and behavior.
    • Per-Post Toggle: Enable/disable comments on individual posts.
  • ๐Ÿ” Advanced Search: Fast, client-side search across all post titles and descriptions.
  • ๐Ÿ“Š Robust SEO:
    • JSON-LD Support: Automatic structured data for WebSite, BlogPosting, Person, and Breadcrumbs.
    • Canonical URLs: Built-in support for canonical links and robots meta tags.
    • Dynamic OG Images: Automatically generated social preview images for every post.
    • RSS Feed & Sitemap: Ready-to-use RSS and sitemap generation.
  • โœ๏ธ Enhanced Markdown:
    • Shiki Syntax Highlighting: Includes line highlights, diffs, and word highlighting.
    • Auto-generated TOC: Interactive table of contents with scroll spying.
    • Heading Anchor Links: Clickable links for sharing specific sections.
    • Mermaid Diagrams: Support for flowcharts and diagrams directly in markdown.
    • Emoji Support: Native emoji shortcodes (:rocket:, etc.).
    • Multi-language Support: Link posts to their translated versions (e.g. English <-> Russian) with automatic flag indicators.
  • ๐Ÿงน Modular Architecture: Well-organized components and content collections.

๐Ÿ› ๏ธ Tech Stack

  • Framework: Astro 5
  • UI Components: Svelte 5
  • Styling: Tailwind CSS 4
  • Content: Markdown & MDX
  • Optimization: Sharp, Shiki, Partytown
  • Icons: Lucide & custom SVGs

๐Ÿš€ Getting Started

Prerequisites

  • Node.js (LTS recommended)
  • pnpm (This project is configured for pnpm)

Installation

  1. Clone the repository:

    git clone https://github.com/alec-c4/spaceship.git
    cd spaceship
    
  2. Install dependencies:

    pnpm install
    
  3. Start the development server:

    pnpm dev
    
  4. Build for production:

    pnpm build
    

๐Ÿ“‚ Project Structure

Spaceship uses an "Updatable Content" architecture. All your personal data is separated from the core template code, allowing you to update the engine easily.

/
โ”œโ”€โ”€ site/              # ๐ŸŸข YOUR DATA (Keep this!)
โ”‚   โ”œโ”€โ”€ assets/        # Your personal images (favicon, profile)
โ”‚   โ”œโ”€โ”€ content/       # Your posts, projects, and bio
โ”‚   โ””โ”€โ”€ config.ts      # Your site configuration
โ”œโ”€โ”€ src/               # โš™๏ธ Core Engine (Updateable)
โ”‚   โ”œโ”€โ”€ components/    # UI components
โ”‚   โ”œโ”€โ”€ layouts/       # Page templates
โ”‚   โ”œโ”€โ”€ lib/           # Logic and utilities
โ”‚   โ””โ”€โ”€ pages/         # Routes
โ”œโ”€โ”€ public/            # Static files
โ”œโ”€โ”€ astro.config.mjs   # Astro settings
โ””โ”€โ”€ package.json

๐Ÿ“– Content Management

โœ๏ธ Adding Content

Manage your content in site/content/.

  • Posts: site/content/posts/
  • Projects: site/content/projects/
  • About: site/content/about/index.md (Your CV/Bio)

๐Ÿ“ Creating Content

Spaceship includes tools to make content creation faster:

  • VS Code Snippets: Open any markdown file and type post, project, or appearance then press Tab to generate the frontmatter automatically.
  • Templates: Reference files named _template.md are available in each content folder as examples.
  • Dev Container: A pre-configured development environment is included (.devcontainer/) with all necessary extensions and tools.

๐Ÿ”ง Configuration

All site-wide settings are in site/config.ts:

export const SITE = {
  author: 'Your Name',
  title: 'Your Blog',
  desc: 'Your description',
  website: 'https://yourdomain.com',

  // Homepage configuration
  featuredPostsCount: 1, // Number of featured posts to show
  latestPostsCount: 3, // Number of latest posts to show

  // CTA block configuration
  cta: {
    enabled: true,
    filePath: 'site/cta.md', // Markdown file with CTA content
  },

  // Comments configuration (GitHub Discussions via Giscus)
  comments: {
    enabled: false, // Set to true after configuring
    repo: 'username/repo',
    repoId: '', // Get from https://giscus.app
    categoryId: '', // Get from https://giscus.app
    // ... more options
  },

  // Analytics
  googleAnalyticsId: 'G-XXXXXXXXXX', // Offloaded via Partytown
};

๐Ÿ“š Documentation

Comprehensive guides are available as blog posts in your installation:

  • Creating Posts: site/content/posts/your-post.md
  • Adding Projects: site/content/projects/your-project.md
  • Customizing CTA: Edit site/cta.md
  • Configuring Comments: Get settings from giscus.app
  • Analytics: Add your GA4 ID to site/config.ts

โ˜๏ธ Deployment

Spaceship is a static site by default (SSG), but can be easily converted to SSR using Astro Adapters.

You can deploy to Vercel, Netlify, Cloudflare Pages, or GitHub Pages without any extra configuration. Just push your code.

SSR & Advanced Features

If you need dynamic features, install the appropriate adapter:

  • Vercel: pnpm astro add vercel
  • Netlify: pnpm astro add netlify
  • Cloudflare: pnpm astro add cloudflare
  • Node.js: pnpm astro add node (For VPS/Docker)

More details: Astro Deployment Guide

๏ฟฝ Updating

Spaceship is designed with a "core vs content" separation. This makes updating to new versions straightforward:

  1. Keep your site/ folder: This contains all your posts, projects, assets, and configuration.
  2. Download the latest version of Spaceship.
  3. Replace the core files in your project with the new ones:
    • src/ (The engine)
    • public/ (Static assets shell)
    • astro.config.mjs (Main configuration)
    • package.json & pnpm-lock.yaml (Dependencies)
    • tsconfig.json (Tooling config)
  4. Run pnpm install to update dependencies.
  5. Verify: Your content in site/ will automatically be picked up by the new engine.

๏ฟฝ๐Ÿ“œ License

MIT License ยฉ Alexey Poimtsev

Top categories

Loading Svelte Themes