fix: option_disable_search_engine
This commit is contained in:
parent
1abd360389
commit
b1df4ce0ed
2 changed files with 7 additions and 2 deletions
|
@ -425,7 +425,8 @@ hr {
|
|||
border-right: 0;
|
||||
}
|
||||
|
||||
hr.margin {
|
||||
hr.margin,
|
||||
.container hr {
|
||||
margin: var(--pad-4) 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue