mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-08-14 06:24:43 +00:00
Adds some api docs for the json file + readme
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
# API Reference
|
||||
|
||||
## How to register
|
||||
* First you need to create a pull request with your `domains/my-domain.json` file
|
||||
* This PR will be reviewed, merged
|
||||
* The changes will take effect in less than a day after the PR gets merged
|
||||
* `Github pages` users, need to go to their repo settings page and change the domain to `your-domain.is-a.dev` after everything is done
|
||||
* And that's it
|
||||
|
||||
Example (for github pages) -
|
||||
```json
|
||||
{
|
||||
"description": "Add some description",
|
||||
"repo": "https://github.com/user/user.github.io",
|
||||
"owner": {
|
||||
"username": "your-github-username",
|
||||
"email": "any@email"
|
||||
},
|
||||
"records": {
|
||||
"CNAME": "user.github.io"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Domains json file
|
||||
The way you register your own domain name is through a pull request.
|
||||
To register `my-domain.is-a.dev`, you need to create a `domains/my-domain.json` file
|
||||
|
||||
### owner (required)
|
||||
You need to specify some information about yourself here.
|
||||
This is so that you can be contacted if required.
|
||||
|
||||
In the owner object, the fields `username` and `email` are required. You can however add more information in this object if you need.
|
||||
```json
|
||||
{
|
||||
"owner": {
|
||||
"username": "github-username",
|
||||
"email": "any@email"
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### description
|
||||
Describe your domain name and your usage. This is purely for documentation purpose and is optional.
|
||||
|
||||
|
||||
### repo
|
||||
This is a link to your website repository or your github account. This is purely for documentation purpose and is optional.
|
||||
|
||||
|
||||
### records
|
||||
This is where you specify how you want to link to your server/webpage.
|
||||
|
||||
Currently, only `CNAME`, `ALIAS`, `A`, `URL` record types are supported.
|
||||
|
||||
##### CNAME/ALIAS
|
||||
Replace CNAME with ALIAS for alias record type
|
||||
```json
|
||||
{
|
||||
"records": {
|
||||
"CNAME": "username.github.io"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
##### A record
|
||||
```json
|
||||
{
|
||||
"records": {
|
||||
"A": [
|
||||
"999.999.991.999",
|
||||
"999.999.992.999",
|
||||
"999.999.993.999",
|
||||
"999.999.994.999",
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
##### URL redirection
|
||||
```json
|
||||
{
|
||||
"records": {
|
||||
"URL": "https://my-other-website.com"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
##### Force HTTPS on your CNAME (or ALIAS or A) record
|
||||
```json
|
||||
{
|
||||
"records": {
|
||||
"CNAME": "username.github.io",
|
||||
"URL": "https://your-domain.is-a.dev"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# is-a-dev
|
||||
Register a free `yourname.is-a.dev` domain
|
||||
|
||||
[NOTE: Work in progress. This is not usable yet]
|
||||
|
||||
## How do I register?
|
||||
* Fork this project
|
||||
* Add a `domain-name.json` new file in `domains/` directory
|
||||
* [Read the api reference for the json file](./API.md)
|
||||
* That's it! Done! Now go show off your cool `.is-a.dev` domain
|
||||
|
||||
## Donate
|
||||
This project is a free service for developers and will stay that way.
|
||||
|
||||
Donations will be greatly appreciated!
|
||||
|
||||
<a href="https://www.buymeacoffee.com/phenax"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=flat-square" alt="Buy Me A Coffee donate button" /></a>
|
||||
<a href="https://liberapay.com/phenax"><img src="https://img.shields.io/badge/liberapay-donate-yellow.svg?style=flat-square" alt="Liberapay recurring donation button" /></a>
|
||||
|
||||
|
||||
## License
|
||||
This project is under the [GPL-3.0](./LICENSE) license.
|
||||
|
||||
Reference in New Issue
Block a user