Skip to content

Commit 82fab0b

Browse files
committed
docs: add branding and documentation links to the READMEs
1 parent 681dd37 commit 82fab0b

4 files changed

Lines changed: 112 additions & 39 deletions

File tree

README.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
1-
# ngx-api-client
2-
3-
[![npm](https://img.shields.io/npm/v/@ismailza/ngx-api-client.svg)](https://www.npmjs.com/package/@ismailza/ngx-api-client)
4-
[![CI](https://github.com/ismailza/ngx-api-client/actions/workflows/ci.yml/badge.svg)](https://github.com/ismailza/ngx-api-client/actions/workflows/ci.yml)
5-
[![Release](https://github.com/ismailza/ngx-api-client/actions/workflows/release.yml/badge.svg)](https://github.com/ismailza/ngx-api-client/actions/workflows/release.yml)
6-
[![license](https://img.shields.io/npm/l/@ismailza/ngx-api-client.svg)](./LICENSE)
7-
8-
A typed, interceptor-driven HTTP layer for Angular.
1+
<p align="center">
2+
<a href="https://ismailza.github.io/ngx-api-client/">
3+
<img src="https://ismailza.github.io/ngx-api-client/img/logo.svg" alt="" width="88" height="88">
4+
</a>
5+
</p>
6+
7+
<h1 align="center">ngx-api-client</h1>
8+
9+
<p align="center">
10+
A typed, interceptor-driven HTTP layer for Angular.
11+
</p>
12+
13+
<p align="center">
14+
<a href="https://ismailza.github.io/ngx-api-client/"><strong>Documentation</strong></a> ·
15+
<a href="https://www.npmjs.com/package/@ismailza/ngx-api-client"><strong>npm</strong></a> ·
16+
<a href="https://ismailza.github.io/ngx-api-client/docs/getting-started/quick-start"><strong>Quick start</strong></a> ·
17+
<a href="https://ismailza.github.io/ngx-api-client/docs/api/provide-api"><strong>API reference</strong></a>
18+
</p>
19+
20+
<p align="center">
21+
<a href="https://www.npmjs.com/package/@ismailza/ngx-api-client"><img src="https://img.shields.io/npm/v/@ismailza/ngx-api-client.svg" alt="npm version"></a>
22+
<a href="https://www.npmjs.com/package/@ismailza/ngx-api-client"><img src="https://img.shields.io/npm/dm/@ismailza/ngx-api-client.svg" alt="npm downloads"></a>
23+
<a href="https://ismailza.github.io/ngx-api-client/"><img src="https://img.shields.io/badge/docs-online-brightgreen.svg" alt="Documentation"></a>
24+
<a href="https://github.com/ismailza/ngx-api-client/actions/workflows/ci.yml"><img src="https://github.com/ismailza/ngx-api-client/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
25+
<a href="https://github.com/ismailza/ngx-api-client/actions/workflows/release.yml"><img src="https://github.com/ismailza/ngx-api-client/actions/workflows/release.yml/badge.svg" alt="Release"></a>
26+
<a href="./LICENSE"><img src="https://img.shields.io/npm/l/@ismailza/ngx-api-client.svg" alt="License"></a>
27+
</p>
928

1029
`HttpClient` gives you a request. It doesn't give you a _policy_ — where the base
1130
URL comes from, how a failed response becomes something your components can

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
"watch": "ng build --watch --configuration development",
99
"test": "ng test",
1010
"lint": "eslint .",
11-
"lint:fix": "eslint . --fix"
11+
"lint:fix": "eslint . --fix",
12+
"docs:install": "npm --prefix website ci",
13+
"docs:start": "npm --prefix website start",
14+
"docs:build": "npm --prefix website run build",
15+
"docs:serve": "npm --prefix website run serve"
1216
},
1317
"private": true,
1418
"packageManager": "npm@11.9.0",

projects/ngx-api-client/README.md

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,30 @@
1-
# ngx-api-client
2-
3-
A typed, interceptor-driven HTTP layer for Angular.
1+
<p align="center">
2+
<a href="https://ismailza.github.io/ngx-api-client/">
3+
<img src="https://ismailza.github.io/ngx-api-client/img/logo.svg" alt="" width="88" height="88">
4+
</a>
5+
</p>
6+
7+
<h1 align="center">ngx-api-client</h1>
8+
9+
<p align="center">
10+
A typed, interceptor-driven HTTP layer for Angular.
11+
</p>
12+
13+
<p align="center">
14+
<a href="https://ismailza.github.io/ngx-api-client/"><strong>Documentation</strong></a> ·
15+
<a href="https://www.npmjs.com/package/@ismailza/ngx-api-client"><strong>npm</strong></a> ·
16+
<a href="https://ismailza.github.io/ngx-api-client/docs/getting-started/quick-start"><strong>Quick start</strong></a> ·
17+
<a href="https://ismailza.github.io/ngx-api-client/docs/api/provide-api"><strong>API reference</strong></a>
18+
</p>
19+
20+
<p align="center">
21+
<a href="https://www.npmjs.com/package/@ismailza/ngx-api-client"><img src="https://img.shields.io/npm/v/@ismailza/ngx-api-client.svg" alt="npm version"></a>
22+
<a href="https://www.npmjs.com/package/@ismailza/ngx-api-client"><img src="https://img.shields.io/npm/dm/@ismailza/ngx-api-client.svg" alt="npm downloads"></a>
23+
<a href="https://ismailza.github.io/ngx-api-client/"><img src="https://img.shields.io/badge/docs-online-brightgreen.svg" alt="Documentation"></a>
24+
<a href="https://github.com/ismailza/ngx-api-client/actions/workflows/ci.yml"><img src="https://github.com/ismailza/ngx-api-client/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
25+
<a href="https://github.com/ismailza/ngx-api-client/actions/workflows/release.yml"><img src="https://github.com/ismailza/ngx-api-client/actions/workflows/release.yml/badge.svg" alt="Release"></a>
26+
<a href="./LICENSE"><img src="https://img.shields.io/npm/l/@ismailza/ngx-api-client.svg" alt="License"></a>
27+
</p>
428

529
`HttpClient` gives you a request. It doesn't give you a _policy_ — where the base
630
URL comes from, how a failed response becomes something your components can
@@ -263,14 +287,16 @@ matrix currently covers.
263287

264288
## Contributing
265289

266-
```bash
267-
npm install
268-
npm test # 131 specs, vitest
269-
npm run build
270-
```
290+
Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) before opening an issue or pull request.
271291

272-
Issues and pull requests are welcome.
292+
## Code of Conduct
293+
294+
Please read our [Code of Conduct](CODE_OF_CONDUCT.md) to help us maintain a welcoming and inclusive community.
273295

274296
## License
275297

276-
[MIT](../../LICENSE) © Ismail ZAHIR
298+
[MIT](./LICENSE) © Ismail ZAHIR
299+
300+
## Support the Project
301+
302+
If you find this library useful, consider giving it a ⭐ on GitHub. It helps others discover the project and motivates future development.

website/README.md

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,67 @@
1-
# Website
1+
# Documentation website
22

3-
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
3+
The documentation site for [`@ismailza/ngx-api-client`](https://www.npmjs.com/package/@ismailza/ngx-api-client),
4+
built with [Docusaurus](https://docusaurus.io/).
45

5-
## Installation
6+
Published at **https://ismailza.github.io/ngx-api-client/**.
7+
8+
## Local development
9+
10+
From the repository root:
611

712
```bash
8-
npm install
13+
npm run docs:start
914
```
1015

11-
**Note**: feel free to use the package manager of your choice.
12-
13-
## Local Development
16+
…or from this directory:
1417

1518
```bash
19+
npm install
1620
npm run start
1721
```
1822

19-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
23+
Most changes are reflected live without restarting the server.
2024

2125
## Build
2226

2327
```bash
24-
npm run build
28+
npm run build # static output in ./build
29+
npm run serve # serve the production build locally
30+
npm run typecheck # type-check the site source
2531
```
2632

27-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
28-
29-
## Deployment
33+
`npm run build` fails on broken internal links, so it is the check to run before
34+
opening a documentation pull request.
3035

31-
Using SSH:
36+
## Structure
3237

33-
```bash
34-
USE_SSH=true npm run deploy
38+
```
39+
docs/
40+
intro.md What the library is and what it deliberately isn't
41+
getting-started/ Installation and quick start
42+
guides/ One page per concern (configuration, versioning, retry, …)
43+
api/ Reference for the public API surface
44+
src/
45+
pages/index.tsx Landing page
46+
components/ Landing page sections
47+
css/custom.css Theme tokens
48+
sidebars.ts Explicit sidebar — new pages must be added here
49+
docusaurus.config.ts Site config, navbar, footer, deployment URL
3550
```
3651

37-
Not using SSH:
52+
The sidebar is defined explicitly rather than autogenerated, so **a new page is
53+
invisible until it is listed in `sidebars.ts`**.
3854

39-
```bash
40-
GIT_USER=<Your GitHub username> npm run deploy
41-
```
55+
## Writing conventions
56+
57+
- Document what the code does, not what it might do — check the source in
58+
`projects/ngx-api-client/src/lib` before stating a default.
59+
- Every option table gives the type, the default, and whether it can be
60+
overridden per request.
61+
- Code samples are complete enough to paste into an application.
62+
63+
## Deployment
4264

43-
If you are using GitHub Pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
65+
`.github/workflows/docs.yml` builds the site on every pull request that touches
66+
`website/`, and deploys to GitHub Pages on push to `main`. No manual `npm run
67+
deploy` is needed.

0 commit comments

Comments
 (0)