Skip to content

Commit

Permalink
docs: improve README.md and config files
Browse files Browse the repository at this point in the history
  • Loading branch information
kawarimidoll committed Aug 14, 2021
1 parent ff2c6b5 commit 5d21805
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 4 deletions.
79 changes: 77 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,89 @@
<!-- <a href="https://nest.land/package/denote"><img alt="nest badge" src="https://nest.land/badge.svg"></a> -->
</p>

A minimal page generator for Deno Deploy that _denotes_ you
A minimal profile page generator for Deno Deploy that _denotes_ you

[Demo](https://denote.deno.dev/denote)

## Getting started

```
$ # to install denote cli
$ deno install --allow-read --allow-write --allow-net --no-check --force https://deno.land/x/denote/cli/denote.ts
$ denote init denote.yml
$ # to install example config
$ denote init ./denote.yml
$ # to see in local server
$ denote serve ./denote.yml
$ # to create or update the page
$ denote register ./denote.yml --name your-name --token your-token
$ # to remove the page
$ denote unregister --name your-name --token your-token
```

- `name`: The name of your page (`https://denote.deno.dev/[name]`). This must be
unique in Denote and matched with `/[a-z][a-z0-9_-]{2,64}/`.
- `token`: The secret token. This is hashed and saved. This must matched with
`/[!-~]{8,128}/`.

## API

You can call API manually with any tools like `curl`. The endpoint is
`https://denote.deno.dev/`.

### Register

`POST` request to register your data. You can use this to create and update.

`name`, `token` and `config` (the config JSON object) are required.

`name` and `token` that you saved are required when you update.

### Unregister

`DELETE` request to unregister your data. `name` and `token` that you saved are
required.

## Config keys

The config data has these keys.

- name
- The name shown on the top of the page. When this is left blank, your page
path (`https://denote.deno.dev/[name]`) is used. This is also used in the
title of html.
- image
- The URL of the main image of the page. This is also used in 'og:image'. When
this is left blank, it is just skipped.
- favicon
- The URL of the favicon of the page. When this is left blank,
[Denote logo](https://github.com/kawarimidoll/denote/blob/main/logo.svg) is
used.
- description
- The comments shown under the page name. This is also used in
'og:description'. When this is left blank, it is just skipped.
- twitter
- Your twitter username. This is used in 'twitter:site'. When this is left
blank, it is just skipped.
- list **required**
- The list of the group of the contents. List group that has unique ids are
required.
- The key of the group is used as the ID of html elements. This must have
'icon' and 'items'. 'icon' is the icon of this group. 'items' is the list of
the contents.
- Each item in 'items' can have 'icon', 'text', and 'link'.

See also
[example.yml](https://github.com/kawarimidoll/denote/blob/main/example.yml) that
generated by `denote init` and
[denote.yml](https://github.com/kawarimidoll/denote/blob/main/denote.yml) that
running on [Demo](https://denote.deno.dev/denote).

Visit [icongram](https://icongr.am) to search available icons.

## Prior arts

- inspired by [Linktree](https://linktr.ee/)
2 changes: 1 addition & 1 deletion denote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ list:
text: Hosting on Deno Deploy
link: https://deno.com/deploy
- icon: entypo/github
text: More useful with GitHub Actions
text: Auto-update by GitHub Actions
link: https://github.com/kawarimidoll/denote/blob/main/.github/workflows/cicd.yml
- icon: entypo/folder-images
text: Icons by icongr.am
Expand Down
2 changes: 1 addition & 1 deletion example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

list:
# The list of the group of the contents.
# This values is required.
# These values are required.

id-1:
# The key of the group is used as the ID of html elements.
Expand Down

0 comments on commit 5d21805

Please sign in to comment.