Skip to content
@from-static

static

built on GitHub Pages, static enables the creation of basic microsites targeting a variety of use cases.

static

Overview

  • static enables the creation of ready-to-serve web applications and websites, targeting a variety of use cases.
  • static is more of an application design approach rather than a framework or library.
  • A static.json file references a generator package, which is responsible for processing the file and producing a static site (i.e., a static site generator).
  • The data member of the static.json file acts as a data source for a static site generator.
  • Generated assets produced by the generator are then hosted on GitHub Pages – that's it.

From a downstream consumer perspective, the static.json file acts as a build manifest, configuration file, and even content management system depending on the target generator's usage.


Questions/Feedback? Open an Issue.


How it Works

Using a static.json file, our reusable GitHub Action workflows automatically deploy a single-page application to GitHub Pages based on your configuration.

Our first-class applications ("generators") translate your static.json to a fully functional microsite built on Next.js.

Start with our minimum required configuration, then rely on the automatic deployments based on changes to your static.json file to enhance functionality.

Get Started

  1. Create a new repository from one of our templates.
  2. Enable GitHub Actions as your GitHub Pages Source in your new repository.
  3. Edit the static.json
  4. Wait for the GitHub Action to run...
  5. View your generated microsite at your repository's GitHub Pages URL.

That's it! Any changes you make to static.json will automatically redeploy your site.

static.json

A static.json file acts as a configuration object for an application. The most important property of this file is: _static.

_static

Instructs our GitHub Action on how to build your application.

{
  "_static": {
    "generator": "@from-static/static-resume",
  },
}
  • generator should reference a static site generator (usually a Next.js application) that will process your static.json file and build the resulting application.
    • The generator should match the name of a package found in the configured package ecosystem (see below).
    • In most cases, this will be a first-class application:
  • ecosystem is an optional property that specifies a package registry for the generator package. If not specified, the default registry (npm) is used.
    • Supported Values: npm

data

The data member of the static.json file acts as a data source for a static site generator.

{
  "data": {
    "version": "1.0.0",
    "attributes": {
      // Generator-defined properties
    }
  }
}
  • version – A string representing the version of the data object. The generator can use this value to identify the expected shape of attributes.
  • attributes – An object containing data the generator will use to generate the application.

Additional Properties (data.attributes)

A generator dictates all additional properties in data.attributes

While there are some properties we suggest all applications treat the same, we do not currently enforce this standard outside of our first-class applications.

Features + Roadmap

Pinned Loading

  1. template-resume template-resume Public template

    An example of resume built from a static.json file.

  2. actions actions Public

    Reusable GitHub Actions and workflows that can be used to implement @from-static application design patterns.

    JavaScript

Repositories

Showing 8 of 8 repositories
  • cli Public
    from-static/cli’s past year of commit activity
    JavaScript 0 MIT 0 0 1 Updated Oct 10, 2024
  • actions Public

    Reusable GitHub Actions and workflows that can be used to implement @from-static application design patterns.

    from-static/actions’s past year of commit activity
    JavaScript 0 0 0 1 Updated Oct 3, 2024
  • generator-hello-world Public

    A basic example of a generator in the @from-static Application Design Approach.

    from-static/generator-hello-world’s past year of commit activity
    JavaScript 0 0 0 0 Updated Jul 16, 2024
  • template-hello-world Public

    A template that references @from-static/generator-hello-world

    from-static/template-hello-world’s past year of commit activity
    0 0 0 0 Updated Jul 16, 2024
  • .github Public
    from-static/.github’s past year of commit activity
    0 0 0 0 Updated Jun 3, 2024
  • template-resume Public template

    An example of resume built from a static.json file.

    from-static/template-resume’s past year of commit activity
    0 0 0 0 Updated Mar 22, 2024
  • generator-resume Public

    A Next.js application adhering to @from-static application patterns to render a basic resume.

    from-static/generator-resume’s past year of commit activity
    TypeScript 0 0 0 0 Updated Mar 22, 2024
  • github-action Public archive
    from-static/github-action’s past year of commit activity
    TypeScript 0 MIT 0 0 8 Updated Mar 11, 2024

Top languages

Loading…

Most used topics

Loading…