Skip to content

Commit c46f914

Browse files
0xPoeTurbo87
andauthored
Add language spec to code blocks (#7506)
* Add language spec to code blocks Signed-off-by: hi-rustin <[email protected]> * docs/CONTRIBUTING: Use double ticks to account for inner backticks --------- Signed-off-by: hi-rustin <[email protected]> Co-authored-by: Tobias Bieniek <[email protected]>
1 parent cd51b7b commit c46f914

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

docs/CONTRIBUTING.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ talk to:
136136

137137
| Command | Backend | Use case |
138138
| -------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------- |
139-
| `pnpm start:live` | https://crates.io | Testing UI changes with the full live site's data |
140-
| `pnpm start:staging` | https://staging-crates-io.herokuapp.com | Testing UI changes with a smaller set of realistic data |
139+
| `pnpm start:live` | <https://crates.io> | Testing UI changes with the full live site's data |
140+
| `pnpm start:staging` | <https://staging-crates-io.herokuapp.com> | Testing UI changes with a smaller set of realistic data |
141141
| `pnpm start` | Static fixture test data in `mirage/fixtures` | Setting up particular situations, see note |
142142
| `pnpm start:local` | Backend server running locally | See the Working on the backend section for setup |
143143
| `PROXY_BACKEND=https://crates.io pnpm start` | Whatever is specified in the `PROXY_BACKEND` environment variable | If your use case is not covered here |
@@ -194,11 +194,11 @@ methods we'd recommend for each operating system:
194194
> If you're missing a package, when you try to `cargo install` or `cargo
195195
build` later, you'll get an error that looks like this:
196196
>
197-
> ```
198-
> error: linking with `cc` failed: exit code: 1
199-
> [lots of output]
200-
> = note: /usr/bin/ld: cannot find -l[something]
201-
> ```
197+
> ```text
198+
> error: linking with `cc` failed: exit code: 1
199+
> [lots of output]
200+
> = note: /usr/bin/ld: cannot find -l[something]
201+
> ```
202202
>
203203
> That `[something]` is what you're missing; you'll need to do some research
204204
> to figure out what package will get you the missing library.
@@ -208,7 +208,7 @@ by typing `\q`) without any errors to connect to your running Postgres server.
208208
209209
> If you see an error that looks like this:
210210
>
211-
> ```
211+
> ```text
212212
> psql: could not connect to server: No such file or directory
213213
> Is the server running locally and accepting
214214
> connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
@@ -217,37 +217,37 @@ by typing `\q`) without any errors to connect to your running Postgres server.
217217
> You may need to start the postgreql server on your system. On a Linux system,
218218
> you can start it with this command:
219219
>
220-
> ```
220+
> ```console
221221
> sudo service postgresql start
222222
> ```
223-
223+
>
224224
> Depending on your system, its permissions, and how Postgres was installed, you
225225
> may need to use the `postgres` user for some operations (by using `sudo su -
226226
postgres`). Generally, the problem is that by default the postgres server is
227227
> only set up to allow connections by the `postrges` user. You'll know if you're
228228
> in this situation because if you try to run `psql` as yourself, you'll get
229229
> this error:
230230
>
231-
> ```
231+
> ```text
232232
> psql: FATAL: role "yourusername" does not exist
233233
> ```
234234
>
235235
> One way of fixing this is to first give yourself superuser permissions in the
236236
> database by running this and replacing `[yourusername]` with your username:
237237
>
238-
> ```
238+
> ```console
239239
> sudo -u postgres createuser --superuser [yourusername]
240240
> ```
241241
>
242242
> Next, if you try to run `psql` and get this error:
243243
>
244-
> ```
244+
> ```text
245245
> psql: FATAL: database "yourusername" does not exist
246246
> ```
247247
>
248248
> Fix that by creating a template database for yourself:
249249
>
250-
> ```
250+
> ```console
251251
> createdb [yourusername]
252252
> ```
253253
>
@@ -292,8 +292,8 @@ cargo install diesel_cli --no-default-features --features postgres --version ^2
292292
This will install a binary named `diesel`, so you should be able to run `diesel
293293
--version` to confirm successful installation.
294294

295-
> If you're on Linux and this fails with an error that looks like `error:
296-
linking with `cc` failed: exit code: 1`, you're probably missing some
295+
> If you're on Linux and this fails with an error that looks like ``error:
296+
linking with `cc` failed: exit code: 1``, you're probably missing some
297297
> Postgres related libraries. See the Postgres section above on how to fix this.
298298
299299
#### Building and serving the backend
@@ -307,7 +307,7 @@ Try using `postgres://postgres@localhost/cargo_registry` first.
307307
> If that doesn't work, change this by filling in this template with the
308308
> appropriate values where there are `[]`s:
309309
>
310-
> ```
310+
> ```text
311311
> postgres://[postgresuser]:[password]@[localhost]:[5432]/[database_name]
312312
> ```
313313
>
@@ -321,10 +321,10 @@ Try using `postgres://postgres@localhost/cargo_registry` first.
321321
> - Replace `[database_name]` with the name of the database you'd like to use.
322322
> We're going to create a database named `cargo_registry` in the next
323323
> section; change this if you'd like to name it something else.
324-
324+
>
325325
> If you receive an error that looks like:
326326
>
327-
> ```
327+
> ```text
328328
> password authentication failed for user \"postgres\"\nFATAL:
329329
> password authentication failed for user \"postgres\"\n"`
330330
> ```
@@ -383,7 +383,7 @@ restart the server):
383383
pnpm start:local
384384
```
385385

386-
And then you should be able to visit http://localhost:4200!
386+
And then you should be able to visit <http://localhost:4200>!
387387

388388
##### Using Mailgun to Send Emails
389389

@@ -457,7 +457,7 @@ cargo test
457457

458458
#### Using your local crates.io with cargo
459459

460-
Once you have a local instance of crates.io running at http://localhost:4200 by
460+
Once you have a local instance of crates.io running at <http://localhost:4200> by
461461
following the instructions in the "Working on the Backend" section, you can go
462462
to another Rust project and tell cargo to use your local crates.io instead of
463463
production.
@@ -483,7 +483,7 @@ them as the values of the `GH_CLIENT_ID` and `GH_CLIENT_SECRET` in your `.env`.
483483
Then restart your backend, and you should be able to log in to your local
484484
crates.io with your GitHub account.
485485

486-
Go to http://localhost:4200/me to get your API token and run the `cargo login`
486+
Go to <http://localhost:4200/me> to get your API token and run the `cargo login`
487487
command as directed.
488488

489489
Now you should be able to go to the directory of a crate that has no
@@ -519,7 +519,7 @@ telling `cargo` to replace crates.io with your local crates.io as a source.
519519
In this other crate's directory, create a `.cargo/config` file with this
520520
content:
521521

522-
```
522+
```toml
523523
[source]
524524

525525
[source.mirror]

0 commit comments

Comments
 (0)