Skip to content

Commit 7bb3bb5

Browse files
committed
docs: simplify readme
1 parent c625124 commit 7bb3bb5

2 files changed

Lines changed: 30 additions & 86 deletions

File tree

.all-contributorsrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"projectName": "vanityURLs",
3-
"projectOwner": "bhdicaire",
3+
"projectOwner": "vanityURLs",
44
"repoType": "github",
55
"repoHost": "https://github.com",
66
"files": [

README.md

Lines changed: 29 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,39 @@
11
![logo](.github/banner.png)
22

3-
[![GitHub license](https://img.shields.io/github/license/bhdicaire/vanityURLs)](https://github.com/vanityURLs/code/blob/main/LICENSE) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-40F766E.svg)](code_of_conduct.md) [![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?color=0F766E&style=flat-square)](#contributors)
3+
[![License](https://img.shields.io/github/license/vanityURLs/code?style=flat-square&labelColor=111827&color=0F766E)](LICENSE) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-0F766E?style=flat-square&labelColor=111827)](.github/CODE_OF_CONDUCT.md) [![All Contributors](https://img.shields.io/badge/all_contributors-4-0F766E?style=flat-square&labelColor=111827)](#contributors)
44

5-
vanityURLs is a _simple_ solution to deploy a budget-friendly Url Shortener. It runs at scale in your Cloudflare subscription with continuous integration.
5+
vanityURLs is a Cloudflare Workers redirector for running a branded short-link domain as code. Links, schedules, destination policies, localized instance pages, and operator configuration live in Git; the build produces the Worker assets Cloudflare deploys.
66

7-
> If you don't own an a Cloudflare subscription already, you can create your free account today so you can experience everything without spending a dime.
7+
## Documentation
88

9-
Features:
10-
* Fully branded internet domain using Cloudflare's [DNS](https://www.cloudflare.com/en-ca/application-services/products/dns/) & [Pages](https://pages.cloudflare.com/) so your links are compact and pretty
11-
* URL redirection (301, 302, 303, 307 and 308)
12-
* Advanced redirection with splats (e.g., /news/* → /blog/:splat )
13-
* Continuous integration managed by Cloudflare Page Engine
14-
* Configurable destination policies with `blocked_keywords` in `v8s-policies.json`
15-
* Exact-match destination previews through `/expand/` and the `v8s --print <slug>` CLI helper
16-
* Link expiration dates with the `expires_at` field in `v8s-links.txt`
9+
The website is the source of truth for setup and operations:
1710

18-
My objective is to work at the command line and automate it. So feel free to fork, and customize.
11+
* [Getting started](https://www.VanityURLs.link/en/docs/getting-started/)
12+
* [Cloudflare deployment](https://www.VanityURLs.link/en/docs/cloudflare/)
13+
* [Repository layout](https://www.VanityURLs.link/en/docs/repository-layout/)
14+
* [Customization model](https://www.VanityURLs.link/en/docs/customize-overview/)
15+
* [Link format](https://www.VanityURLs.link/en/docs/link-format/)
16+
* [Schedules](https://www.VanityURLs.link/en/docs/schedules/)
17+
* [Destination policies](https://www.VanityURLs.link/en/docs/blocklist/)
18+
* [Local CLI](https://www.VanityURLs.link/en/docs/cli/)
19+
* [Runtime registry](https://www.VanityURLs.link/en/docs/runtime-registry/)
20+
* [Validation and CI](https://www.VanityURLs.link/en/docs/validation-ci/)
1921

20-
## What problem does it solve and why is it useful?
22+
## Local Workflow
2123

22-
You’ve been there too, a fully branded short URLs is useful but your low volume does not justify a commercial solution. Furthermore, links generated by a free solution will eventually expire and they're not privacy friendly.
24+
Common commands:
2325

24-
This kind of solution is known as TinyURL, tiny url, shorten that long URL, URL Shortening Service, goo.gl, bit.ly, short.io, etc.
26+
```sh
27+
npm install
28+
npm run setup
29+
npm run check
30+
npm run build
31+
./scripts/lnk --help
32+
```
2533

26-
### It's bullet proof
34+
Run `npm run local-install` to install workstation helpers and create local configuration. Run `npm run local-publish` after local edits when you want checks, commit selection, and push handled in one step.
2735

28-
As long as you secure your Github and Cloudflare accounts with robust authentication, there is not much that can go wrong with such simple solution. It use the products as designed, there is no hack involved.
29-
30-
## Setup
31-
32-
1. Register a _tiny_ internet domain name with your [preferred vendor](https://www.cloudflare.com/en-ca/products/registrar/)
33-
2. If you don't own an a [Cloudflare subscription](https://dash.cloudflare.com/) already, you need to create a free account
34-
3. Add the _tiny_ internet domain name to [Cloudflare DNS](https://dash.cloudflare.com/)
35-
4. [Follow the instructions](https://vanityurls.link/en/docs/getting-started/) to fork the GitHub repository and customize your setup
36-
5. Use the [`lnk` bash script](https://vanityurls.link/en/docs/guide/advanced/cli/) to shorten, personalize, and share fully branded short URLs with continuous integration on Cloudflare
37-
38-
## Implemented request references
39-
40-
The 2.x runtime includes a few requested capabilities that are easy to
41-
miss because they are implemented through configuration or helper scripts:
42-
43-
* Short URL policies are handled through `blocked_keywords` in
44-
`defaults/v8s-policies.json` or an instance-specific
45-
`custom/v8s-policies.json`.
46-
* Looking up a destination from a short name is available in two places:
47-
`/expand/` previews exact-match short links in the deployed Worker, and
48-
`v8s --print <slug>` prints a destination from the generated local
49-
registry after `npm run build`. Run `npm run local-install` once to
50-
install the Bash/Zsh helper and opt in to local registry syncing.
51-
* Expiration dates are stored with the `expires_at` field in
52-
`v8s-links.txt`; `./scripts/lnk --expires-at DATE ...` writes that
53-
value, and the Worker treats expired links as expired at runtime.
54-
55-
## Developer CLI reference
56-
57-
Use `./scripts/lnk --help` as the local quick reference for link,
58-
schedule, and block policy edits. The detailed product documentation lives
59-
at <https://www.VanityURLs.link/en/docs>.
60-
61-
Run `npm run local-install` to create or update
62-
`custom/v8s-local-config.json`, install the shell helper, install the
63-
`lnk` CLI, and write the local repository path used by workstation helpers.
64-
Run `npm run local-publish` after manual local edits; it runs
65-
`npm run check`, then commits and pushes the configured local paths with the
66-
commit message from `v8s-local-config.json`. It uses a more specific
67-
configured message when only `custom/v8s-links.txt`,
68-
`custom/v8s-policies.json`, or `custom/v8s-site-config.json` changed.
69-
70-
The CLI intentionally documents only the user-facing environment flags:
71-
72-
* `DRY_RUN=true` prints the planned change without writing, committing, or
73-
pushing.
74-
* `V8S_REPO=PATH` points copied local helpers at the local repository path.
75-
* `V8S_LINKS_OWNER=OWNER` changes the default owner field for new links.
76-
* `V8S_LINKS_FILE=FILE` overrides the links file.
77-
* `V8S_SCHEDULES_FILE=FILE` overrides the schedule file.
78-
* `V8S_POLICY_FILE=FILE` overrides the block policy file.
79-
80-
Successful write operations run `npm run check`, then commit and push
81-
automatically so Cloudflare can deploy the generated site.
82-
83-
## Limitations
84-
85-
As this code is deployed on Cloudflare Pages, there are some product limits to be aware of:
86-
87-
* A maximum of 2,000 static redirects and 100 dynamic redirects, for a combined total of 2,100 redirects ([source](https://developers.cloudflare.com/pages/platform/limits/#redirects)).
88-
* The Free plan supports up to 500 automated builds per month ([source](https://developers.cloudflare.com/pages/platform/limits/#builds)).
89-
90-
Most of these limits wouldn't be reached in general use, but it's good to note for larger-scale deployments.
91-
92-
Platform-wise, the `lnk` scripts require `bash` and so are not natively compatible with Windows at this time.
36+
See the [CLI documentation](https://www.VanityURLs.link/en/docs/cli/) and [custom override documentation](https://www.VanityURLs.link/en/docs/custom-overrides/) for the details.
9337

9438
## Contributions
9539

@@ -101,10 +45,10 @@ Platform-wise, the `lnk` scripts require `bash` and so are not natively compatib
10145
<table>
10246
<tbody>
10347
<tr>
104-
<td align="center" valign="top" width="16.66%"><a href="https://github.com/bhdicaire"><img src="https://avatars.githubusercontent.com/u/1316765?v=4?s=100" width="100px;" alt="Benoît H. Dicaire"/><br /><sub><b>Benoît H. Dicaire</b></sub></a><br /><a href="https://github.com/bhdicaire/vanityURLs/commits?author=bhdicaire" title="Code">💻</a> <a href="https://github.com/bhdicaire/vanityURLs/commits?author=bhdicaire" title="Documentation">📖</a> <a href="#security-bhdicaire" title="Security">🛡️</a></td>
48+
<td align="center" valign="top" width="16.66%"><a href="https://github.com/bhdicaire"><img src="https://avatars.githubusercontent.com/u/1316765?v=4?s=100" width="100px;" alt="Benoît H. Dicaire"/><br /><sub><b>Benoît H. Dicaire</b></sub></a><br /><a href="https://github.com/vanityURLs/code/commits?author=bhdicaire" title="Code">💻</a> <a href="https://github.com/vanityURLs/code/commits?author=bhdicaire" title="Documentation">📖</a> <a href="#security-bhdicaire" title="Security">🛡️</a></td>
10549
<td align="center" valign="top" width="16.66%"><a href="http://felixleger.com"><img src="https://avatars.githubusercontent.com/u/7781739?v=4?s=100" width="100px;" alt="Félix Léger"/><br /><sub><b>Félix Léger</b></sub></a><br /><a href="#ideas-felleg" title="Ideas, Planning, & Feedback">🤔</a> <a href="#userTesting-felleg" title="User Testing">📓</a> <a href="#promotion-felleg" title="Promotion">📣</a></td>
106-
<td align="center" valign="top" width="16.66%"><a href="https://xvii.au"><img src="https://avatars.githubusercontent.com/u/446329?v=4?s=100" width="100px;" alt="Jake Edwards"/><br /><sub><b>Jake Edwards</b></sub></a><br /><a href="https://github.com/bhdicaire/vanityURLs/commits?author=XVII" title="Documentation">📖</a></td>
107-
<td align="center" valign="top" width="16.66%"><a href="https://github.com/slig"><img src="https://avatars.githubusercontent.com/u/37779?v=4?s=100" width="100px;" alt="Tiago Serafim"/><br /><sub><b>Tiago Serafim</b></sub></a><br /><a href="https://github.com/bhdicaire/vanityURLs/commits?author=slig" title="Code">💻</a></td>
50+
<td align="center" valign="top" width="16.66%"><a href="https://xvii.au"><img src="https://avatars.githubusercontent.com/u/446329?v=4?s=100" width="100px;" alt="Jake Edwards"/><br /><sub><b>Jake Edwards</b></sub></a><br /><a href="https://github.com/vanityURLs/code/commits?author=XVII" title="Documentation">📖</a></td>
51+
<td align="center" valign="top" width="16.66%"><a href="https://github.com/slig"><img src="https://avatars.githubusercontent.com/u/37779?v=4?s=100" width="100px;" alt="Tiago Serafim"/><br /><sub><b>Tiago Serafim</b></sub></a><br /><a href="https://github.com/vanityURLs/code/commits?author=slig" title="Code">💻</a></td>
10852
</tr>
10953
</tbody>
11054
</table>
@@ -118,4 +62,4 @@ Platform-wise, the `lnk` scripts require `bash` and so are not natively compatib
11862
* [dnsConfiguration](https://github.com/bhdicaire/dnsConfiguration) – Automated DNS configuration with StackOverflow's DNSControl and Git
11963

12064
## Licence
121-
**vanityURLs** is Copyright 2023 Benoît H. Dicaire and [licensed under the MIT licence](https://github.com/vanityURLs/vanityURLs/blob/main/LICENSE).
65+
**vanityURLs** is Copyright 2023 Benoît H. Dicaire and [licensed under the MIT licence](https://github.com/vanityURLs/code/blob/main/LICENSE).

0 commit comments

Comments
 (0)