diff --git a/API.md b/API.md index fd29e5fa0f..fba632efcf 100644 --- a/API.md +++ b/API.md @@ -23,7 +23,8 @@ ### For github pages users -* A github pages json file will look something like this - +* 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", diff --git a/README.md b/README.md index c07fc8320a..c5e4b3c5e4 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ is-a-dev is a service that allows developers to get a sweet-looking `.is-a.dev` domain for their personal websites. -Note: This service is currently in **beta** so expect some delays in PR merge and report any issues you encounter so that the service can be improved. - ## How do I register? diff --git a/domains/@.json b/domains/@.json index 1a088239e3..164375f244 100644 --- a/domains/@.json +++ b/domains/@.json @@ -5,5 +5,7 @@ "username": "phenax", "email": "phenax5@gmail.com" }, - "record": {} -} \ No newline at end of file + "record": { + "URL": "https://www.is-a.dev" + } +} diff --git a/domains/aizuu.json b/domains/aizuu.json index 5f179cd847..a84302d2b9 100644 --- a/domains/aizuu.json +++ b/domains/aizuu.json @@ -6,6 +6,6 @@ "email": "baby@alvindaldi.my.id" }, "record": { - "CNAME": "aizuu.my.id" + "URL": "https://aizuu.my.id" } } diff --git a/domains/amar13.json b/domains/amar13.json new file mode 100644 index 0000000000..851373aa4c --- /dev/null +++ b/domains/amar13.json @@ -0,0 +1,11 @@ +{ + "description": "My personal portfolio", + "repo": "https://github.com/amar13mehta/amar13mehta.github.io", + "owner": { + "username": "amar13mehta", + "email": "amar13iam@gmail.com" + }, + "record": { + "CNAME": "amar13mehta.github.io" + } + } \ No newline at end of file diff --git a/domains/echo2477.json b/domains/echo2477.json new file mode 100644 index 0000000000..c1883e8c06 --- /dev/null +++ b/domains/echo2477.json @@ -0,0 +1,11 @@ +{ + "description": "Echo's personal website", + "repo": "https://github.com/echo2477/echo2477.github.io", + "owner": { + "username": "echo2477", + "email": "pku.eko16@gmail.com" + }, + "record": { + "CNAME": "echo2477.github.io" + } +} \ No newline at end of file diff --git a/domains/kavi.json b/domains/kavi.json new file mode 100644 index 0000000000..f81d0b7f75 --- /dev/null +++ b/domains/kavi.json @@ -0,0 +1,12 @@ +{ + "description": "Portfolio website", + "repo": "https://github.com/dkaviarasu/dkaviarasu.github.io", + "owner": { + "username": "dkaviarasu", + "email": "", + "twitter": "kaviarasudm" + }, + "record": { + "CNAME": "dkaviarasu.github.io" + } +} diff --git a/domains/liju.json b/domains/liju.json new file mode 100644 index 0000000000..053d27d46f --- /dev/null +++ b/domains/liju.json @@ -0,0 +1,11 @@ +{ + "description": "Liju's personal development page", + "repo": "https://github.com/lijujayakumar/lijujayakumar.github.io", + "owner": { + "username": "lijujayakumar", + "email": "lijusankar@email" + }, + "record": { + "CNAME": "lijujayakumar.github.io" + } +} diff --git a/domains/moha.json b/domains/moha.json new file mode 100644 index 0000000000..41f0b36125 --- /dev/null +++ b/domains/moha.json @@ -0,0 +1,12 @@ +{ + "description": "Mohaned's personal website", + "repo": "https://github.com/mohanedashraf/mohanedashraf.github.io", + "owner": { + "username": "mohanedashraf", + "email": "", + "twitter": "mohanedzz" + }, + "record": { + "CNAME": "mohanedashraf.github.io" + } + } \ No newline at end of file diff --git a/domains/prabhakaranjm.json b/domains/prabhakaranjm.json new file mode 100644 index 0000000000..c70092f410 --- /dev/null +++ b/domains/prabhakaranjm.json @@ -0,0 +1,11 @@ +{ + "description": "Prabhakaran J M is a dev", + "repo": "https://github.com/prajaymas/prajaymas.github.io", + "owner": { + "username": "prabhakaranjm", + "email": "prabhakaran.jm@gmail.com" + }, + "record": { + "CNAME": "prajaymas.github.io" + } +} diff --git a/domains/tharindu.json b/domains/tharindu.json index d801c75c4f..715d21f7cd 100644 --- a/domains/tharindu.json +++ b/domains/tharindu.json @@ -1,11 +1,11 @@ { "description": "Tharindu's personal developer website", - "repo": "https://github.com/tharindusathis/tharindu", + "repo": "https://github.com/tharindusathis/tharindusathis.github.io", "owner": { "username": "tharindusathis", "email": "tharindu.sathis@gmail.com" }, "record": { - "CNAME": "tharindu.vercel.app" + "CNAME": "tharindusathis.github.io" } -} \ No newline at end of file +} diff --git a/domains/willian.json b/domains/willian.json new file mode 100644 index 0000000000..a8a177eda0 --- /dev/null +++ b/domains/willian.json @@ -0,0 +1,12 @@ +{ + "description": "Willian Arsenio's Website", + "repo": "https://github.com/waveiro/waveiro.github.io", + "owner": { + "username": "waveiro", + "email": "", + "twitter": "@waveiro" + }, + "record": { + "CNAME": "waveiro.github.io" + } +} diff --git a/domains/willo.json b/domains/willo.json new file mode 100644 index 0000000000..286b03212d --- /dev/null +++ b/domains/willo.json @@ -0,0 +1,12 @@ +{ + "description": "A First Willo`s Website", + "repo": "https://github.com/WilloIzCitron/willoizcitron.github.io", + "owner": { + "username": "WilloIzCitron", + "email": "", + "twitter": "tegasaziz" + }, + "record": { + "CNAME": "willoizcitron.github.io" + } +} diff --git a/domains/yajtpg.json b/domains/yajtpg.json new file mode 100644 index 0000000000..f793f35656 --- /dev/null +++ b/domains/yajtpg.json @@ -0,0 +1,11 @@ +{ + "description":"YajTPG's website", + "repo":"https://github.com/YajTPG/yajtpg.github.io", + "owner":{ + "username":"YajTPG", + "email":"yajtpg@gmail.com" + }, + "record":{ + "CNAME": "yajtpg.github.io" + } +} diff --git a/utils/domain-service.js b/utils/domain-service.js index 984d274cb6..446ca5579b 100644 --- a/utils/domain-service.js +++ b/utils/domain-service.js @@ -6,7 +6,7 @@ const { then, log, print, lazyTask, batchLazyTasks } = require('./helpers'); const BATCH_SIZE = 1; const recordToRedirection = ({ name, address }) => ({ - domain: `${name}.${DOMAIN_DOMAIN}`, + domain: name === '@' ? DOMAIN_DOMAIN : `${name}.${DOMAIN_DOMAIN}`, redirect: address, type: 'permanent', redirect_wildcard: 1, @@ -20,7 +20,7 @@ const recordToZone = ({ name, type, address, id }) => ({ ...(type === 'CNAME' ? { cname: address } : {}), }); -const cleanName = name => `${name}`.replace(new RegExp(`\\.${DOMAIN_DOMAIN}\\.?$`), '').toLowerCase(); +const cleanName = name => name === DOMAIN_DOMAIN ? '@' : `${name}`.replace(new RegExp(`\\.${DOMAIN_DOMAIN}\\.?$`), '').toLowerCase(); const zoneToRecord = ({ name, type, cname, address, record, line: id }) => ({ id, @@ -42,7 +42,7 @@ const diffRecords = (oldRecords, newRecords) => { const remove = R.differenceWith(isMatchingRecord, oldRecords, newRecords); const add = R.differenceWith(isMatchingRecord, newRecords, oldRecords) - .filter(r => !['www', '@'].includes(r.name)); + .filter(r => !['www'].includes(r.name)); return { add, remove }; };