Refactors documentation into sections

This commit is contained in:
Akshay Nair
2020-11-19 01:20:39 +05:30
parent c2158a110c
commit 71c58400b4
6 changed files with 180 additions and 137 deletions
+1 -133
View File
@@ -1,133 +1 @@
# How to register
* First you need to create a pull request with your `domains/my-domain.json` file
* This PR will be reviewed
* The changes will take effect soon after the PR gets merged
* And that's it
### Simple cname record
* A github pages json file will look something like this -
```json
{
"description": "Add some description",
"repo": "https://github.com/github-username",
"owner": {
"username": "github-username",
"email": "any@email"
},
"record": {
"CNAME": "the-domain-you-own.com"
}
}
```
* After the pull request is merged, configure your server (apache, nginx, whatever) to work with `subdomain.is-a.dev`
### For github pages users
* You can take a look at the [github pages guide](https://guides.github.com/features/pages/) if you need help with setting up a website with github pages.
* Your json file will look something like this -
```json
{
"description": "Add some description",
"repo": "https://github.com/github-username/github-username.github.io",
"owner": {
"username": "github-username",
"email": "any@email"
},
"record": {
"CNAME": "github-username.github.io"
}
}
```
* After the pull request is merged, you will see a 404 error on `your-domain.is-a.dev`. To fix this go to your github page repo's `Settings > Github pages > Custom domain` and add `your-domain.is-a.dev` in the given field
* Check the `Enforce HTTPS` checkbox below the custom domain input
# 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
### Filename
The file name must pass the following criteria -
* Must be alpha-numeric in lowercase with dashes as seperators
* Must be more than 2 characters long
* Must have a `.json` file extension
The file needs to have the following fields -
### 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"
},
}
```
If you don't wish to share your email address here, please share your twitter or any other social media account.
```json
{
"owner": {
"username": "github-username",
"email": "",
"twitter": "twitter-handle"
},
}
```
### 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.
### record (required)
This is where you specify how you want to link to your server/webpage.
Currently, only `CNAME`, `A`, `URL` record types are supported.
Here's a few different use cases for the given record types -
* **CNAME**
CNAME must be a host name (Eg - `something.tld`)
```json
{
"record": {
"CNAME": "username.github.io"
}
}
```
* **A record**
A record must be a list of ips
```json
{
"record": {
"A": [
"999.999.991.999",
"999.999.992.999",
"999.999.993.999",
"999.999.994.999"
]
}
}
```
* **URL redirection**
```json
{
"record": {
"URL": "https://my-other-website.com"
}
}
```
Moved to [./docs](./docs)
+3 -4
View File
@@ -2,14 +2,13 @@
<br />
is-a-dev is a service that allows developers to get a sweet-looking `.is-a.dev` domain for their personal websites.
**is-a-dev** is a service that allows developers to get a sweet-looking `.is-a.dev` domain for their personal websites.
## How do I register?
* Fork this project
* Add a `your-domain-name.json` new file in `domains/` directory to register `your-domain-name.is-a.dev`
* [Read the docs for information about the json file](./API.md)
* Add a new `domains/your-domain-name.json` file directory to register `your-domain-name.is-a.dev`
* [Read the docs](./docs)
* The PR will be reviewed and merged
* After merging, the changes will take effect within a day
* That's it! Done! Now go show off your cool `.is-a.dev` domain
+7
View File
@@ -0,0 +1,7 @@
# How to register
You can read the [domains.json file api reference](./domains-json.md) for more information about the json file structure.
### Websites hosted at
* [For github pages users](./hosted-at/github-pages.md)
* [For other services](./hosted-at/others.md)
+88
View File
@@ -0,0 +1,88 @@
# 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
### Filename
The file name must pass the following criteria -
* Must be alpha-numeric in lowercase with dashes as seperators
* Must be more than 2 characters long
* Must have a `.json` file extension
The file needs to have the following fields -
### 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"
},
}
```
If you don't wish to share your email address here, please share your twitter or any other social media account.
```json
{
"owner": {
"username": "github-username",
"email": "",
"twitter": "twitter-handle"
},
}
```
### 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.
### record (required)
This is where you specify how you want to link to your server/webpage.
Currently, only `CNAME`, `A`, `URL` record types are supported.
Here's a few different use cases for the given record types -
* **CNAME**
CNAME must be a host name (Eg - `something.tld`)
```json
{
"record": {
"CNAME": "username.github.io"
}
}
```
* **A record**
A record must be a list of ips
```json
{
"record": {
"A": [
"999.999.991.999",
"999.999.992.999",
"999.999.993.999",
"999.999.994.999"
]
}
}
```
* **URL redirection**
```json
{
"record": {
"URL": "https://my-other-website.com"
}
}
```
+28
View File
@@ -0,0 +1,28 @@
# For github pages
### Creating a github pages repo
You can create a github pages website by creating a repo with the name `<your-github-username>.github.io`.
For more information about github pages, please read through [their guide](https://guides.github.com/features/pages/).
### Domains file
Create a json file inside the `domains` directory (`domains/<subdomain>.json`) with the following contents
```json
{
"description": "Add some description",
"repo": "https://github.com/github-username/github-username.github.io",
"owner": {
"username": "github-username",
"email": "any@email",
"twitter": "your-twitter-username"
},
"record": {
"CNAME": "github-username.github.io"
}
}
```
### Configuring your repo
* After the pull request is merged, you will see a 404 error on `your-domain.is-a.dev`. To fix this go to your github page repo's `Settings > Github pages > Custom domain` and add `your-domain.is-a.dev` in the given field
* Check the `Enforce HTTPS` checkbox below the custom domain input
+53
View File
@@ -0,0 +1,53 @@
# For other hosting services
### Domains file
Create a json file inside the `domains` directory (`domains/<subdomain>.json`) with the following contents
```json
{
"description": "Add some description",
"repo": "https://github.com/github-username",
"owner": {
"username": "github-username",
"email": "any@email"
},
"record": {}
}
```
### Record
In your `record` key of the json file, you need to add one of the following -
* CNAME record
```json
{
"record": {
"CNAME": "the-domain-you-own.com"
}
}
```
* A records
```json
{
"record": {
"A": [
"69.69.69.69",
"69.69.69.70"
]
}
}
```
* URL redirection
```json
{
"record": {
"URL": "https://your-website.com"
}
}
```
### Configuring your server
After the pull request is merged, **configure your server** (apache, nginx, whatever) to work with `<subdomain>.is-a.dev`. If you are unsure how to configure your server, you can create an issue for support.
You should also, include `<subdomain>.is-a.dev` in your **ssl certificate** to get rid of certificate errors