Only list crates on the crate page

This commit is contained in:
Guillaume Gomez 2021-05-31 11:51:22 +02:00
parent e081cd48f4
commit a2ba9ef1ff
3 changed files with 20 additions and 10 deletions

View file

@ -200,8 +200,15 @@ impl<'tcx> Context<'tcx> {
)
};
let keywords = make_item_keywords(it);
let name;
let tyname_s = if it.is_crate() {
name = format!("{} crate", tyname);
name.as_str()
} else {
tyname.as_str()
};
let page = layout::Page {
css_class: tyname.as_str(),
css_class: tyname_s,
root_path: &self.root_path(),
static_root_path: self.shared.static_root_path.as_deref(),
title: &title,