Skip to content

Commit

Permalink
chore: bump spec-renderer version to allow languages to be customized (
Browse files Browse the repository at this point in the history
  • Loading branch information
davidma415 authored Nov 2, 2023
1 parent 16c9412 commit 8832736
Show file tree
Hide file tree
Showing 3 changed files with 474 additions and 216 deletions.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,60 @@ Please follow the following branch naming scheme when creating your branch:

This repo uses [Semantic Release](https://github.com/semantic-release/semantic-release) for automated releases once per week. The release is triggered by a GitHub Action on the `main` branch. The release is based on the commit messages, so please follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.

## Spec Customization

If you need to add or remove languages to the code snippet languages, you can pass in an object to `SpecDetails`.

You may pass in a `themeOverrides` object to `SpecDetails`. Here is an example if you would like to override languages:

```javascript
<SpecDetails
:theme-overrides="{
languages: [
{
prismLanguage: 'bash',
target: 'shell',
client: 'curl'
},
{
prismLanguage: 'javascript',
target: 'javascript',
client: 'xhr'
},
{
prismLanguage: 'java',
target: 'java'
},
]
}"
/>
```

The default languages are the following. They will be overridden by what you pass in to `SpecDetails`

```javascript
languages = [
{
prismLanguage: 'bash',
target: 'shell',
client: 'curl'
},
{
prismLanguage: 'javascript',
target: 'javascript',
client: 'xhr'
},
{
prismLanguage: 'python',
target: 'python'
},
{
prismLanguage: 'ruby',
target: 'ruby'
}
]
```

## [Translations guidelines](./src/locales/README.md)

## Join the Community
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@kong-ui-public/analytics-utilities": "0.7.1",
"@kong-ui-public/copy-uuid": "1.1.5",
"@kong-ui-public/document-viewer": "0.10.5",
"@kong-ui-public/spec-renderer": "0.11.28",
"@kong-ui-public/spec-renderer": "0.12.0",
"@kong/kong-auth-elements": "2.8.0",
"@kong/kongponents": "8.123.3",
"@kong/sdk-portal-js": "2.3.4",
Expand Down
Loading

0 comments on commit 8832736

Please sign in to comment.