Skip to content

Commit dc6c46f

Browse files
authored
Merge pull request #228 from lxfontes/lxfontes/go-imports
docs: vanity url top directory
2 parents 60b8fea + a6b1d2e commit dc6c46f

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

docs/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# go.bytecodealliance.org Go import paths
2+
3+
This directory hosts the configuration for Go vanity URLs under `go.bytecodealliance.org` domain.
4+
5+
More information about vanity URLs can be found in the [Go documentation](https://golang.org/cmd/go/#hdr-Remote_import_paths).
6+
7+
## Adding a new vanity URL
8+
9+
If you want to create a vanity URL `go.bytecodealliance.org/foo` pointing to `github.com/bytecodealliance/go-foo`:
10+
11+
- Create directory `docs/foo`
12+
- Create file `docs/foo/index.html` with the following content:
13+
14+
```html
15+
<html>
16+
<head>
17+
<meta name="go-import" content="go.bytecodealliance.org/foo git https://github.com/bytecodealliance/go-foo" />
18+
</head>
19+
</html>
20+
```
21+
22+
NOTE: Vanity URLs must be unique and not shadow existing package names in this repository. For example: Creating a vanity URL `go.bytecodealliance.org/cm` would shadow the `cm` package in this repository.

docs/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<html>
2+
<head>
3+
<meta name="go-import" content="go.bytecodealliance.org git https://github.com/bytecodealliance/go-modules" />
4+
</head>
5+
</html>

0 commit comments

Comments
 (0)