Skip to content

m00nbyte/generate-humanstxt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

generate-humanstxt

npm version npm downloads

Generating humans.txt using nodejs

Getting Started

npm install --save-dev @m00nbyte/generate-humanstxt

Usage

import generateTxt from '@m00nbyte/generate-humanstxt';

const options = {
    team: [
        [
            { key: '<Title>', value: '<Value>' },
            { key: '<Title>', value: '<Value>' },
            { key: '<Title>', value: '<Value>' },
            { key: '<Title>', value: '<Value>' }
        ]
    ],
    thanks: [
        [
            { key: '<Title>', value: '<Value>' },
            { key: '<Title>', value: '<Value>' },
            { key: '<Title>', value: '<Value>' },
            { key: '<Title>', value: '<Value>' }
        ]
    ],
    site: [
        { key: '<Title>', value: '<Value>' },
        { key: '<Title>', value: '__date__' },
        { key: '<Title>', value: ['<Value>', '<Value>', '<Value>'] }
    ]
};

generateTxt(options)
    .then((content) => {
        console.log(content);

        return content;
    })
    .catch((error) => {
        throw error;
    });

If you pass __DATE__ as value, it will return the current date

For more informations about humans.txt check out the official website

CLI

node generate-humanstxt --config /path/to/config.json
  • path - optional path for humans.txt (this should contain the full path including the file name, example: /path/to/humans.txt).
  • options - see options above.

Contribution

Feel free to submit issues or pull requests.

Like my work?

This project needs a ⭐ from you. Don't forget to leave a star.

Buy Me A Coffee

About

A nodejs package to generate a humans.txt file

Resources

License

Stars

Watchers

Forks

Packages

No packages published