Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace PageConfig

The namespace for PageConfig functions.

Index

Variables

Const defaultWorkspace

defaultWorkspace: string

Functions

getBaseUrl

  • getBaseUrl(): string
  • Get the base url for a Jupyter application, or the base url of the page.

    Returns string

getNBConvertURL

  • getNBConvertURL(__namedParameters: { download: boolean; format: string; path: string }): string
  • Returns the URL converting this notebook to a certain format with nbconvert.

    Parameters

    • __namedParameters: { download: boolean; format: string; path: string }
      • download: boolean
      • format: string
      • path: string

    Returns string

getNotebookVersion

  • getNotebookVersion(): [number, number, number]
  • Get the Notebook version info [major, minor, patch].

    Returns [number, number, number]

getOption

  • getOption(name: string): string
  • Get global configuration data for the Jupyter application.

    Parameters

    • name: string

      The name of the configuration option.

    Returns string

    The config value or an empty string if not found.

    Notes

    All values are treated as strings. For browser based applications, it is assumed that the page HTML includes a script tag with the id jupyter-config-data containing the configuration as valid JSON. In order to support the classic Notebook, we fall back on checking for body data of the given name.

    For node applications, it is assumed that the process was launched with a --jupyter-config-data option pointing to a JSON settings file.

getShareUrl

  • getShareUrl(): string
  • Get the base url for sharing links (usually baseUrl)

    Returns string

getToken

  • getToken(): string
  • Get the authorization token for a Jupyter application.

    Returns string

getTreeShareUrl

  • getTreeShareUrl(): string
  • Get the tree url for shareable links. Usually the same as treeUrl, but overrideable e.g. when sharing with JupyterHub.

    Returns string

getTreeUrl

  • getTreeUrl(): string
  • Get the tree url for a JupyterLab application.

    Returns string

getUrl

  • Create a new URL given an optional mode and tree path.

    This is used to create URLS when the mode or tree path change as the user changes mode or the current document in the main area. If fields in options are omitted, the value in PageConfig will be used.

    Parameters

    Returns string

getWsUrl

  • getWsUrl(baseUrl?: string): string
  • Get the base websocket url for a Jupyter application, or an empty string.

    Parameters

    • Optional baseUrl: string

    Returns string

setOption

  • setOption(name: string, value: string): string
  • Set global configuration data for the Jupyter application.

    Parameters

    • name: string

      The name of the configuration option.

    • value: string

      The value to set the option to.

    Returns string

    The last config value or an empty string if it doesn't exist.

Generated using TypeDoc