Skip to content

Commit 1095df2

Browse files
committed
📝 docs(readme): clarify badge examples to avoid confusion [ci skip]
Clarify that Markdown and HTML snippets are usage examples and not broken rendering. Helps future contributors avoid misunderstanding the badge preview. Relates to #3244
1 parent b7a0db3 commit 1095df2

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

README.md

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@
2222

2323
## Table of Contents
2424

25-
- [Getting Started](#getting-started)
26-
- [Contributing](#contributing)
27-
- [Types of contributions](#types-of-contributions)
28-
- [Licensing](#license)
29-
- [Acknowledgements](#acknowledgements)
30-
- [Legacy GitBook](#legacy-gitbook-deprecated)
25+
- [Getting Started](#getting-started)
26+
- [Contributing](#contributing)
27+
- [Types of contributions](#types-of-contributions)
28+
- [Licensing](#license)
29+
- [Acknowledgements](#acknowledgements)
30+
- [Legacy GitBook](#legacy-gitbook-deprecated)
3131

3232
## Getting Started
3333

3434
To run a local version of this project, please follow these simple steps.
3535

3636
### Prerequisites
3737

38-
- Node.js (Version: >=20.6)
39-
- Use nvm for easy Node management
40-
- Bun (Version: >=1.2.1)
41-
- We use a text-based lockfile which isn't supported below 1.2.1
38+
- Node.js (Version: >=20.6)
39+
- Use nvm for easy Node management
40+
- Bun (Version: >=1.2.1)
41+
- We use a text-based lockfile which isn't supported below 1.2.1
4242

4343
### Set up
4444

@@ -49,7 +49,6 @@ git clone https://github.com/gitbookIO/gitbook.git
4949
```
5050

5151
2. Ensure you are using the project's version of `node`. Running `nvm use` will change your local version to the correct one.
52-
5352
3. Install the project's dependencies through Bun.
5453

5554
```
@@ -72,15 +71,15 @@ bun dev:v2
7271

7372
examples:
7473

75-
- http://localhost:3000/url/gitbook.com/docs
76-
- http://localhost:3000/url/open-source.gitbook.io/midjourney
74+
- http://localhost:3000/url/gitbook.com/docs
75+
- http://localhost:3000/url/open-source.gitbook.io/midjourney
7776

7877
Any published GitBook site can be accessed through your local development instance, and any updates you make to the codebase will be reflected in your browser.
7978

8079
### Other development commands
8180

82-
- `bun format`: format the code
83-
- `bun lint`: lint the code
81+
- `bun format`: format the code
82+
- `bun lint`: lint the code
8483

8584
### CI and testing
8685

@@ -124,13 +123,13 @@ Encounter a bug or find an issue you'd like to fix? Helping us fix issues relate
124123

125124
## Deployment
126125

127-
> [!WARNING]
126+
> [!WARNING]
128127
> While it is possible to self-host this project, we do not recommend this unless you are certain this option fits your need.
129-
>
128+
>
130129
> _Looking to add a specific feature in GitBook? Head to our [contributing guide](https://github.com/GitbookIO/gitbook/blob/main/.github/CONTRIBUTING.md) to get started._
131-
>
130+
>
132131
> Self-hosting this project puts the responsibility of maintaining and merging future updates on **you**. We cannot guarantee support, maintenance, or updates to forked and self-hosted instances of this project.
133-
>
132+
>
134133
> We want to make it as easy as possible for our community to collaborate and push the future of GitBook, which is why we encourage you to contribute to our product directly instead of creating your own version.
135134
136135
This project allows you to self-host the rendering portion of your GitBook published content. Self-hosting has pros and cons.
@@ -155,10 +154,14 @@ See `LICENSE` for more information.
155154
<a href="https://gitbook.com"><img src="https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=FDA599"></a>
156155
</p>
157156

157+
Markdown example:
158+
158159
```md
159160
[![GitBook](https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=3F89A1)](https://www.gitbook.com/preview?utm_source=gitbook_readme_badge&utm_medium=organic&utm_campaign=preview_documentation&utm_content=link)
160161
```
161162

163+
HTML example:
164+
162165
```html
163166
<a href="https://www.gitbook.com/preview?utm_source=gitbook_readme_badge&utm_medium=organic&utm_campaign=preview_documentation&utm_content=link">
164167
<img
@@ -171,10 +174,10 @@ See `LICENSE` for more information.
171174

172175
GitBook wouldn't be possible without these projects:
173176

174-
- [Next.js](https://nextjs.org/)
175-
- [Bun](https://bun.sh/)
176-
- [Tailwind CSS](https://tailwindcss.com/)
177-
- [Framer Motion](https://www.npmjs.com/package/framer-motion)
177+
- [Next.js](https://nextjs.org/)
178+
- [Bun](https://bun.sh/)
179+
- [Tailwind CSS](https://tailwindcss.com/)
180+
- [Framer Motion](https://www.npmjs.com/package/framer-motion)
178181

179182
## Contributors
180183

@@ -185,3 +188,4 @@ GitBook wouldn't be possible without these projects:
185188
## Legacy GitBook (Deprecated)
186189

187190
Our previous version of GitBook and it's CLI tool are now deprecated. You can still view the old repository and it's commits on this [branch](https://github.com/GitbookIO/gitbook/tree/legacy).
191+

0 commit comments

Comments
 (0)