inspec/www
Clinton Wolfe fa0a6c9794 Ability to render contrib resource pack docs on main website (#3184)
* Sketch out contrib doc fetcher
* Read contrib config file
* Fetch contrib resource packs from git
* Copy in resource pack docs from contrib
* Task to cleanup copied-in files
* Attach contrib resource pack docs fetching to main website doc generation
* Refactor - rename vars in resource overview task for clarity
* Generate resource overview page using info from contrib
* Fix issue in which AWS and Azure resources were ending up under OS
* Trigger contrib doc cleanup after doc build
* Comment out the contrib.yaml for now
* Disable contrib tasks if git is not available
* Rubocop issues
* Allow .md as doc file ending
* Fix for files ending in md having a relative link
* Omit 'resources' from section labels to save width
* Rubocoooooooooooppppp

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-08-02 11:43:46 -04:00
..
data Fix links on docs page (#2716) 2018-02-20 14:41:58 -05:00
demo Fix node dependency issue for website build (#3049) 2018-05-16 14:07:34 -04:00
lib Update InSpec website (#2681) 2018-02-17 07:44:42 -08:00
source Add link to cookie policy (#3240) 2018-07-25 15:56:01 -04:00
.gitignore rake to render all docs to www/ correctly with links 2016-09-26 06:21:05 +02:00
config.rb InSpec SEO (#2725) 2018-02-21 16:42:55 -08:00
config.ru Fixup rubocop violation in www/ 2016-09-13 15:11:48 +01:00
Gemfile Ability to render contrib resource pack docs on main website (#3184) 2018-08-02 11:43:46 -04:00
Rakefile move /tutorial to /demo (#2700) 2018-02-19 16:57:19 -08:00
README.md Amended Syntax to correct formatting (#2911) 2018-04-06 09:14:41 -04:00

InSpec homepage

Development

Get all dependencies:

bundle install

To build the docs/ child pages run:

bundle exec rake docs

To run it live run:

bundle exec middleman server

For the online demo, take a look at www/demo.

Building

To build the site to a local static folder (without demo):

bundle exec middleman build
  • 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

To build everything including the online demo:

bundle exec rake www:build

Releasing

To build everything and push a new version of the website, be in the www folder of this repository and run:

bundle install
bundle exec rake www

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.

If you are happy, you can confirm the site and let the release task push it live.

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