[go: up one dir, main page]

Let’s talk about the Future of Jamstack — Join us

Analog

1586 stars
128 forks
43 issues
Home page
https://analogjs.org/
Repository
analogjs/analog
Twitter
@analogjs
Language:
TypeScript
License:
MIT
Templates:
Angular

Analog is a fullstack meta-framework for building applications and websites with Angular, powered by Vite.

Features

  • Hybrid SSR/SSG support
  • File-based routing
  • Support for using markdown as content routes
  • Support for API/server routes

Configuration

SSR and SSG can be enabled in the vite.config.ts using the analog() plugin.

import { defineConfig } from 'vite';
import analog from '@analogjs/platform';

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => ({
  plugins: [analog({
    ssr: true,    // enables server side rendering
    static: true, // enables static site generation
    prerender: {  // configure routes to be rendered at build time
      routes: async () => [
        '/',
        '/about',
        '/blog',
        '/blog/posts/2023-02-01-my-first-post',
      ],
    },
  })],
}));

Find more static site generators.