Skip to content

Latest commit

 

History

History
83 lines (55 loc) · 2.45 KB

getting_started.md

File metadata and controls

83 lines (55 loc) · 2.45 KB

Getting started

About this project

The API catalogue is built with Middleman, a static-site generator.

Pages describing the APIs are dynamically generated from the following CSV files:

  • data/organisation.csv details the Organisations / Departments
  • data/catalogue.csv details the APIs

Content for other pages is based on Markdown files located in the source directory.

Before you start

Local setup

  1. Clone the git repository: git clone git@github.com:co-cddo/api-catalogue.git
  2. Navigate to the project directory: cd api-catalogue
  3. Install gems: bundle install
  4. Install JavaScript dependencies: npm install
  5. Run the test suite to verify your setup: bundle exec rspec

Docker setup

If you have Docker available on your machine, and would prefer not to setup the project dependencies locally, you can run:

bin/docker_serve

By default this will build and serve the site on host port 4567. You can navigate to http://localhost:4567 to view the site.

Preview your changes locally

To preview the API catalogue locally run:

bundle exec middleman server

See the generated website on http://localhost:4567 in your browser. Any content changes you make to the website will be updated in real time.

To shut down the Middleman instance running on your machine, use ctrl+C.

Build

To build the static website run:

bundle exec middleman build

If the build fails, run it again with the --verbose flag to get detailed error messages to help with finding the problem.

Publishing

Create a pull request to make changes to the site. When the pull request is merged it'll be published automatically. See the deployment documentation for further details.

Scorecard action

Note that there is a scorecard action. This relies on a token to access parts of the repository. The token expires periodically.

See the scorecard-action README for instructions on updated the token.