mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 18:42:56 +00:00
feat: add index rediect
This commit is contained in:
parent
260e17980c
commit
3e485b07da
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-engine-docs",
|
"name": "@alilc/lowcode-engine-docs",
|
||||||
"version": "0.0.1-beta.3",
|
"version": "0.0.1-beta.4",
|
||||||
"description": "低代码引擎版本化文档",
|
"description": "低代码引擎版本化文档",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
40
docs/src/pages/index-old.tsx
Normal file
40
docs/src/pages/index-old.tsx
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import clsx from 'clsx';
|
||||||
|
import Link from '@docusaurus/Link';
|
||||||
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||||
|
import Layout from '@theme/Layout';
|
||||||
|
|
||||||
|
import styles from './index.module.css';
|
||||||
|
|
||||||
|
function HomepageHeader() {
|
||||||
|
const { siteConfig } = useDocusaurusContext();
|
||||||
|
return (
|
||||||
|
<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
||||||
|
<div className="container">
|
||||||
|
<h1 className={styles.heroTitle}>{siteConfig.title}</h1>
|
||||||
|
<h2>欢迎光临 低代码引擎文档站</h2>
|
||||||
|
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
||||||
|
<div className={styles.buttons}>
|
||||||
|
<Link
|
||||||
|
className="button button--secondary button--lg"
|
||||||
|
to="/docs/guide/quickStart/start"
|
||||||
|
>
|
||||||
|
快速开始
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function Home(): JSX.Element {
|
||||||
|
const { siteConfig } = useDocusaurusContext();
|
||||||
|
return (
|
||||||
|
<Layout
|
||||||
|
title={`${siteConfig.title}`}
|
||||||
|
description=""
|
||||||
|
>
|
||||||
|
<HomepageHeader />
|
||||||
|
</Layout>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -1,40 +1,16 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import clsx from 'clsx';
|
import BrowserOnly from '@docusaurus/BrowserOnly';
|
||||||
import Link from '@docusaurus/Link';
|
|
||||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
||||||
import Layout from '@theme/Layout';
|
|
||||||
|
|
||||||
import styles from './index.module.css';
|
export default function ToIndex(): JSX.Element {
|
||||||
|
|
||||||
function HomepageHeader() {
|
|
||||||
const { siteConfig } = useDocusaurusContext();
|
|
||||||
return (
|
return (
|
||||||
<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
<BrowserOnly>
|
||||||
<div className="container">
|
{() => {
|
||||||
<h1 className={styles.heroTitle}>{siteConfig.title}</h1>
|
/**
|
||||||
<h2>欢迎光临 低代码引擎文档站</h2>
|
* 跳转到首页
|
||||||
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
*/
|
||||||
<div className={styles.buttons}>
|
window.location.href = '/index';
|
||||||
<Link
|
return <></>;
|
||||||
className="button button--secondary button--lg"
|
}}
|
||||||
to="/docs/guide/quickStart/start"
|
</BrowserOnly>
|
||||||
>
|
|
||||||
快速开始
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function Home(): JSX.Element {
|
|
||||||
const { siteConfig } = useDocusaurusContext();
|
|
||||||
return (
|
|
||||||
<Layout
|
|
||||||
title={`${siteConfig.title}`}
|
|
||||||
description=""
|
|
||||||
>
|
|
||||||
<HomepageHeader />
|
|
||||||
</Layout>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user