Skip to content

steamcmd/website

Repository files navigation

CodeFactor Discord Online Service Status StackShare GitHub Sponsors MIT License

SteamCMD Web

Statically generated website and docs for the SteamCMD API build with Jekyll.

Development

For local development you can use Jekyll on the command line and run the build-in development server locally. The easiest way however is using Docker Compose. This is a quick way to spin up the Jekyll development environment and a CORS container to fix CORS issues with client-side API calls.

Docker Method

You will only need to have Docker installed. Run the Docker Compose command to start the containers:

docker-compose up

After executing this command you should be able to reach the URL on http://localhost:4000/.

Manual Method

Install Jekyll and it's prerequisites if you don't have them installed yet:

gem install bundler jekyll github-pages
bundle install

By default the build-in webserver is only reachable on localhost (127.0.0.1) and you will need to add the bind parameter to make it reachable.

bundle exec jekyll serve --config _config-dev.yml
bundle exec jekyll serve --config _config-dev.yml --host 0.0.0.0

To avoid CORS error with the API's used in Javascript you can use a/the Local CORS Proxy. Install this with:

sudo npm install -g local-cors-proxy

And run it locally with:

lcp --proxyUrl https://api.steamcmd.net --port 3000
lcp --proxyUrl https://api.steampowered.com --port 3001

Configuration

Two different configs are used. One for development and one for the production build. You can find them in the root directory:

  • _config.yml
  • _config-dev.yml

By default the _config.yml config is used. During development it's recommend to specify the development _config-dev.yml config. The Docker Compose file specifies the development config as well.