Skip to content

Commit

Permalink
Issue #225: Ask search engines not to index staging
Browse files Browse the repository at this point in the history
Signed-off-by: macdonst <[email protected]>
  • Loading branch information
macdonst committed Oct 19, 2024
1 parent 5f3c3c0 commit 3f037c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/head.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export default function Head (state) {
}
}

const indexMe = process.env.ARC_ENV === 'production'
? ''
: `<meta name="robots" content="noindex">`

return /* html */ `
<!DOCTYPE html>
<html lang='en'>
Expand Down Expand Up @@ -88,6 +92,7 @@ export default function Head (state) {
<meta name="twitter:image:src" content="${ogImage}" />
${extraBlogMeta.join('\n')}
${indexMe}
<style>
@font-face {
Expand Down Expand Up @@ -119,7 +124,7 @@ export default function Head (state) {
em {
font-weight: 400;
}
@media (prefers-reduced-motion: no-preference) {
html {
scroll-behavior: smooth;
Expand Down

0 comments on commit 3f037c0

Please sign in to comment.