1.1.0 • Published 7 years ago
genlink v1.1.0
Generate redirect link (in static way)
Install
$ npm i genlink -g
# or using in project only
$ npm i genlink --save-devUsage
// links.json
[
{
"name": "my-blog",
"url": "https://lutaonan.com"
},
{
"name": "my-github",
"url": "https://github.com/djyde"
}
]$ genlink links.jsongenlink will read the json file and generate static page at current word directory:
- my-blog
- index.html
- my-github
- index.htmlWhen you host in a static server (like localhost:3000), you can access these url like:
http://localhost:3000/my-blog # redirect to https://lutaonan.com
http://localhost:3000/my-github # redirect to https://github.com/djydepermalink
$ genlink links.json --permalink /clickgenerate:
- click
- my-blog
- index.html
- my-github
- index.htmlaccess by:
http://localhost:3000/click/my-blog # redirect to https://lutaonan.com
http://localhost:3000/click/my-github # redirect to https://github.com/djydeLicense
MIT License
