Skip to content

Commit 794a7af

Browse files
ryanseysstephenplusplus
authored andcommitted
Relative doc links
1 parent 3c875a9 commit 794a7af

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

docs/components/docs/docs.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<header class="page-header fixed" role="banner">
22
<h1 class="logo">
3-
<a href="/gcloud-node" title="Home">
3+
<a href="." title="Home">
44
<img src="img/logo.svg" alt="Google Cloud Platform" />
55
<span class="gcloud">gcloud</span>
66
</a>
@@ -29,7 +29,7 @@ <h1>{{module[0].toUpperCase() + module.substr(1)}}</h1>
2929
var datastore = gcloud.datastore;
3030
var dataset = new datastore.Dataset();</div>
3131
<p ng-if="!isActiveUrl('/docs/datastore/dataset')">
32-
See <a href="/#/docs/datastore/dataset">the Dataset documentation</a> for examples of how to query the datastore, save entities, run a transaction, and others.
32+
See <a href="#/docs/datastore/dataset">the Dataset documentation</a> for examples of how to query the datastore, save entities, run a transaction, and others.
3333
</p>
3434
</article>
3535

docs/components/docs/docs.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ angular
4242
};
4343
var a = document.createElement('a');
4444
return str.replace(regex.see, function(match, module) {
45-
a.href = '/gcloud-node/#/docs/' + module;
45+
a.href = '#/docs/' + module;
4646
a.innerText = module;
4747
return a.outerHTML;
4848
});
@@ -103,33 +103,33 @@ angular
103103
$routeProvider
104104
.when('/docs', {
105105
controller: 'DocsCtrl',
106-
templateUrl: '/gcloud-node/components/docs/docs.html',
106+
templateUrl: 'components/docs/docs.html',
107107
resolve: {
108108
methods: function($http, $sce) {
109-
return $http.get('/gcloud-node/json/index.json')
109+
return $http.get('json/index.json')
110110
.then(filterDocJson($sce));
111111
}
112112
}
113113
})
114114
.when('/docs/:module', {
115115
controller: 'DocsCtrl',
116-
templateUrl: '/gcloud-node/components/docs/docs.html',
116+
templateUrl: 'components/docs/docs.html',
117117
resolve: {
118118
methods: function($http, $route, $sce) {
119119
var module = $route.current.params.module;
120-
return $http.get('/gcloud-node/json/' + module + '/index.json')
120+
return $http.get('json/' + module + '/index.json')
121121
.then(filterDocJson($sce));
122122
}
123123
}
124124
})
125125
.when('/docs/:module/:class', {
126126
controller: 'DocsCtrl',
127-
templateUrl: '/gcloud-node/components/docs/docs.html',
127+
templateUrl: 'components/docs/docs.html',
128128
resolve: {
129129
methods: function($q, $http, $route, $sce) {
130130
var module = $route.current.params.module;
131131
var cl = $route.current.params.class;
132-
return $http.get('/gcloud-node/json/' + module + '/' + cl + '.json')
132+
return $http.get('json/' + module + '/' + cl + '.json')
133133
.then(filterDocJson($sce));
134134
}
135135
}
@@ -139,7 +139,7 @@ angular
139139
'use strict';
140140

141141
$scope.isActiveUrl = function(url) {
142-
return url.replace(/^\/gcloud-node\/#/, '') === $location.path();
142+
return url.replace(/^#/, '') === $location.path();
143143
};
144144

145145
$scope.isActiveDoc = function(doc) {
@@ -151,11 +151,11 @@ angular
151151
$scope.pages = [
152152
{
153153
title: 'gcloud',
154-
url: '/gcloud-node/#/docs'
154+
url: '#/docs'
155155
},
156156
{
157157
title: 'Datastore',
158-
url: '/gcloud-node/#/docs/datastore',
158+
url: '#/docs/datastore',
159159
pages: [
160160
{
161161
title: 'Dataset',
@@ -169,7 +169,7 @@ angular
169169
},
170170
{
171171
title: 'Storage',
172-
url: '/gcloud-node/#/docs/storage'
172+
url: '#/docs/storage'
173173
}
174174
];
175175
});

docs/home.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h2>One-line npm install</h2>
2121
<div class="container">
2222
<ul class="featuring-links">
2323
<li>
24-
<a href="/gcloud-node/#/docs" title="gcloud-node docs" class="btn">
24+
<a href="#/docs" title="gcloud-node docs" class="btn">
2525
<img src="img/icon-lang-nodejs.svg" alt="Node.js icon" />
2626
Docs
2727
</a>

docs/home.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ angular
55

66
$routeProvider
77
.when('/', {
8-
templateUrl: '/gcloud-node/home.html'
8+
templateUrl: 'home.html'
99
});
1010
});

docs/index.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<meta name="description" content="Node idiomatic client for Google Cloud services.">
1111
<meta name="viewport" content="width=device-width, initial-scale=1">
1212
<link rel="shortcut icon" href="https://cloud.google.com/images/gcp-favicon.ico">
13-
<link rel="stylesheet" href="/gcloud-node/css/normalize.css">
14-
<link rel="stylesheet" href="/gcloud-node/css/main.css">
13+
<link rel="stylesheet" href="css/normalize.css">
14+
<link rel="stylesheet" href="css/main.css">
1515
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Droid+Sans+Mono|Roboto:300,400,700,700italic,400italic|Open+Sans:300">
1616
<link rel="stylesheet" href="//yandex.st/highlightjs/8.0/styles/github.min.css">
1717
</head>
@@ -26,8 +26,8 @@
2626
<script src="//code.angularjs.org/1.2.23/angular-route.js"></script>
2727
<script src="//yandex.st/highlightjs/8.0/highlight.min.js"></script>
2828
<script src="//pc035860.github.io/angular-highlightjs/angular-highlightjs.min.js"></script>
29-
<script src="/gcloud-node/home.js"></script>
30-
<script src="/gcloud-node/components/docs/docs.js"></script>
29+
<script src="home.js"></script>
30+
<script src="components/docs/docs.js"></script>
3131

3232
<script>
3333
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

0 commit comments

Comments
 (0)