Skip to content

Commit 8fcfbe6

Browse files
author
Tim Bannister
committed
Mark announcements nosnippet
Add special metadata that Google Search pays attention to, so that the search engine ignores the <aside> element contents for announcements.
1 parent 6a94d98 commit 8fcfbe6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

layouts/partials/announcement.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{ if .Page.Param "announcement" }}
22
<section lang="en" id="announcement" style="background-color:{{ .Page.Param "announcement_bg" }}">
33
<aside>
4-
<div class="content announcement main-section">
4+
<div class="content announcement main-section" data-nosnippet>
55

66
<h4 class="announcement">
77
{{ T "announcement_title" | markdownify }}

layouts/partials/frontpage-announcement.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{ if .Page.Param "announcement" }}
22
<section lang="en" id="fp-announcement" style="background-color:{{ .Page.Param "announcement_bg" }}">
3-
<aside>
4-
<div class="content announcement main-section">
3+
<aside >
4+
<div class="content announcement main-section" data-nosnippet>
55

66
<h3>
77
{{ T "announcement_title" | markdownify }}

0 commit comments

Comments
 (0)