From a56b0a02c01caff87d177f1e515279aabb3ea434 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 16 Oct 2020 14:41:29 +0530 Subject: [PATCH] Update API.md --- API.md | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/API.md b/API.md index 43bc51d64..cbb0a7dfb 100644 --- a/API.md +++ b/API.md @@ -6,8 +6,26 @@ * 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 -* A github pages json file (with cname record and https redirection) will look something like this - +* A github pages json file will look something like this - ```json { "description": "Add some description", @@ -30,8 +48,9 @@ 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 with dashes as seperators +* Must be alpha-numeric in lowercase with dashes as seperators * Must be more than 2 characters long @@ -51,6 +70,18 @@ In the owner object, the fields `username` and `email` are required. You can how } ``` +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. @@ -67,6 +98,7 @@ 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": { @@ -76,6 +108,7 @@ Here's a few different use cases for the given record types - ``` * **A record** +A record must be a list of ips ```json { "record": {