README: Syntax highlighting

Add syntax highlighting for fenced code blocks.
This commit is contained in:
regexowl 2024-07-19 11:32:19 +02:00 committed by Klara Simickova
parent 1ead9c8e3c
commit d0a143dd23

View file

@ -70,7 +70,7 @@ echo "127.0.0.1 stage.foo.redhat.com" >> /etc/hosts
Choose a runner (podman or docker), and point the SPANDX_CONFIG variable to Choose a runner (podman or docker), and point the SPANDX_CONFIG variable to
`profile/local-frontend.js` included in image-builder-frontend. `profile/local-frontend.js` included in image-builder-frontend.
``` ```bash
sudo insights-proxy/scripts/patch-etc-hosts.sh sudo insights-proxy/scripts/patch-etc-hosts.sh
export RUNNER="podman" export RUNNER="podman"
export SPANDX_CONFIG=$PATH_TO/image-builder-frontend/profiles/local-frontend.js export SPANDX_CONFIG=$PATH_TO/image-builder-frontend/profiles/local-frontend.js
@ -81,7 +81,7 @@ echo "127.0.0.1 stage.foo.redhat.com" >> /etc/hosts
In the image-builder-frontend checkout directory In the image-builder-frontend checkout directory
``` ```bash
npm install npm install
npm start npm start
``` ```
@ -109,7 +109,7 @@ For a hypothetical API called foobar
2. Create a new "empty" API file under `src/store/emptyFoobarApi.ts` that has following 2. Create a new "empty" API file under `src/store/emptyFoobarApi.ts` that has following
content: content:
```{ts} ```typescript
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'; import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react';
import { FOOBAR_API } from '../constants'; import { FOOBAR_API } from '../constants';
@ -124,13 +124,13 @@ export const emptyFoobarApi = createApi({
3. Declare new constant `FOOBAR_API` with the API url in `src/constants.ts` 3. Declare new constant `FOOBAR_API` with the API url in `src/constants.ts`
``` ```typescript
export const FOOBAR_API = 'api/foobar/v1' export const FOOBAR_API = 'api/foobar/v1'
``` ```
4. Create the config file for code generation in `api/config/foobar.ts` containing: 4. Create the config file for code generation in `api/config/foobar.ts` containing:
``` ```typescript
import type { ConfigFile } from '@rtk-query/codegen-openapi'; import type { ConfigFile } from '@rtk-query/codegen-openapi';
const config: ConfigFile = { const config: ConfigFile = {
@ -146,7 +146,7 @@ const config: ConfigFile = {
5. Update the `api.sh` script by adding a new line for npx to generate the code: 5. Update the `api.sh` script by adding a new line for npx to generate the code:
``` ```bash
npx @rtk-query/codegen-openapi ./api/config/foobar.ts & npx @rtk-query/codegen-openapi ./api/config/foobar.ts &
``` ```
@ -159,7 +159,7 @@ foobarApi.ts
7. run api generation 7. run api generation
``` ```bash
npm run api npm run api
``` ```