Introduce Baidu statistics

pull/1227/head
chen.ma 2 years ago
parent 583b798b22
commit 36d679c892

@ -17,22 +17,22 @@ const config = {
// If you aren't using GitHub pages, you don't need these. // If you aren't using GitHub pages, you don't need these.
organizationName: 'hippo4j', // Usually your GitHub org/user name. organizationName: 'hippo4j', // Usually your GitHub org/user name.
projectName: 'hippo4j.github.io', // Usually your repo name. projectName: 'hippo4j.github.io', // Usually your repo name.
deploymentBranch: "main", deploymentBranch: 'main',
// Even if you don't use internalization, you can use this field to set useful // Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want // metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans". // to replace "en" with "zh-Hans".
i18n: { i18n: {
defaultLocale: "en", defaultLocale: 'en',
locales: ["en", "zh"], locales: ['en', 'zh'],
localeConfigs: { localeConfigs: {
en: { en: {
label: "English", label: 'English',
direction: "ltr", direction: 'ltr',
}, },
zh: { zh: {
label: "简体中文", label: '简体中文',
direction: "ltr", direction: 'ltr',
}, },
}, },
}, },
@ -65,12 +65,12 @@ const config = {
plugins: [ plugins: [
[ [
"@docusaurus/plugin-content-docs", '@docusaurus/plugin-content-docs',
{ {
id: "community", id: 'community',
path: "community", path: 'community',
routeBasePath: "community", routeBasePath: 'community',
sidebarPath: require.resolve("./sidebarsCommunity.js"), sidebarPath: require.resolve('./sidebarsCommunity.js'),
}, },
], ],
], ],
@ -83,7 +83,7 @@ const config = {
id: 'announcementBar-1', // Increment on change id: 'announcementBar-1', // Increment on change
// content: `⭐️ If you like hippo4j, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://gitee.com/mabaiwancn/hippo4j">Gitee</a>, thanks.`, // content: `⭐️ If you like hippo4j, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://gitee.com/mabaiwancn/hippo4j">Gitee</a>, thanks.`,
// content: `⭐️ 如果您喜欢 hippo4j请在 <a target="_blank" rel="noopener noreferrer" href="https://gitee.com/mabaiwancn/hippo4j">Gitee</a> 和 <a target="_blank" rel="noopener noreferrer" href="https://github.com/opengoofy/hippo4j">GitHub</a> 上给它一个 star谢谢`, // content: `⭐️ 如果您喜欢 hippo4j请在 <a target="_blank" rel="noopener noreferrer" href="https://gitee.com/mabaiwancn/hippo4j">Gitee</a> 和 <a target="_blank" rel="noopener noreferrer" href="https://github.com/opengoofy/hippo4j">GitHub</a> 上给它一个 star谢谢`,
content: `⭐️ 开源不易,hippo4j 如果对您工作有帮助,请在 <a target="_blank" rel="noopener noreferrer" href="https://github.com/opengoofy/hippo4j">GitHub</a> 上给它一个 🌟`, content: `⭐️ 开源不易,如果 Hippo4j 对您有帮助,请在 <a target="_blank" rel="noopener noreferrer" href="https://github.com/opengoofy/hippo4j">GitHub</a> 上给它一个 Star 🌟`,
// content: `<a target="_blank" rel="noopener noreferrer" href="https://xiaomage.info/knowledge-planet/">👉 《小马哥的代码实战课》官方知识星球来啦!!!</a>`, // content: `<a target="_blank" rel="noopener noreferrer" href="https://xiaomage.info/knowledge-planet/">👉 《小马哥的代码实战课》官方知识星球来啦!!!</a>`,
}, },
navbar: { navbar: {
@ -101,14 +101,14 @@ const config = {
label: '文档', label: '文档',
}, },
{ {
to: "/community/contributor-guide", to: '/community/contributor-guide',
label: "社区", label: '社区',
position: "left", position: 'left',
activeBaseRegex: `/community/`, activeBaseRegex: `/community/`,
}, },
/*{ to: "/team", label: "团队", position: "left" },*/ /*{ to: "/team", label: "团队", position: "left" },*/
{ to: "/users", label: "采用公司", position: "left" }, { to: '/users', label: '采用公司', position: 'left' },
{ to: "/group", label: "加群沟通", position: "left" }, { to: '/group', label: '加群沟通', position: 'left' },
/*{to: '/blog', label: '博客', position: 'left'},*/ /*{to: '/blog', label: '博客', position: 'left'},*/
{ {
href: 'http://console.hippo4j.cn/index.html', href: 'http://console.hippo4j.cn/index.html',
@ -126,7 +126,7 @@ const config = {
dropdownActiveClassDisabled: true, dropdownActiveClassDisabled: true,
}, },
{type: 'localeDropdown', position: 'right'}, { type: 'localeDropdown', position: 'right' },
/*{ /*{
href: 'https://gitee.com/mabaiwancn/hippo4j', href: 'https://gitee.com/mabaiwancn/hippo4j',
label: 'Gitee', label: 'Gitee',

@ -26,17 +26,18 @@ const FeatureList = [
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, Svg: require('@site/static/img/undraw_docusaurus_react.svg').default,
description: ( description: (
<> <>
支持自定义时长线程池运行数据采集存储同时也支持 PrometheusInfluxDB 等采集监控通过 Grafana 或内置监控页面提供可视化大屏监控运行指标 支持自定义时长线程池运行数据采集存储同时也支持 PrometheusInfluxDB 等采集监控通过
Grafana 或内置监控页面提供可视化大屏监控运行指标
</> </>
), ),
}, },
]; ];
function Feature({Svg, title, description}) { function Feature({ Svg, title, description }) {
return ( return (
<div className={clsx('col col--4')}> <div className={clsx('col col--4')}>
<div className="text--center"> <div className="text--center">
<Svg className={styles.featureSvg} role="img"/> <Svg className={styles.featureSvg} role="img" />
</div> </div>
<div className="text--center padding-horiz--md"> <div className="text--center padding-horiz--md">
<h3>{title}</h3> <h3>{title}</h3>

@ -5,20 +5,29 @@ import Translate from '@docusaurus/Translate';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout'; import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures'; import HomepageFeatures from '@site/src/components/HomepageFeatures';
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';
import styles from './index.module.css'; import styles from './index.module.css';
if (ExecutionEnvironment.canUseDOM) {
var _hmt = _hmt || [];
(function () {
var hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?473eaadc06f3d63771f303df1fc29b58';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();
}
function HomepageHeader() { function HomepageHeader() {
const {siteConfig} = useDocusaurusContext(); const { siteConfig } = useDocusaurusContext();
return ( return (
<header className={clsx('hero hero--primary', styles.heroBanner)}> <header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container"> <div className="container">
<h1 className="hero__title">{siteConfig.title}</h1> <h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p> <p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}> <div className={styles.buttons}>
<Link <Link className="button button--secondary button--lg" to="/docs/user_docs/intro">
className="button button--secondary button--lg"
to="/docs/user_docs/intro">
快速开始 - 5min 快速开始 - 5min
</Link> </Link>
</div> </div>
@ -28,14 +37,15 @@ function HomepageHeader() {
} }
export default function Home() { export default function Home() {
const {siteConfig} = useDocusaurusContext(); const { siteConfig } = useDocusaurusContext();
return ( return (
<Layout <Layout
title={`${siteConfig.title}`} title={`${siteConfig.title}`}
description="Description will go into a meta tag in <head />"> description="Description will go into a meta tag in <head />"
<HomepageHeader/> >
<HomepageHeader />
<main> <main>
<HomepageFeatures/> <HomepageFeatures />
</main> </main>
</Layout> </Layout>
); );

Loading…
Cancel
Save