Skip to content

Commit

Permalink
Add documentations
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Nov 17, 2024
1 parent a4e8730 commit b5f20f3
Show file tree
Hide file tree
Showing 30 changed files with 35,413 additions and 5 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
name: Template CI/CD
name: CI/CD

"on":
pull_request:
Expand All @@ -27,12 +27,8 @@ env:
EMAIL: [email protected]

jobs:
yml-md-style-and-link-checks:
uses: QubitPi/hashistack/.github/workflows/yml-md-style-and-link-checks.yml@master

tests:
name: Unit & Integration Tests
needs: yml-md-style-and-link-checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -42,3 +38,35 @@ jobs:
uses: docker-practice/actions-setup-docker@master
- name: Run unit & integration tests
run: mvn -B clean verify

deploy-docs:
needs: tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK
uses: paion-data/immutable-infrastructure-as-a-service/.github/actions/jdk-setup@master
- name: Install Dependencies
working-directory: docs
run: yarn
- name: Build Documentation
working-directory: docs
run: yarn build
- name: Generate Javadoc
run: mvn -B clean javadoc:javadoc
- name: Move Javadoc into documentation directory
if: github.ref == 'refs/heads/master'
run: mv target/site/apidocs/ docs/build/apidocs/
- name: Load CNAME file
if: github.ref == 'refs/heads/master'
run: cp docs/CNAME docs/build
- name: Deploy Documentation (including Javadoc) to GitHub Pages
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build
enable_jekyll: false
user_name: ${{ env.USER }}
user_email: ${{ env.EMAIL }}
42 changes: 42 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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.

# 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*

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
1 change: 1 addition & 0 deletions docs/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
aristotle-ws.com
43 changes: 43 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!-- markdownlint-disable -->
# Aristotle Documentation

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.
<!-- markdownlint-enable -->
18 changes: 18 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +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')],
};
78 changes: 78 additions & 0 deletions docs/docs/img/redis-caching.drawio

Large diffs are not rendered by default.

Binary file added docs/docs/img/redis-caching.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/docs/intro.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
sidebar_position: 1
title: Introduction
---

[//]: # (Copyright 2024 Paion Data)

[//]: # (Licensed under the Apache License, Version 2.0 &#40;the "License"&#41;;)
[//]: # (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.)

Coming soon.
121 changes: 121 additions & 0 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
/**
* 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: 'Aristotle',
tagline: 'Webservice with first-class support for Graph Database',
favicon: 'img/favicon.ico',

url: 'https://aristotle-ws.com',
baseUrl: '/',

organizationName: 'paion-data',
projectName: 'aristotle',

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

presets: [
[
'classic',
{
docs: {
sidebarPath: './sidebars.ts',
editUrl:
'https://github.com/paion-data/aristotle/tree/master/docs',
},
theme: {
customCss: './src/css/custom.css',
},
} satisfies Preset.Options,
],
],

themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: 'Aristotle',
logo: {
alt: 'Aristotle Logo',
src: 'img/logo.svg',
},
items: [
{
type: "localeDropdown",
position: "left",
},
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Documentation',
},
{
href: "https://aristotle-ws.com/apidocs",
label: "API",
position: "left",
},
{
href: 'https://github.com/paion-data/aristotle',
label: ' ',
position: 'right',
className: 'header-icon-link header-github-link',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Documentation',
to: '/docs/intro',
},
],
},
{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/paion-data/aristotle',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Paion Data. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ["java", "bash", "json"]
},
algolia: {
appId: 'DXTOFNB5C6',
apiKey: 'eca40f6bc63a92b106660dadd97f8703',
indexName: 'aristotle_ws'
},
} satisfies Preset.ThemeConfig,
};

export default config;
Loading

0 comments on commit b5f20f3

Please sign in to comment.