centurion-ui
    Preparing search index...

    Function useGithubFetcher

    • This Fetcher sets up everything required to fetch markdown documents from a Github repository using the raw HTTP endpoint.

      It's important to note, that when setting up markdown routes, that a non-index route use path: ':mdFile'. This mather will then create param mdFile which is used to denote that the markdown file is not an index path. Failure to use this matcher will prevent paths that are not for a index.md file to fail.

      Parameters

      • __namedParameters: githubFetcherNamedParams

        Named Parameters for Django Fetcher.

        • OptionalbaseURL?: string

          Backend base URL.

          This value is always to be supplied when a loader is calling. Additionally you should not supply this param a value as it is a requirement that all fetchers ignore it and obtain the backend.url via the BackendProvider from the nearest BackendLayout.

        • Optionalparams?: Params

          Route path parameters

        • Optionalsignal?: AbortSignal

          Request signal.

        • url: string

          URL for the request to be made against.

      Returns Promise<Response>

      const githubResponse = await useGithubFetcher({
      url: '/',
      });

      const mdDocument = await githubResponse.clone().text();

      0.13.0