Add robots meta "noindex, nofollow" for /docs/{quickstart, tutorials} (#547)

Closes #546
This commit is contained in:
Patrice Chalin 2020-11-25 19:55:06 -05:00 committed by GitHub
parent 4e983c1b4d
commit abf7cb9527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 16 deletions

View File

@ -1,8 +1,9 @@
---
title: Quick start
description: Get started with gRPC.
robots: noindex, nofollow
---
There is a quick start for each gRPC supported language with accompanying sample
code for a simple "Hello World" example for you to explore and update. Select a
[language](/docs/languages/) to get started.
Select a [language][] or [platform][], then choose its **Quick start**.
[language]: {{< relref "languages" >}}
[platform]: {{< relref "platforms" >}}

View File

@ -1,6 +1,9 @@
---
title: Tutorials
robots: noindex, nofollow
---
Each language / platform has **tutorial** pages. Select a
[language](/docs/languages) to view available tutorials.
Select a [language][] or [platform][] to view available tutorials.
[language]: {{< relref "languages" >}}
[platform]: {{< relref "platforms" >}}

View File

@ -1,9 +1,9 @@
{{ $url := .Permalink }}
{{ $title := cond .IsHome site.Title .Title }}
{{ $type := cond .IsHome "website" "article" }}
{{ $desc := .Param "description" }}
{{ $twitter := site.Params.social.twitter_handle }}
{{ $img := "img/logos/grpc-icon-color.png" | absURL }}
{{ $url := .Permalink -}}
{{ $title := cond .IsHome site.Title .Title -}}
{{ $type := cond .IsHome "website" "article" -}}
{{ $desc := .Param "description" -}}
{{ $twitter := site.Params.social.twitter_handle -}}
{{ $img := "img/logos/grpc-icon-color.png" | absURL -}}
{{ $imgAlt := printf "%s color logo" site.Title }}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@ -13,20 +13,21 @@
{{ end -}}
<link rel="canonical" href="{{ $url }}">
{{ with $.Params.Robots -}}
<meta name="robots" content="{{ . }}">
{{ end -}}
{{/* Twitter Card metadata */}}
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="{{ $twitter }}">
<meta name="twitter:creator" content="{{ $twitter }}">
<meta name="twitter:image" content="{{ $img }}">
<meta name="twitter:image:alt" content="{{ $imgAlt }}">
{{/* OpenGraph metadata */}}
<meta property="og:url" content="{{ $url }}">
<meta property="og:title" content="{{ $title }}">
{{ with $desc }}
{{ with $desc -}}
<meta property="og:description" content="{{ $desc }}">
{{ end }}
{{ end -}}
<meta property="og:type" content="{{ $type }}">
<meta property="og:site_name" content="{{ site.Title }}">
<meta property="og:image" content="{{ $img }}">