2016-09-21 16:16:09 +00:00
# InSpec homepage
## Development
Get all dependencies:
```bash
bundle install
```
2017-10-05 17:17:06 +00:00
To build the `docs/` child pages run:
```bash
bundle exec rake docs
```
2016-09-21 16:16:09 +00:00
To run it live run:
```bash
bundle exec middleman server
```
2018-02-20 00:57:19 +00:00
For the online demo, take a look at `www/demo` .
2016-09-23 09:29:22 +00:00
2016-09-21 16:16:09 +00:00
## Building
2018-02-20 00:57:19 +00:00
To build the site to a local static folder (without demo):
2016-09-21 16:16:09 +00:00
```bash
2016-09-22 19:26:19 +00:00
bundle exec middleman build
2016-09-21 16:16:09 +00:00
```
2018-04-06 13:14:41 +00:00
* _if you get an error building the css files it could be becuase you don't have node.js installed. e.g._
```
== Request: /stylesheets/vendor/fontawesome.min.css
== Finishing Request: stylesheets/vendor/fontawesome.min.css (0.0s)
error build/stylesheets/vendor/fontawesome.min.css
```
2016-09-22 19:26:19 +00:00
2018-02-20 00:57:19 +00:00
To build everything including the online demo:
2016-09-23 09:29:22 +00:00
```
bundle exec rake www:build
```
2016-09-22 19:26:19 +00:00
## Releasing
2017-03-22 15:58:12 +00:00
To build everything and push a new version of the website, be in the www folder of this repository and run:
2016-09-22 19:26:19 +00:00
```
2016-12-22 12:52:50 +00:00
bundle install
2016-09-26 10:05:16 +00:00
bundle exec rake www
2016-09-22 19:26:19 +00:00
```
2016-09-26 10:05:16 +00:00
It will clear everything and build from scratch and create a local `gh-pages` branch with a static version of the website.
Before pushing, it will ask you if you are happy with it.
**Please verify the site now!** To host the current folder you can run:
```
ruby -run -e httpd . -p 8000
```
Open your browser to [localhost:8000 ](http://localhost:8000 ).
If you are happy, you can confirm the site and let the release task push it live.
2017-04-28 16:18:20 +00:00
### Flushing the Fastly Cache
The `www` Rake task will flush the cache at Fastly if you have the following environment variables set:
* `FASTLY_API_KEY`
* `FASTLY_SERVICE_ID`
These can be found in Chef's shared password manager. If these aren't set, the cache will not be flushed and will expire on its own. The cache can be flushed without doing a full website release by running `rake www:flush`