mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
doc(lib): use docs.rs for library documentation
We will still need to host the CLI docs though.
This commit is contained in:
@@ -75,7 +75,6 @@ cargo:
|
|||||||
# anymore
|
# anymore
|
||||||
<<: *cargo_api
|
<<: *cargo_api
|
||||||
repo_base_url: https://github.com/Byron/google-apis-rs
|
repo_base_url: https://github.com/Byron/google-apis-rs
|
||||||
doc_base_url: http://byron.github.io/google-apis-rs
|
|
||||||
authors:
|
authors:
|
||||||
# don't forget to possibly add them to copyright authors
|
# don't forget to possibly add them to copyright authors
|
||||||
- Sebastian Thiel <byronimo@gmail.com>
|
- Sebastian Thiel <byronimo@gmail.com>
|
||||||
|
|||||||
@@ -27,5 +27,6 @@ make:
|
|||||||
cargo:
|
cargo:
|
||||||
build_script: src/build.rs
|
build_script: src/build.rs
|
||||||
keywords: [protocol, web, api]
|
keywords: [protocol, web, api]
|
||||||
|
doc_base_url: https://docs.rs
|
||||||
dependencies:
|
dependencies:
|
||||||
- url = "= 0.5"
|
- url = "= 0.5"
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ cargo:
|
|||||||
build_version: "1.0.0"
|
build_version: "1.0.0"
|
||||||
keywords: [cli]
|
keywords: [cli]
|
||||||
is_executable: YES
|
is_executable: YES
|
||||||
|
doc_base_url: http://byron.github.io/google-apis-rs
|
||||||
dependencies:
|
dependencies:
|
||||||
- strsim = "^0.5"
|
- strsim = "^0.5"
|
||||||
- yup-hyper-mock = "^1.0"
|
- yup-hyper-mock = "^1.0"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ repository = "${util.github_source_root_url()}"
|
|||||||
% if documentationLink is not UNDEFINED and documentationLink:
|
% if documentationLink is not UNDEFINED and documentationLink:
|
||||||
homepage = "${documentationLink}"
|
homepage = "${documentationLink}"
|
||||||
% endif
|
% endif
|
||||||
documentation = "${cargo.doc_base_url}/${to_extern_crate_name(util.crate_name())}"
|
documentation = "${util.doc_base_url()}"
|
||||||
license = "${copyright.license_abbrev}"
|
license = "${copyright.license_abbrev}"
|
||||||
keywords = ["${name[:20]}", ${", ".join(estr(cargo.keywords))}]
|
keywords = ["${name[:20]}", ${", ".join(estr(cargo.keywords))}]
|
||||||
% if cargo.get('build_script'):
|
% if cargo.get('build_script'):
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
find_fattest_resource, build_all_params, pass_through, parts_from_params,
|
find_fattest_resource, build_all_params, pass_through, parts_from_params,
|
||||||
REQUEST_MARKER_TRAIT, RESPONSE_MARKER_TRAIT, supports_scopes, to_api_version,
|
REQUEST_MARKER_TRAIT, RESPONSE_MARKER_TRAIT, supports_scopes, to_api_version,
|
||||||
to_fqan, METHODS_RESOURCE, ADD_PARAM_MEDIA_EXAMPLE, PROTOCOL_TYPE_INFO, enclose_in,
|
to_fqan, METHODS_RESOURCE, ADD_PARAM_MEDIA_EXAMPLE, PROTOCOL_TYPE_INFO, enclose_in,
|
||||||
upload_action_fn, unique_type_name, schema_doc_format, METHODS_BUILDER_MARKER_TRAIT,
|
upload_action_fn, unique_type_name, schema_doc_format, METHODS_BUILDER_MARKER_TRAIT,
|
||||||
to_extern_crate_name)
|
to_extern_crate_name)
|
||||||
|
|
||||||
def pretty_name(name):
|
def pretty_name(name):
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
response_trait_url = 'trait.' + RESPONSE_MARKER_TRAIT + '.html'
|
response_trait_url = 'trait.' + RESPONSE_MARKER_TRAIT + '.html'
|
||||||
part_trait_url = 'trait.' + PART_MARKER_TRAIT + '.html'
|
part_trait_url = 'trait.' + PART_MARKER_TRAIT + '.html'
|
||||||
|
|
||||||
doc_base_url = cargo.doc_base_url + '/' + to_extern_crate_name(util.crate_name()) + '/'
|
doc_base_url = util.doc_base_url() + '/' + to_extern_crate_name(util.crate_name()) + '/'
|
||||||
|
|
||||||
def link(name, url):
|
def link(name, url):
|
||||||
lf = '[%s](%s)'
|
lf = '[%s](%s)'
|
||||||
|
|||||||
@@ -83,9 +83,9 @@ Configuration:
|
|||||||
|
|
||||||
<%def name="new(c)" buffered="True">\
|
<%def name="new(c)" buffered="True">\
|
||||||
<%
|
<%
|
||||||
doc_url_base = cargo.doc_base_url + '/' + os.path.dirname(api_index(cargo.doc_base_url, name,
|
doc_base_url = cargo.doc_base_url + '/' + os.path.dirname(api_index(cargo.doc_base_url, name,
|
||||||
version, make, check_exists=False))
|
version, make, check_exists=False))
|
||||||
url_info = "All documentation details can be found at " + doc_url_base
|
url_info = "All documentation details can be found at " + doc_base_url
|
||||||
|
|
||||||
# list of tuples
|
# list of tuples
|
||||||
# (0) = long name
|
# (0) = long name
|
||||||
@@ -215,7 +215,7 @@ let arg_data = [
|
|||||||
%>\
|
%>\
|
||||||
("${mangle_subcommand(method)}",
|
("${mangle_subcommand(method)}",
|
||||||
${rust_optional(mc.m.get('description'))},
|
${rust_optional(mc.m.get('description'))},
|
||||||
"Details at ${doc_url_base}/${os.path.splitext(subcommand_md_filename(resource, method))[0]}",
|
"Details at ${doc_base_url}/${os.path.splitext(subcommand_md_filename(resource, method))[0]}",
|
||||||
vec![
|
vec![
|
||||||
% for flag, desc, arg_name, required, multi in args:
|
% for flag, desc, arg_name, required, multi in args:
|
||||||
(${rust_optional(arg_name)},
|
(${rust_optional(arg_name)},
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<%namespace name="util" file="../lib/util.mako"/>\
|
<%namespace name="util" file="../lib/util.mako"/>\
|
||||||
site_name: ${util.canonical_name()} v${util.crate_version()}
|
site_name: ${util.canonical_name()} v${util.crate_version()}
|
||||||
site_url: ${cargo.doc_base_url}/${util.crate_name()}
|
site_url: ${cargo.doc_base_url}/${util.crate_name()}
|
||||||
site_description: Write integrating applications with bcore
|
site_description: A complete library to interact with ${util.canonical_name()} (protocol ${version})
|
||||||
|
|
||||||
repo_url: ${util.github_source_root_url()}
|
repo_url: ${util.github_source_root_url()}
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,14 @@ ${util.library_name(name, version)}\
|
|||||||
${util.library_to_crate_name(util.library_name(name, version), make.target_suffix)}\
|
${util.library_to_crate_name(util.library_name(name, version), make.target_suffix)}\
|
||||||
</%def>
|
</%def>
|
||||||
|
|
||||||
|
<%def name="doc_base_url()" buffered="True">\
|
||||||
|
% if make.id == 'cli':
|
||||||
|
${cargo.doc_base_url + '/' + util.to_extern_crate_name(self.crate_name())}\
|
||||||
|
% else:
|
||||||
|
${cargo.doc_base_url + '/' + self.crate_name() + '/' + self.crate_version()}\
|
||||||
|
% endif
|
||||||
|
</%def>
|
||||||
|
|
||||||
<%def name="crate_version()" buffered="True">\
|
<%def name="crate_version()" buffered="True">\
|
||||||
${util.crate_version(cargo.build_version, revision is UNDEFINED and '00000000' or revision)}\
|
${util.crate_version(cargo.build_version, revision is UNDEFINED and '00000000' or revision)}\
|
||||||
</%def>
|
</%def>
|
||||||
|
|||||||
Reference in New Issue
Block a user