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

feat: added Short URL Docs and Example #3069

Closed
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
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,25 @@ This repository has the following structure:
├── tailwind.config.js # TailwindCSS configuration file
└── tsconfig.json # TypeScript configuration file
```
## Short Url Redirections

Short urls are used in website to make redirections by using a short alias for given address on this website.

These type of urls should be implemented as follows:

1. This website uses address like `/s/:short-alias` to create short urls.

2. Such redirections can be made using the `_redirects` file.
Location of file: `(root)/public/_redirects`

3. These short urls must use the section `SHORT-URL-REDIRECTION` inside the `_redirects`.

An Example url in `_redirects` looks like
```yaml
/s/example https://github.com/asyncapi/spec/blob/master/examples/streetlights-mqtt-asyncapi.yml 301!
```



## Connect with AsyncAPI Community

Expand Down
4 changes: 4 additions & 0 deletions public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ https://www.asyncapi.io/* https://www.asyncapi.com/:splat 301!
/github-actions /tools/github-actions 301!
# TOOLS-REDIRECTION:END

# SHORT-URL-REDIRECTION:START
/s/example https://github.com/asyncapi/spec/blob/master/examples/streetlights-mqtt-asyncapi.yml 301!
# SHORT-URL-REDIRECTION:END

# Additional redirection
/community/meetings /community/events 301!
/cheatsheet https://github.com/asyncapi/website/tree/master/cheatsheet 302!
Loading