Skip to content

Commit

Permalink
Use URL to detect terraform enterprise
Browse files Browse the repository at this point in the history
This will hide the "Edit on GitHub" link for terraform enterprise only
  • Loading branch information
rmainwork committed Sep 6, 2024
1 parent cc1fb0f commit c991e25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/views/docs-view/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ export function getStaticGenerationFunctions<
* part of `rootDocsPath` configuration in `src/data/<product>.json`.
*/
const isPublicContentRepo =
product.slug !== 'hcp' && product.slug !== 'sentinel'
product.slug !== 'hcp' &&
product.slug !== 'sentinel' &&
product.slug + currentPathUnderProduct !== 'terraform/enterprise'
if (isPublicContentRepo) {
layoutProps.githubFileUrl = githubFileUrl
}
Expand Down

0 comments on commit c991e25

Please sign in to comment.