<commit_before># geotrellis-site

This project runs the [GeoTrellis](http://geotrellis.io) website. The website is powered by [Spray](http://spray.io/), and was derived from Spray's own documentation. It also uses [Sphinx](http://sphinx-doc.org/) to generate web pages from [reStructuredText](http://docutils.sourceforge.net/rst.html) files located in the [docs](docs/) subdirectory.

The documentation is served from the site sub-project of the `sbt` build. If you want to contribute to the documentation, use the steps below to build and view the site locally.

## Usage

First, ensure that you have [Vagrant](https://www.vagrantup.com/) 1.5+ and [Ansible](http://docs.ansible.com/intro_installation.html) 1.4+ installed. From there, run the following commands to start a local development server:

```bash
$ git clone https://github.com/geotrellis/geotrellis-site.git
$ cd geotrellis-site
$ vagrant up
$ open http://localhost:8080
```

After Ansible finishes provisioning the virtual machine, wait a few minutes for `sbt` to pull down dependencies and build the site (~1-3 minutes). If you see a `502 Bad Gateway` error, that usually means that `sbt` is not finished yet.

Ensure that you only edit the files inside the [docs](docs/) subdirectory. After saving a file, the changes will automatically be picked up by `sbt`.

## Deployment

[Packer](http://packer.io) is used to create EC2 AMIs using the same Ansible playbooks for provisioning a development environment. Ansible handles installing Packer inside of the Vagrant virtual machine, so if you've already spun that up, just provide your AWS credentials and execute Packer:

```bash
$ vagrant ssh
vagrant@geotrellis-site:~$ AWS_PROFILE="geotrellis-site" packer build /opt/geotrellis-site/deployment/packer/template.js
```

If successful, this should generate an EC2 AMI of the GeoTrellis site. Launching an instance of the AMI (we typically use `m3.large` instances) should yield a functioning clone of [geotrellis.io](http://geotrellis.io).

Many thanks to [spray.io](http://spray.io) for the codebase, from which all of the implementation was derived.<commit_msg>(1.0) Updated README<commit_after># geotrellis-site

This project runs the [GeoTrellis](http://geotrellis.io) website.  It is
composed of two parts:

- A Jekyll-based static content site, and;
- A Spray server running GeoTrellis operations

## Usage

You need [Docker](https://www.docker.com/) to build and run the website.
Once you have it, running the entire site is easy:

```console
> docker-compose up
```

This will expose `localhost:8080` to listen for HTTP requests.
{'fraction_non_alphanumeric': 0.0973076923076923, 'fraction_numerical': 0.008461538461538461, 'mean_word_length': 4.754424778761062, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3151842', 'n_tokens_mistral': 801, 'n_tokens_neox': 760, 'n_words': 321}