mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 03:57:06 -04:00
Add custom intro page by fetching markdown content from a file (#697)
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
4b2e2a7c93
commit
7f6e0e53a7
31 changed files with 373 additions and 173 deletions
17
src/components/intro-page/requests.ts
Normal file
17
src/components/intro-page/requests.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { defaultFetchConfig, expectResponseCode } from '../../api/utils'
|
||||
|
||||
export const getFrontPageContent = async (baseUrl: string): Promise<string> => {
|
||||
const response = await fetch(baseUrl + '/intro.md', {
|
||||
...defaultFetchConfig,
|
||||
method: 'GET'
|
||||
})
|
||||
expectResponseCode(response)
|
||||
|
||||
return await response.text()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue