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

docs: vanity url top directory #228

Merged
merged 4 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
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 Vanity URLs
lxfontes marked this conversation as resolved.
Show resolved Hide resolved

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 `foo`
lxfontes marked this conversation as resolved.
Show resolved Hide resolved
- Create file `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 ex: Creating a vanity URL `go.bytecodealliance.org/cm` would shadow the `cm` package in this repository.
lxfontes marked this conversation as resolved.
Show resolved Hide resolved
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>