Blocks Template Svelte screenshot

Blocks Template Svelte

Author Avatar Theme by Githubnext
Updated: 16 Feb 2023
9 Stars

make GitHub Blocks with Svelte!

Categories

Overview

The GitHub Blocks Template is a starter template for building custom Blocks using GitHub’s Blocks app. This template is specifically for the Svelte version of Blocks. Please note that currently, you need to be flagged into the GitHub Blocks Technical Preview in order to develop blocks, and there is no offline development mode available at this time.

Features

  • Easy to use: Use this template as a starting point for building your own Blocks using GitHub’s Blocks app.
  • Hot reloading: The dev server supports hot reloading, allowing you to make changes to your Blocks and see the results in real-time.
  • Svelte components: Blocks in this template are developed as Svelte components, ensuring a well-defined contract with their surroundings.
  • TypeScript: Blocks are developed in TypeScript, providing type safety and better code organization.
  • Bundled with Vite: The template makes use of Vite for bundling the Blocks.

Installation

  1. Fork this repository by clicking on the “Use this template” button above.
  2. Clone your forked repository to your local machine.
  3. Open your terminal and navigate to the cloned repository.
  4. Run the command yarn start or npm start to start the development server.
  5. Visit localhost:4000 in your browser. If you are using Safari or another browser that doesn’t permit calling http URLs from an https page, run yarn start-https and visit https://localhost:4000 instead.

Summary

The GitHub Blocks Template provides a convenient starting point for building custom Blocks using the GitHub Blocks app. With features such as hot reloading, Svelte components, TypeScript, and Vite bundling, developers can quickly iterate and test their Blocks. Although access to the GitHub Blocks Technical Preview is currently necessary, this template offers an efficient way to get started with building Blocks. For more information, tutorials, documentation, and examples, developers can visit the GitHub Next repository and join the Discord community.