diff --git a/etc/api/shared.yaml b/etc/api/shared.yaml
index 06db9c3f25..70d359cb59 100644
--- a/etc/api/shared.yaml
+++ b/etc/api/shared.yaml
@@ -17,6 +17,9 @@ make:
types:
- api
- cli
+html_index:
+ asset_urls:
+ crates_img: https://raw.githubusercontent.com/rust-lang/crates.io/master/public/favicon.ico
directories:
# directory under which all generated sources should reside
output: gen
diff --git a/src/mako/index.html.mako b/src/mako/index.html.mako
index 2e2b2694f5..78601da82d 100644
--- a/src/mako/index.html.mako
+++ b/src/mako/index.html.mako
@@ -1,7 +1,7 @@
<%
import os
import yaml
- from util import (gen_crate_dir, api_index)
+ from util import (gen_crate_dir, api_index, crates_io_url)
title = 'Google Service Documentation for Rust'
@@ -68,6 +68,9 @@ DO NOT EDIT !
% for api_name in type_names:
<% ad = tc[api_name] %>
${ad.make.id.upper()}
+ % if api_name == 'api':
+
+ % endif
% if not loop.last:
,
% endif
diff --git a/src/mako/lib/util.py b/src/mako/lib/util.py
index 259cc344b7..b5e547e7f5 100644
--- a/src/mako/lib/util.py
+++ b/src/mako/lib/util.py
@@ -832,6 +832,9 @@ def to_extern_crate_name(crate_name):
def gen_crate_dir(name, version, ti):
return to_extern_crate_name(library_to_crate_name(library_name(name, version), ti.target_suffix))
+def crates_io_url(name, version):
+ return "https://crates.io/crates/%s" % library_to_crate_name(library_name(name, version))
+
def api_index(DOC_ROOT, name, version, ti, check_exists=True):
crate_dir = gen_crate_dir(name, version, ti)
if ti.documentation_engine == 'rustdoc':