mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
chore(make-docs): adjust to build.target-dir
Thanks to the latest cargo 0.3.0, it's possible to keep everything in the stanard doc output directory, which essentially collects everything for us. This creatly reduces the space required to hold all documentation, and is in fact quite beatiful.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,7 +1,7 @@
|
||||
.timestamp
|
||||
.pyenv-*
|
||||
.virtualenv
|
||||
gen/doc/
|
||||
gen/doc
|
||||
*.go
|
||||
*.pyc
|
||||
**target/
|
||||
|
||||
@@ -120,10 +120,8 @@ ${api_doc_index}: ${api_common}
|
||||
${api_doc}: ${api_doc_index}
|
||||
|
||||
${central_api_index(crate_name)}: ${api_doc_index}
|
||||
@mkdir -p ${doc_root}
|
||||
% if make.documentation_engine == 'rustdoc':
|
||||
cp -Rf ${os.path.dirname(api_doc_root)} $(dir $@)
|
||||
% else:
|
||||
@[[ ! -d ${doc_root} ]] && mkdir -p target/doc && ln -s `pwd`/target/doc ${doc_root} || :
|
||||
% if make.documentation_engine == 'mkdocs':
|
||||
cp -Rf ${api_doc_root} $(dir $@)
|
||||
% endif
|
||||
|
||||
|
||||
@@ -11,20 +11,6 @@
|
||||
data = yaml.load_all(open(os.path.join(directories.api_base, 'type-%s.yaml' % api_type)))
|
||||
tc[api_type] = type(directories)(data.next())
|
||||
# end for each type to load cache for
|
||||
|
||||
first_api_prefix = None
|
||||
for ad in tc.values():
|
||||
if ad.make.documentation_engine != 'rustdoc':
|
||||
continue
|
||||
for an in sorted(api.list.keys()):
|
||||
for v in api.list[an]:
|
||||
if api_index(DOC_ROOT, an, v, ad.make):
|
||||
first_api_prefix = gen_crate_dir(an, v, ad.make)
|
||||
break
|
||||
# for each version
|
||||
# for each api name
|
||||
# end for each type
|
||||
assert first_api_prefix
|
||||
%>\
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
@@ -34,7 +20,7 @@ DO NOT EDIT !
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="${first_api_prefix}/main.css">
|
||||
<link rel="stylesheet" href="main.css">
|
||||
<style type="text/css">
|
||||
.text {
|
||||
color: #000000;
|
||||
|
||||
@@ -844,7 +844,7 @@ def program_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':
|
||||
index_file_path = crate_dir + '/' + crate_dir + '/index.html'
|
||||
index_file_path = crate_dir + '/index.html'
|
||||
else:
|
||||
index_file_path = crate_dir + '/' + 'index.html'
|
||||
if not check_exists or os.path.isfile(os.path.join(DOC_ROOT, index_file_path)):
|
||||
|
||||
Reference in New Issue
Block a user