Use lang specific redirects + catch all

This commit is contained in:
Patrice Chalin 2020-06-11 09:25:13 -04:00
parent cb8f547e54
commit e81796f189
7 changed files with 23 additions and 6 deletions

View File

@ -6,4 +6,4 @@ These language-specific pages are available:
- [Quick start](quickstart) - [Quick start](quickstart)
- [Basics tutorial](basics) - [Basics tutorial](basics)
- [API reference](https://grpc.github.io/grpc-java/javadoc) - [API reference](api)

View File

@ -0,0 +1,5 @@
---
title: API reference
weight: 90
# Note: this is a placeholder page. The URL to this page redirects elsewhere.
---

View File

@ -7,7 +7,7 @@ core-library][core-library] implementation is covered here:
- [Quick start](quickstart) - [Quick start](quickstart)
- [Basics tutorial](basics) - [Basics tutorial](basics)
- [API reference](https://grpc.github.io/grpc/csharp/api/Grpc.Core) - [API reference](api)
For details concerning the newer gRPC for .NET implementation, see [gRPC for For details concerning the newer gRPC for .NET implementation, see [gRPC for
.NET](dotnet). .NET](dotnet).

View File

@ -0,0 +1,5 @@
---
title: API reference
weight: 90
# Note: this is a placeholder page. The URL to this page redirects elsewhere.
---

View File

@ -1,5 +1,6 @@
--- ---
title: gRPC for .NET title: gRPC for .NET
weight: 60
--- ---
The following pages cover the C# implementation of gRPC for .NET The following pages cover the C# implementation of gRPC for .NET
@ -7,7 +8,7 @@ The following pages cover the C# implementation of gRPC for .NET
- [Introduction to gRPC on .NET Core](https://docs.microsoft.com/aspnet/core/grpc) - [Introduction to gRPC on .NET Core](https://docs.microsoft.com/aspnet/core/grpc)
- [Tutorial: Create a gRPC client and server in ASP.NET Core][tutorial] - [Tutorial: Create a gRPC client and server in ASP.NET Core][tutorial]
- [API reference](https://grpc.github.io/grpc/csharp-dotnet/api/Grpc.Core) - [API reference](api)
Several sample applications are available from the [examples][] folder in the Several sample applications are available from the [examples][] folder in the
[grpc-dotnet][] repository. [grpc-dotnet][] repository.

View File

@ -1,4 +1,4 @@
{{ $isExternal := hasPrefix .Destination "http" -}} {{ $isExternal := or (hasPrefix .Destination "http") (findRE "^(|/docs/languages/.+?/)api/?$" .Destination) -}}
<a href="{{ .Destination | safeURL }}" <a href="{{ .Destination | safeURL }}"
{{- with .Title }} title="{{ . }}"{{ end -}} {{- with .Title }} title="{{ . }}"{{ end -}}
{{- if $isExternal }} target="_blank" rel="noopener"{{ end -}} {{- if $isExternal }} target="_blank" rel="noopener"{{ end -}}

View File

@ -12,8 +12,14 @@
/docs/reference/:lang/generated-code /docs/languages/:lang/generated-code /docs/reference/:lang/generated-code /docs/languages/:lang/generated-code
/docs/tutorials/basic/:lang /docs/languages/:lang/basics /docs/tutorials/basic/:lang /docs/languages/:lang/basics
# These redirect rules are for API reference docs. For a list of # API reference docs (prior to 2020/06)
# source URLs, see the apis.yaml file.
/grpc/* https://grpc.github.io/grpc/:splat /grpc/* https://grpc.github.io/grpc/:splat
/grpc-* https://grpc.github.io/grpc-:splat /grpc-* https://grpc.github.io/grpc-:splat
# API reference docs
/docs/languages/android/api https://grpc.github.io/grpc-java/javadoc 301!
/docs/languages/csharp/dotnet/api https://grpc.github.io/grpc/csharp-dotnet/api/Grpc.Core 301!
/docs/languages/csharp/api https://grpc.github.io/grpc/csharp/api/Grpc.Core 301!
#/docs/languages/:lang/api https://grpc.github.io/grpc/:lang 301!