Clicknium 项目使用教程
1. 项目的目录结构及介绍
Clicknium 项目的目录结构如下:
clicknium-docs/
├── doc/
├── src/
├── static/
├── .gitignore
├── LICENSE.md
├── README.md
├── babel.config.js
├── docusaurus.config.js
├── package-lock.json
├── package.json
├── sidebars.js
└── tsconfig.json
目录介绍
doc/
: 存放项目文档的目录。src/
: 存放源代码的目录。static/
: 存放静态资源的目录。.gitignore
: Git 忽略文件配置。LICENSE.md
: 项目许可证文件。README.md
: 项目介绍文件。babel.config.js
: Babel 配置文件。docusaurus.config.js
: Docusaurus 配置文件。package-lock.json
: npm 依赖锁定文件。package.json
: npm 项目配置文件。sidebars.js
: 文档侧边栏配置文件。tsconfig.json
: TypeScript 配置文件。
2. 项目的启动文件介绍
Clicknium 项目的启动文件主要是 docusaurus.config.js
。这个文件是 Docusaurus 框架的配置文件,包含了网站的基本配置、导航栏、侧边栏等信息。
docusaurus.config.js 主要内容
module.exports = {
title: 'Clicknium Docs',
tagline: 'Next-generation GUI automation framework',
url: 'https://www.clicknium.com',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'clicknium',
projectName: 'clicknium-docs',
themeConfig: {
navbar: {
title: 'Clicknium',
logo: {
alt: 'Clicknium Logo',
src: 'img/logo.svg',
},
items: [
{
to: 'docs/',
activeBasePath: 'docs',
label: 'Docs',
position: 'left',
},
{to: 'blog', label: 'Blog', position: 'left'},
{
href: 'https://github.com/clicknium/clicknium-docs',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Style Guide',
to: 'docs/',
},
],
},
{
title: 'Community',
items: [
{
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/clicknium',
},
{
label: 'Discord',
href: 'https://discordapp.com/invite/clicknium',
},
{
label: 'Twitter',
href: 'https://twitter.com/clicknium',
},
],
},
{
title: 'More',
items: [
{
label: 'Blog',
to: 'blog',
},
{
label: 'GitHub',
href: 'https://github.com/clicknium/clicknium-docs',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Clicknium. Built with Docusaurus.`,
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl:
'https://github.com/clicknium/clicknium-docs/edit/main/',
},
blog: {
showReadingTime: true,
editUrl:
'https://github.com/clicknium/clicknium-docs/edit/main/