Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Prototype] Go vanity urls from website #5022

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions content/en/go-sources/auto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: go-sources
repo: https://github.com/open-telemetry/opentelemetry-go-instrumentation
---
4 changes: 4 additions & 0 deletions content/en/go-sources/build-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: go-sources
repo: https://github.com/open-telemetry/opentelemetry-go-build-tools
---
4 changes: 4 additions & 0 deletions content/en/go-sources/collector-contrib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: go-sources
repo: https://github.com/open-telemetry/opentelemetry-collector-contrib
---
4 changes: 4 additions & 0 deletions content/en/go-sources/collector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: go-sources
repo: https://github.com/open-telemetry/opentelemetry-collector
---
4 changes: 4 additions & 0 deletions content/en/go-sources/contrib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: go-sources
repo: https://github.com/open-telemetry/opentelemetry-go-contrib
---
4 changes: 4 additions & 0 deletions content/en/go-sources/otel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: go-sources
repo: https://github.com/open-telemetry/opentelemetry-go
---
4 changes: 4 additions & 0 deletions content/en/go-sources/proto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
type: go-sources
repo: https://github.com/open-telemetry/opentelemetry-proto-go
---
3 changes: 3 additions & 0 deletions hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,3 +309,6 @@ module:
target: static/img
- source: iconography/32x32
target: static/img/logos/32x32

minify:
disableHTML: true
10 changes: 10 additions & 0 deletions layouts/go-sources/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="go-import" content="{{ (index (split (urls.Parse .Site.BaseURL).Host ":") 0) }}/{{ .File }} git {{ .Params.repo }}">
<meta name="go-source" content="{{ (index (split (urls.Parse .Site.BaseURL).Host ":") 0) }}/{{ .File }} {{ .Params.repo }} {{ .Params.repo }}/tree/master{/dir} {{ .Params.repo }}/blob/master{/dir}/{file}#L{line}">
</head>
<body>
</body>
</html>
29 changes: 29 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,35 @@ from = "https://blog.opentelemetry.io/*"
to = "https://opentelemetry.io/blog/:splat"
force = true


[[redirects]]
from = "https://go.opentelemetry.io/:name/*"
status = 200 # ensure that the URL stays the same, see https://docs.netlify.com/routing/redirects/rewrites-proxies/
to = "/go-sources/:name?s=:splat"

[[redirects]]
from = "https://go-dev.opentelemetry.io/:name/*"
status = 200 # ensure that the URL stays the same, see https://docs.netlify.com/routing/redirects/rewrites-proxies/
to = "/go-sources/:name?s=:splat"
force = true

[[redirects]]
from = "/go-sources/:name/*"
status = 200 # ensure that the URL stays the same, see https://docs.netlify.com/routing/redirects/rewrites-proxies/
to = "/go-sources/:name?s=:splat"

[[redirects]]
from = "/collector-contrib/*"
status = 200 # ensure that the URL stays the same, see https://docs.netlify.com/routing/redirects/rewrites-proxies/
to = "/go-sources/collector-contrib/?s=:splat"
force = true

[[redirects]]
from = "/contrib/*"
to = "/go-sources/contrib/?s=:splat"
force = true


[[headers]]
for = "/schemas/:version"
[headers.values]
Expand Down
Loading