Skip to content

Commit

Permalink
docs: Migrate documentation to a new Docusaurus setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
junhaoliao committed Jan 2, 2025
1 parent 35ee4a7 commit a319816
Show file tree
Hide file tree
Showing 41 changed files with 23,963 additions and 248 deletions.
Binary file added assets/ictrl-social-card.psd
Binary file not shown.
20 changes: 20 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 0 additions & 1 deletion docs/CNAME

This file was deleted.

41 changes: 41 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
1 change: 0 additions & 1 deletion docs/_config.yml

This file was deleted.

115 changes: 115 additions & 0 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/*
* Copyright (c) 2025 iCtrl Developers
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/

import {themes as prismThemes} from "prism-react-renderer";

import type * as Preset from "@docusaurus/preset-classic";
import type {Config} from "@docusaurus/types";


const config: Config = {
favicon: "img/favicon.png",
tagline: "A Simple VNC + SSH Console + SFTP Client",
title: "iCtrl",

baseUrl: "/",
url: "https://ictrl.ca",

organizationName: "junhaoliao",
projectName: "iCtrl",

onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",

i18n: {
defaultLocale: "en",
locales: [
"en",
"zh",
],
},

presets: [
[
"classic",
{
blog: false,

// docs: {
// editUrl:
// "https://github.com/junhaoliao/iCtrl/tree/main/docs/docs",
// sidebarPath: "./sidebars.ts",
// },
docs: false,
theme: {
customCss: "./src/css/custom.css",
},
} satisfies Preset.Options,
],
],

themeConfig: {
colorMode: {
respectPrefersColorScheme: true,
},

image: "img/ictrl-social-card.png",
navbar: {
title: "iCtrl",
logo: {
alt: "iCtrl Logo",
src: "img/logo.svg",
},
items: [
// {
// type: "docSidebar",
// sidebarId: "devDocsSidebar",
// label: "Docs",
// },
{
to: "/about",
label: "About",
},
{
type: "localeDropdown",
position: "right",
},
{
type: "custom-ReactGitHubButton",
position: "right",
},
],
},

footer: {
style: "dark",
copyright: `Copyright © 2019-${new Date().getFullYear()} iCtrl Developers.`,
},

prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
} satisfies Preset.ThemeConfig,
};

export default config;
Loading

0 comments on commit a319816

Please sign in to comment.