0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

docs: reorg integrate SDK (#740)

* docs: reorg integrate SDK

* docs: update alias

* docs: fix link
This commit is contained in:
Gao Sun 2022-05-06 17:49:13 +08:00 committed by GitHub
parent 749c820cc2
commit c1766bf984
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 58 additions and 13 deletions

View file

@ -28,11 +28,11 @@ import Step from './components/Step';
import * as styles from './index.module.scss';
const Guides: Record<string, LazyExoticComponent<(props: MDXProps) => JSX.Element>> = {
react: lazy(async () => import('@/assets/docs/tutorial/integrate-sdk/react/index.mdx')),
react: lazy(async () => import('@/assets/docs/tutorial/integrate-sdk/react.mdx')),
'react_zh-cn': lazy(
async () =>
import(
'@/assets/i18n/zh-cn/docusaurus-plugin-content-docs/current/tutorial/integrate-sdk/react/index.mdx'
'@/assets/i18n/zh-cn/docusaurus-plugin-content-docs/current/tutorial/integrate-sdk/react.mdx'
)
),
};

View file

@ -0,0 +1,16 @@
# Integrate SDK
We provide a bunch of SDKs to let you integrate Logto with frontend clients with ease. If you are using traditional web technology (i.e., server directly renders frontend), please check out our integration guide.
If the list doesn't cover your desired platform/framework, please file a feature request or contribute a new SDK.
## Web
- Vanilla JS
- [React](./react)
- Vue
## Native
- iOS
- [Android](./android)

View file

@ -1,3 +0,0 @@
{
"label": "Integrate SDK"
}

View file

@ -1,3 +1,7 @@
---
sidebar_label: Android
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

View file

@ -1,4 +0,0 @@
{
"label": "Android",
"position": 1.1
}

View file

@ -1,3 +1,9 @@
---
sidebar_label: React
---
// Wait for AC update
// import Step from '@components/Step';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

View file

@ -1,4 +0,0 @@
{
"label": "React",
"position": 1.1
}

View file

@ -3,6 +3,7 @@
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const path = require('path');
/** @type {import('@docusaurus/types').Config} */
const config = {
@ -107,6 +108,16 @@ const config = {
additionalLanguages: ['swift', 'kotlin', 'groovy', 'java'],
},
}),
plugins: [
async function addAliasPlugin() {
return ({
name: 'add-alias-plugin',
configureWebpack: () => ({ resolve: { alias: {
'@components': path.resolve(__dirname, './src/components')
} } })
});
}
]
};
module.exports = config;

View file

@ -0,0 +1,19 @@
import React, { ReactNode } from 'react'
type Props = {
children: ReactNode,
title: string;
subtitle?: string;
};
const Step = ({ children, title, subtitle }: Props) => {
return (
<>
<h2>{title}</h2>
{subtitle && <h3>{subtitle}</h3>}
{children}
</>
)
}
export default Step