-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a link to Times Square docs from sidebar
The getDocsUrl function concatenates the given documentation site path with the configured base URL for the rsp.lsst.io docs. The link is not styled; this is a proof of concept for dynamically computing the link.
- Loading branch information
1 parent
3c16913
commit 53b6f01
Showing
2 changed files
with
17 additions
and
0 deletions.
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
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,11 @@ | ||
import getConfig from 'next/config'; | ||
|
||
/** | ||
* Get the full URL to a documentation page. | ||
* @param path The path to the documentation page, starting with "/" | ||
* @returns The full URL to the documentation page | ||
*/ | ||
export function getDocsUrl(path) { | ||
const { publicRuntimeConfig } = getConfig(); | ||
return `${publicRuntimeConfig.docsBaseUrl}${path}`; | ||
} |