This repository has been archived by the owner on Nov 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #184 from backstage/fix-serve-no-docker
Fix serve command with no docker
- Loading branch information
Showing
5 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@techdocs/cli': patch | ||
--- | ||
|
||
The [change](https://github.com/backstage/techdocs-cli/commit/b25014cec313d46ce1c9b4f324cc09047a00fc1f) updated the `@backstage/techdocs-common` from version `0.9.0` to `0.10.2` and one of the intermediate versions, the [0.10.0](https://github.com/backstage/backstage/blob/cac4afb95fdbd130a66e53a1b0430a1e62787a7f/packages/techdocs-common/CHANGELOG.md#patch-changes-2), introduced the use of search in context that requires an implementation for the Search API. | ||
|
||
Created a custom techdocs page to disable search in the Reader component, preventing it from using the Search API, as we don't want to provide search in preview mode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
packages/embedded-techdocs-app/src/components/TechDocsPage/TechDocsPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Copyright 2021 Spotify AB | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import { Content } from '@backstage/core-components'; | ||
|
||
import { | ||
Reader, | ||
TechDocsPage, | ||
TechDocsPageHeader, | ||
} from '@backstage/plugin-techdocs'; | ||
|
||
const DefaultTechDocsPage = () => { | ||
const techDocsMetadata = { | ||
site_name: 'Live preview environment', | ||
site_description: '', | ||
}; | ||
|
||
return ( | ||
<TechDocsPage> | ||
{({ entityRef, onReady }) => ( | ||
<> | ||
<TechDocsPageHeader | ||
techDocsMetadata={techDocsMetadata} | ||
entityRef={entityRef} | ||
/> | ||
<Content data-testid="techdocs-content"> | ||
<Reader | ||
onReady={onReady} | ||
entityRef={entityRef} | ||
withSearch={false} | ||
/> | ||
</Content> | ||
</> | ||
)} | ||
</TechDocsPage> | ||
); | ||
}; | ||
|
||
export const techDocsPage = <DefaultTechDocsPage />; |
1 change: 1 addition & 0 deletions
1
packages/embedded-techdocs-app/src/components/TechDocsPage/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './TechDocsPage'; |