Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Commit

Permalink
Refactoring documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed May 13, 2024
1 parent a9b41d0 commit dffb575
Show file tree
Hide file tree
Showing 20 changed files with 12,022 additions and 14,720 deletions.
3 changes: 2 additions & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

# Production
/build
/.docusaurus

# Generated files
.docusaurus
Expand All @@ -19,3 +18,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

/.docusaurus
35 changes: 15 additions & 20 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,41 @@
Website
=======
# Website

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

Installation
------------
### Installation

```console
yarn
```
$ yarn
```

### Local Development

```console
yarn start
```
$ 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.
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

```console
yarn build
```
$ yarn build
```

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

### Deployment

Using SSH:

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

Not using SSH:

```console
GIT_USER=<Your GitHub username> yarn deploy
```
$ 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.
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.
15 changes: 15 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/**
* Copyright 2024 Paion Data
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
4 changes: 2 additions & 2 deletions docs/docs/contributing/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ is a modified adaption of Fili ApplicationState

:::

[Servlet-related testing](https://github.com/paiondata/athena/tree/master/athena-core/src/main/java/io/github/paiondata/athena/web/endpoints)
[Servlet-related testing](https://github.com/paion-data/athena/tree/master/athena-core/src/main/java/io/github/paiondata/athena/web/endpoints)
is carried out using
[Jersey Test Framework](https://eclipse-ee4j.github.io/jersey.github.io/documentation/latest/test-framework.html).

![Error loading class-diagram.png](img/class-diagram.png)

Each
[`***ServletSpec.groovy`](https://github.com/paiondata/athena/tree/master/athena-core/src/test/groovy/io/github/paiondata/athena/web/endpoints)
[`***ServletSpec.groovy`](https://github.com/paion-data/athena/tree/master/athena-core/src/test/groovy/io/github/paiondata/athena/web/endpoints)
follows the following pattern to setup, run, and shutdown tests:

### 1. Initializing ApplicationState
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ java -jar start.jar -Djetty.port=8081
brew install --cask graphiql
```

[Athena Book App Starter]: https://github.com/paiondata/athena/tree/master/athena-examples/athena-example-books
[Athena Book App Starter]: https://github.com/paion-data/athena/tree/master/athena-examples/athena-example-books

[docker-compose.yml]: https://github.com/paiondata/athena/tree/master/athena-examples/athena-example-books/docker-compose.yml
[athena-demo]: https://github.com/paiondata/athena/tree/master/athena-examples/athena-example-books
[docker-compose.yml]: https://github.com/paion-data/athena/tree/master/athena-examples/athena-example-books/docker-compose.yml
[athena-demo]: https://github.com/paion-data/athena/tree/master/athena-examples/athena-example-books
[swagger-ui]: https://swagger.io/tools/swagger-ui/
6 changes: 3 additions & 3 deletions docs/docs/monitoring-and-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ debugging and gathering information about how it's running easy.
Logs
----

Athena has [strict guidelines](logging-guidelines) around
Athena has [strict guidelines](logging-guidelines.md) around
what information should be logged, when it should be logged, and what level it should be logged at. Here's a brief
summary of the log levels and what they contain:

Expand All @@ -38,7 +38,7 @@ summary of the log levels and what they contain:
### Request Log

Athena also has a tracing mechanism that records and collects information about each request as it flows through the
system. This information is called the **Request Log** and it gets logged at the [INFO](logging-guidelines#Info) level
system. This information is called the **Request Log** and it gets logged at the [INFO](logging-guidelines.md#Info) level
when the response for a request is sent.

The Request Log is modular, and has a number of different components, depending on which type of request is being
Expand Down Expand Up @@ -81,7 +81,7 @@ Metrics

Athena uses the [Metrics](http://metrics.dropwizard.io/) library (formerly Dropwizard Metrics) for gathering and
reporting on runtime metrics and indicators. Typically, these are exposed through an admin servlet, and if that's
enabled then there is [a list of Key Performance Indicators (KPIs)](kpi) that are exposed through the `/metrics`
enabled then there is [a list of Key Performance Indicators (KPIs)](kpi.md) that are exposed through the `/metrics`
endpoint. The KPI document doesn't go into detail about what each of the KPIs mean, but it gives a rough overview of why
they matter.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/system-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ a rule to ignore this file by default to help prevent checking it in accidental

:::

[athena-system-config]: https://github.com/paiondata/athena/tree/master/athena-system-config
[athena-system-config]: https://github.com/paion-data/athena/tree/master/athena-system-config
2 changes: 1 addition & 1 deletion docs/docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ General
The Athena logs are Jetty logs, so they can be found wherever your Jetty instance stores its logs.

The logs have a lot of information and should help indicate the error.
[More info on logging levels](logging-guidelines)
[More info on logging levels](logging-guidelines.md)

Checkstyle Error - "Extra lines between braces [RegexpMultiline]"
-----------------------------------------------------------------
Expand Down
43 changes: 31 additions & 12 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
/**
* Copyright 2024 Paion Data
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {themes as prismThemes} from 'prism-react-renderer';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';

const config: Config = {
title: 'Athena',
tagline: 'A GraphQL Object Storage Webservice Backed by OpenStack Swift and Ali OSS',
title: 'My Site',
tagline: 'Dinosaurs are cool',
favicon: 'img/favicon.ico',

url: 'https://athena.paion-data.dev/',
Expand All @@ -13,7 +28,7 @@ const config: Config = {
organizationName: 'paion-data',
projectName: 'athena',

onBrokenLinks: 'warn',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',

i18n: {
Expand Down Expand Up @@ -68,7 +83,7 @@ const config: Config = {
position: "left",
},
{
href: 'https://github.com/paion-data/athena',
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
position: 'right',
},
Expand All @@ -78,10 +93,10 @@ const config: Config = {
style: 'dark',
links: [
{
title: 'Documentation',
title: 'Docs',
items: [
{
label: 'Getting Started',
label: 'Documentation',
to: '/docs/intro',
},
],
Expand All @@ -90,13 +105,17 @@ const config: Config = {
title: 'Community',
items: [
{
label: 'GitHub Issue',
href: 'https://github.com/QubitPi/athena/issues',
label: 'Stack Overflow',
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
},
{
label: 'Discord',
href: 'https://discord.com/widget?id=1001320502960324658&theme=dark',
}
href: 'https://discordapp.com/invite/docusaurus',
},
{
label: 'Twitter',
href: 'https://twitter.com/docusaurus',
},
],
},
{
Expand All @@ -108,12 +127,12 @@ const config: Config = {
},
{
label: 'GitHub',
href: 'https://github.com/QubitPi/athena',
href: 'https://github.com/facebook/docusaurus',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Jiaqi Liu. Built with Docusaurus.`,
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
Expand Down
Loading

0 comments on commit dffb575

Please sign in to comment.