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
- Clone the project locally:
git clone https://github.com/solidjs/solid-site
- Change directory into your local copy:
cd solid-site
- Install the dependencies:
yarn install
Available commands
yarn install
: Install the dependenciesyarn dev
: Start the dev serveryarn build
: Build the projectyarn format
: Format the whole project with prettieryarn deploy:dev
: Helper method to deploy to devyarn deploy:prod
: Helper method to deploy to prodyarn 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
- Solid - The view library
- TailwindCSS - For all the styles
- Cloudflare Wrangler - Cloudflare Wrangler to deploy to Workers
- vite - For the bundler / dev server
- yarn - The package manager
- shiki - For the code highlight
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.