Skip to content

Commit

Permalink
Merge pull request #228 from lxfontes/lxfontes/go-imports
Browse files Browse the repository at this point in the history
docs: vanity url top directory
  • Loading branch information
ydnar authored Nov 5, 2024
2 parents 60b8fea + a6b1d2e commit dc6c46f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# go.bytecodealliance.org Go import paths

This directory hosts the configuration for Go vanity URLs under `go.bytecodealliance.org` domain.

More information about vanity URLs can be found in the [Go documentation](https://golang.org/cmd/go/#hdr-Remote_import_paths).

## Adding a new vanity URL

If you want to create a vanity URL `go.bytecodealliance.org/foo` pointing to `github.com/bytecodealliance/go-foo`:

- Create directory `docs/foo`
- Create file `docs/foo/index.html` with the following content:

```html
<html>
<head>
<meta name="go-import" content="go.bytecodealliance.org/foo git https://github.com/bytecodealliance/go-foo" />
</head>
</html>
```

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.
5 changes: 5 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<html>
<head>
<meta name="go-import" content="go.bytecodealliance.org git https://github.com/bytecodealliance/go-modules" />
</head>
</html>

0 comments on commit dc6c46f

Please sign in to comment.