/solid-site

Primary LanguageTypeScript

Solid logo

Solid Website

This is the source code for the solid website: https://solidjs.com/

Getting started

The website is built with Solid. In order to get going, you should be familiar with the core API of Solid and how it works on the surface.

Prerequisites

Install

  1. Clone the project locally: git clone https://github.com/solidjs/solid-site
  2. Change directory into your local copy: cd solid-site
  3. Install the dependencies: yarn install

Available commands

  • yarn install: Install the dependencies
  • yarn dev: Start the dev server
  • yarn build: Build the project
  • yarn format: Format the whole project with prettier
  • yarn deploy:dev: Helper method to deploy to dev
  • yarn deploy:prod: Helper method to deploy to prod
  • yarn fetch:releases: Fetch the latest releases as MD and transforms them to JSON (see below for more)

Additional information

How do I update the documentation?

First you need to generate a github token and add it to a .env file at the root of the project in the GITHUB_TOKEN variable.

You can copy, paste and rename the .env.example at the root of the project to get going faster.

There's a fetchReleases.ts script in the scripts folder .

You can use it by issuing the command yarn fetch:releases which will download all the releases's markdown files and convert them into json files in the public/api folder. These files will be used as json endpoints to fetch the documentation from the client.

How do I change the highlight theme?

The script mentioned above uses shiki to process the code which in turn uses VSCode tokens. Therefore any VSCode theme can be applied.

All you have to do is retrieve the JSON file describing your favorite theme (see ./scripts/github-light.json for an example), paste it into the scripts folder and refer to it in the fetchReleases.ts file around line 35: const theme = await loadTheme(resolve(__dirname, 'your-theme.json'));.

Credits

Contributions

We are actively accepting contributions to improve the Solid website. We accept PRs that are well-structured, have formatting applied and follow the general structure of the site. If you have any questions, want to report a bug or a general concern, feel free to reach us on GitHub Issues or Discord.

Sponsors

Thank you to our generous and helpful sponsors. If you're interested in sponsoring Solid, reach out to us on Discord.