Skip to content

Commit

Permalink
[Website] Set up vanity import path for Antrea
Browse files Browse the repository at this point in the history
The import path for the Antrea Go module will now be "antrea.io/antrea".
We leverage Netlify's redirect support (this is inspired by the Knative
project) to serve the necessary HTML content. It will be super easy to
add new Go modules in the future.

For now "antrea.io/antrea" points to "github.com/vmware-tanzu/antrea".
After we transfer Antrea to the new Github organization (antrea-io), we
will update the HTML file appropriately.

See #2154
  • Loading branch information
antoninbas committed May 11, 2021
1 parent b0da6b4 commit 9d6a1a5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions site/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ collections:
- contributors
- features
- presentations
- golang
versioning: true
latest: v1.0.1
versions:
Expand Down Expand Up @@ -217,6 +218,7 @@ include:
- CONTRIBUTING.md
- README.md
- CODE_OF_CONDUCT.md
- _redirects
# Exclude these files from your production _site
exclude:
- Gemfile
Expand Down
4 changes: 4 additions & 0 deletions site/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# TODO: this could be auto-generated based on the different repositories in antrea-io
# See https://github.com/knative/website/tree/main/tools/redir-gen

/antrea/* go-get=1 /golang/antrea.html 200
4 changes: 4 additions & 0 deletions site/golang/antrea.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<html><head>
<meta name="go-import" content="antrea.io/antrea git https://github.com/vmware-tanzu/antrea">
<meta name="go-source" content="antrea.io/antrea https://github.com/vmware-tanzu/antrea https://github.com/vmware-tanzu/antrea/tree/main{/dir} https://github.com/vmware-tanzu/antrea/blob/main{/dir}/{file}#L{line}">
</head></html>

0 comments on commit 9d6a1a5

Please sign in to comment.