fix: option_disable_search_engine

This commit is contained in:
trisua 2025-07-25 20:53:01 -04:00
parent 1abd360389
commit b1df4ce0ed
2 changed files with 7 additions and 2 deletions

View file

@ -425,7 +425,8 @@ hr {
border-right: 0;
}
hr.margin {
hr.margin,
.container hr {
margin: var(--pad-4) 0;
}

View file

@ -92,7 +92,7 @@ pub struct EntryMetadata {
/// If views are counted and shown for this entry.
#[serde(default, alias = "OPTION_DISABLE_VIEWS")]
pub option_disable_views: bool,
/// If this entry shows up in search engines.
/// Hides this entry for search results.
#[serde(default, alias = "OPTION_DISABLE_SEARCH_ENGINE")]
pub option_disable_search_engine: bool,
/// The password that is required to view this entry.
@ -485,6 +485,10 @@ impl EntryMetadata {
));
}
if self.option_disable_search_engine {
output.push_str("<meta name=\"robots\" content=\"noindex\">");
}
output
}