apiDoc as personal website template.
This project is based on apiDoc's official template.
It all started with the idea of developing my personal website as API documentation. This repo contains a html generator and sample json of user data. And of course the result of the given json.
This is neither a well written nor well documented project. I'll be working on developing it as much as possible but contributors are welcomed too.
You need node
in order to build the project. If it's not installed, install node from here.
- Fill the
data.json
file with your info and customize endpoints as you want, here is the sample json with my info:
{
"header": {
"title": "Halil Cetiner",
"description": "apiDoc of myself 👨‍💻"
},
"user": {
"firstname": "Halil",
"lastname": "Cetiner",
"current_company": {
"name": "OakNorth",
"link": "https://oaknorth.ai"
},
"position": "Software Engineer",
"university": {
"name": "Bogazici University",
"link": "https://boun.edu.tr"
},
"github": {
"name": "gh/cetinerhalil",
"url": "https://github.com/cetinerhalil"
},
"linkedin": {
"name": "li/cetinerhalil",
"link": "https://linkedin.com/in/cetinerhalil"
},
"blog": {
"name": "md/@cetiner",
"link": "https://medium.com/@cetiner"
},
"twitter": {
"name": "tw/cetinerhalil",
"link": "https://twitter.com/cetinerhalil"
},
"instagram": {
"name": "ig/cetinerhalil",
"link": "https://instagram.com/cetinerhalil"
},
"facebook": {
"name": "fb/cetinerhalil",
"link": "https://facebook.com/cetinerhalil"
}
},
"endpoints": [{
"name": "Get User Information",
"method": "get",
"path": "/user",
"success": true,
"error": {
"code": "404",
"errorText": "Not Found",
"field": "UserNotFound",
"message": "I'm usually accessible but if you get this error, try halil@cetiner.me."
}
},
{
"name": "Update User Information",
"method": "patch",
"path": "/user",
"success": false,
"error": {
"code": "403",
"codeText": "Forbidden",
"field": "UpdateNotAllowed",
"message": "Don't you dare try to get into my personal space. “I'm a very private person.”."
}
}
]
}
Well, after filling the json, you are almost all set.
-
Run the script
adapt.js
, which will adapt your info to apiDoc structure. 😉node adapt.js
or
npm run-script adapt
If you add the name of the profiles you add like gh/cetinerhalil
, adapt will automatically parse it and replace the gh
with GitHub icon. Here are the supported icons:
Platform | Shortened |
---|---|
Behance | be |
Blogger | bl |
Discord | dc |
Dribbble | dr |
fb | |
GitHub | gh |
ig | |
li | |
Medium | md |
pt | |
Skype | sk |
Spotify | sp |
Telegram | tg |
tw | |
Vimeo | vi |
YouTube | yt |
After editing the json file and running the script, your personal website is ready. From then on, all you need are index.html
file and assets
folder.
As I said, this project is some sort of a clone of the template of apiDoc.
Hence, no rights reserved by me. Thanks to the creators of apiDoc for great tool which I've been using for years.