Coder Social home page Coder Social logo

luxdamore / nuxt-humans-txt Goto Github PK

View Code? Open in Web Editor NEW
29.0 4.0 1.0 3.99 MB

๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿป "We are people, not machines" - An initiative to know the creators of a website. Contains the information about humans to the web building - A Nuxt Module to statically integrate and generate a humans.txt author file - Based on the HumansTxt Project.

Home Page: https://luxdamore.github.io/nuxt-humans-txt

License: MIT License

JavaScript 90.74% CSS 1.90% Vue 7.36%
nuxt-module vuejs nuxtjs nuxt modules humans humans-txt author robots-txt static

nuxt-humans-txt's Introduction

๐Ÿ”Œ Nuxt Humans Txt

Code Quality Dependencies Circle CI npm downloads npm version Donate

'We are people, not machines'. An initiative to know the creators of a website. Contains the information about humans to the web building - A Nuxt Module to statically integrate and generate a humans.txt author file - Based on the HumansTxt Project.

๐Ÿ’˜ Motivation

What is humans.txt?

It's an initiative for knowing the people behind a website. It's a TXT file that contains information about the different people who have contributed to building the website.

Why a TXT?

Because it's something fast to create. Because it's not intrusive with the code. More often than not, the owners of the site don't like the authors signing it; they claim that doing so may make the site less efficient. By adding a txt file, you can prove your authorship (not your property) in an external and accessible way.

Who should I mention

Whoever you want to, provided they wish you to do so. You can mention the developer, the designer, the copywriter, the webmaster, the SEO, SEM or SMO... As you can see, the number of people who may take part of the creation of a site can be big, so the list is almost endless.

Humans.txt Project: You can read more about it, on the website.


๐Ÿ’ก Lighthouse

No changes on audits.

Lighthouse Audit before Lighthouse Audit after


Setup

  • Add @luxdamore/nuxt-humans-txt dependency to your project;
  • Setup @luxdamore/nuxt-humans-txt as a buildModules in your nuxt.config.js file;

N.B.: for nuxt < v2.9, you must use modules instead of buildModules.

    # cmd
    yarn add @luxdamore/nuxt-humans-txt # or npm install --save @luxdamore/nuxt-humans-txt

Configuration

N.B.: It's recommended to append static/humans.txt (depending on your-static folder-path) to the .gitignore file.

    // nuxt.config.js
    export default {
        buildModules: [ '@luxdamore/nuxt-humans-txt' ], // For `nuxt < v2.9`, you must use `modules` instead of `buildModules`
        // Default config
        humansTxt: {
            enabled: true,
            hideGenericMessagesInConsole: false, // Disabled in production
            hideErrorsInConsole: false,
            fileName: 'humans.txt',
            fileEncoding: 'utf8',
            link: {
                // Inject `<link type="text/plain" rel="<link.rel>" href="<link.href><filename>" />` inside the `head`
                // Set to `link: false` to disable this behavior
                rel: 'author',
                href: '',
                hid: 'humans-txt',
            },
            keepDevelopersInformations: true, // Keep info of my work in your `humans.txt` file ๐Ÿ˜
            // "The internet is for humans"
            thanksTo: [],
            site: [
                'SITE',
                {
                    key: 'Last update',
                    value: new Date().toLocaleDateString(
                        'en-US',
                        {
                            month: '2-digit',
                            day: '2-digit',
                            year: 'numeric',
                        }
                    ),
                },
                {
                    key: 'Standards',
                    value: [
                        'HTML5',
                        'CSS3',
                        'Javascript',
                    ],
                },
                {
                    key: 'Components',
                    value: 'VueJs',
                },
                {
                    key: 'Software',
                    value: 'NuxtJs',
                },
                {
                    key: 'Language',
                    value: 'English',
                },
                {
                    key: 'Doctype',
                    value: 'HTML5',
                },
            ],
        },
    };

Ex. of config:

    // nuxt.config.js
    export default {
        humansTxt: {
            thanksTo: [
                // Simple string can be added for comments rows
                'BACKSTAGE',
                // Objects { key: 'foo', value: 'bar' } for rows with different values
                {
                    key: 'HumansTxt Plugin developer',
                    value: 'Luca Iaconelli',
                },
                {
                    key: 'From',
                    value: 'Faenza, Italy',
                },
                {
                    key: 'Twitter',
                    value: '@luxdamore',
                },
                {
                    key: 'Instagram',
                    value: 'https://www.instagram.com/luxdamore',
                },
                // Falsy values for empty-lines
                false,
            ],
            // Keep extra greets ๐Ÿ˜
            keepDevelopersInformations: true,
        },
    };

Ex. of generated txt:

    /* BACKSTAGE */
    HumansTxt Plugin developer: Luca Iaconelli
    From: Faenza, Italy
    Twitter: @luxdamore
    Instagram: https://www.instagram.com/luxdamore

    /* SITE */
    Last update: 01/13/2021
    Standards: HTML5, CSS3, Javascript
    Components: VueJs
    Software: NuxtJs
    Language: English
    Doctype: HTML5

๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป Development

  1. Clone this repository;
  2. Install dependencies using yarn install or npm install;
  3. Start development server using yarn dev or npm run dev.

๐Ÿž Issues

Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.

๐Ÿ‘ฅ Contribution

Please make sure to read the Contributing Guide before making a pull request.

๐Ÿ“– Changelog

Details changes for each release are documented in the release notes.

๐Ÿ“ƒ License

MIT License // Copyright (ยฉ) 2021-present Luca Iaconelli

๐Ÿ’ผ Hire me

Contacts

๐Ÿ’ธ Are you feeling generous today?

If You want to share a beer, we can be really good friends

Paypal // Patreon // Ko-fi

โ˜€ It's always a good day to be magnanimous - cit.

nuxt-humans-txt's People

Contributors

luxdamore avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

feilong123

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.