Install the package
Four MIT packages write the record, draw the credit and open its card. They need no account and call no server.
Install two packages to draw a credit.
@nodsto/record holds the record and checks it. @nodsto/credit draws the line from it.
npm install @nodsto/record @nodsto/credit
pnpm add @nodsto/record @nodsto/credit
yarn add @nodsto/record @nodsto/credit
bun add @nodsto/record @nodsto/credit
Each package does one job.
| Package | What it holds | Where it runs |
|---|---|---|
@nodsto/record | The record, its roles, the check that it is sound, and its JSON-LD and humans.txt. | In your build |
@nodsto/credit | The line in the footer, its stylesheet, and the script that opens a card. | The line in your build, the card in the browser |
@nodsto/templates | 11 templates to copy into your project, among them the line styles and the cards. | In your build |
@nodsto/page | The record as a page of plain HTML at an address of your own. | In your build |
All four are under the MIT licence.
Copy the templates into your project.
A template is a function that returns markup, and a stylesheet. You copy its folder and the files become yours to edit. Your build imports your copy, so an update to the package leaves it as you made it.
Terminal
npm install @nodsto/templates mkdir -p src/nods cp -R node_modules/@nodsto/templates/panel-record src/nods/ cp -R node_modules/@nodsto/templates/panel-poster src/nods/
@nodsto/templates/manifest.json lists every template with its files and its tokens. Open a card from the credit shows one in use.
The credit adds nothing a page has to wait for.
- The line is HTML and a stylesheet, written in your build.
- It runs no script and makes no request when the page loads.
- It sets no cookie.
- The block for the record on the next page is 1048 bytes gzipped, stylesheet and markup together.
Questions
Does a credit run a script when the page loads?
No. The line is HTML and a stylesheet, written in your build. It runs no script and makes no request when the page loads.
Does it set a cookie?
No. It sets no cookie.
Do the packages need an account?
No. All four are under the MIT licence, need no account and make no request to nods.