File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ struct FeaturesPage {
17
17
metadata : MetaData ,
18
18
features : Option < Vec < Feature > > ,
19
19
default_len : usize ,
20
+ canonical_url : String ,
20
21
}
21
22
22
23
impl_webpage ! {
@@ -76,6 +77,7 @@ pub fn build_features_handler(req: &mut Request) -> IronResult<Response> {
76
77
) ,
77
78
features,
78
79
default_len,
80
+ canonical_url : format ! ( "https://docs.rs/crate/{}/latest/features" , name) ,
79
81
}
80
82
. into_response ( req)
81
83
}
Original file line number Diff line number Diff line change 5
5
{{ macros::doc_title(name=metadata.name, version=metadata.version) }}
6
6
{%- endblock title -%}
7
7
8
+ {%- block meta -%}
9
+ < link rel ="canonical " href ="{{ canonical_url | safe }} " />
10
+ {%- endblock -%}
11
+
8
12
{%- block topbar -%}
9
13
{%- set latest_version = "" -%}
10
14
{%- set latest_path = "" -%}
You can’t perform that action at this time.
0 commit comments