Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative doc links #178

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/components/docs/docs.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<header class="page-header fixed" role="banner">
<h1 class="logo">
<a href="/gcloud-node" title="Home">
<a href="." title="Home">
<img src="img/logo.svg" alt="Google Cloud Platform" />
<span class="gcloud">gcloud</span>
</a>
Expand Down Expand Up @@ -29,7 +29,7 @@ <h1>{{module[0].toUpperCase() + module.substr(1)}}</h1>
var datastore = gcloud.datastore;
var dataset = new datastore.Dataset();</div>
<p ng-if="!isActiveUrl('/docs/datastore/dataset')">
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.
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.
</p>
</article>

Expand Down
20 changes: 10 additions & 10 deletions docs/components/docs/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ angular
};
var a = document.createElement('a');
return str.replace(regex.see, function(match, module) {
a.href = '/gcloud-node/#/docs/' + module;
a.href = '#/docs/' + module;
a.innerText = module;
return a.outerHTML;
});
Expand Down Expand Up @@ -103,33 +103,33 @@ angular
$routeProvider
.when('/docs', {
controller: 'DocsCtrl',
templateUrl: '/gcloud-node/components/docs/docs.html',
templateUrl: 'components/docs/docs.html',
resolve: {
methods: function($http, $sce) {
return $http.get('/gcloud-node/json/index.json')
return $http.get('json/index.json')
.then(filterDocJson($sce));
}
}
})
.when('/docs/:module', {
controller: 'DocsCtrl',
templateUrl: '/gcloud-node/components/docs/docs.html',
templateUrl: 'components/docs/docs.html',
resolve: {
methods: function($http, $route, $sce) {
var module = $route.current.params.module;
return $http.get('/gcloud-node/json/' + module + '/index.json')
return $http.get('json/' + module + '/index.json')
.then(filterDocJson($sce));
}
}
})
.when('/docs/:module/:class', {
controller: 'DocsCtrl',
templateUrl: '/gcloud-node/components/docs/docs.html',
templateUrl: 'components/docs/docs.html',
resolve: {
methods: function($q, $http, $route, $sce) {
var module = $route.current.params.module;
var cl = $route.current.params.class;
return $http.get('/gcloud-node/json/' + module + '/' + cl + '.json')
return $http.get('json/' + module + '/' + cl + '.json')
.then(filterDocJson($sce));
}
}
Expand All @@ -151,11 +151,11 @@ angular
$scope.pages = [
{
title: 'gcloud',
url: '/gcloud-node/#/docs'
url: '#/docs'
},
{
title: 'Datastore',
url: '/gcloud-node/#/docs/datastore',
url: '#/docs/datastore',
pages: [
{
title: 'Dataset',
Expand All @@ -169,7 +169,7 @@ angular
},
{
title: 'Storage',
url: '/gcloud-node/#/docs/storage'
url: '#/docs/storage'
}
];
});
2 changes: 1 addition & 1 deletion docs/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2>One-line npm install</h2>
<div class="container">
<ul class="featuring-links">
<li>
<a href="/gcloud-node/#/docs" title="gcloud-node docs" class="btn">
<a href="#/docs" title="gcloud-node docs" class="btn">
<img src="img/icon-lang-nodejs.svg" alt="Node.js icon" />
Docs
</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ angular

$routeProvider
.when('/', {
templateUrl: '/gcloud-node/home.html'
templateUrl: 'home.html'
});
});
8 changes: 4 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<meta name="description" content="Node idiomatic client for Google Cloud services.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="https://cloud.google.com/images/gcp-favicon.ico">
<link rel="stylesheet" href="/gcloud-node/css/normalize.css">
<link rel="stylesheet" href="/gcloud-node/css/main.css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Droid+Sans+Mono|Roboto:300,400,700,700italic,400italic|Open+Sans:300">
<link rel="stylesheet" href="//yandex.st/highlightjs/8.0/styles/github.min.css">
</head>
Expand All @@ -26,8 +26,8 @@
<script src="//code.angularjs.org/1.2.23/angular-route.js"></script>
<script src="//yandex.st/highlightjs/8.0/highlight.min.js"></script>
<script src="//pc035860.github.io/angular-highlightjs/angular-highlightjs.min.js"></script>
<script src="/gcloud-node/home.js"></script>
<script src="/gcloud-node/components/docs/docs.js"></script>
<script src="home.js"></script>
<script src="components/docs/docs.js"></script>

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