diff --git a/docs/authorization.md b/docs/authorization.md index bbb93da15055..c8fae3c6f044 100644 --- a/docs/authorization.md +++ b/docs/authorization.md @@ -4,7 +4,7 @@ With `gcloud-node` it's incredibly easy to get authorized and start using Google If you are running this client on Google Compute Engine, we handle authorization for you with no configuration. You just need to make sure that when you [set up the GCE instance][gce-how-to], you add the correct scopes for the APIs you want to access. -``` js +```js hljs-class var config = { projectId: 'grape-spaceship-123' }; @@ -26,7 +26,7 @@ If you are not running this client on Google Compute Engine, you need a Google D * If you want to use a new service account, click on **Create new Client ID** and select **Service account**. After the account is created, you will be prompted to download the JSON key file that the library uses to authorize your requests. * If you want to generate a new key for an existing service account, click on **Generate new JSON key** and download the JSON key file. -``` js +``` js hljs-class var config = { projectId: 'grape-spaceship-123', keyFilename: '/path/to/keyfile.json' diff --git a/docs/site/components/authorization/authorization.html b/docs/site/components/authorization/authorization.html index a494ccf1c771..2221dbe3f8fd 100644 --- a/docs/site/components/authorization/authorization.html +++ b/docs/site/components/authorization/authorization.html @@ -15,5 +15,5 @@
- +
diff --git a/docs/site/components/subpage/subpage-directive.js b/docs/site/components/subpage/subpage-directive.js index 9bbff6641f80..6001a9fa51cc 100644 --- a/docs/site/components/subpage/subpage-directive.js +++ b/docs/site/components/subpage/subpage-directive.js @@ -1,5 +1,6 @@ angular - .module('gcloud.subpage', ['gcloud.header']) + .module('gcloud.subpage', ['gcloud.header', 'hljs']) + .directive('subpage', function($rootScope, $location, $http, $parse, getLinks, versions) { 'use strict'; @@ -34,4 +35,62 @@ angular } } }; + }) + + // A special class used in our MD files to tell the front end to syntax + // highlight the code blocks. + .directive('hljsClass', function() { + 'use strict'; + + return { + // Concept borrowed from: + // http://www.bennadel.com/blog/2748-compiling-transcluded-content-in-angularjs-directives.htm + // + //
+ // var hi = 'there';