Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump spec-renderer version to allow languages to be customized #291

Merged
merged 2 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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