Skip to content

Commit

Permalink
Add documentation (#87)
Browse files Browse the repository at this point in the history
* Add documentation

* Add test action

* Update wiki cli

* Change branch

* Change branch. Again

* Thoralf wants working stuff

Co-authored-by: Thoralf-M <[email protected]>

Co-authored-by: Thoralf-M <[email protected]>
  • Loading branch information
Dr-Electron and Thoralf-M authored May 26, 2022
1 parent 64bc616 commit a2f3ced
Show file tree
Hide file tree
Showing 9 changed files with 12,553 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/test-docs-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test Docs Build

on:
pull_request:
branches:
- develop

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test Build
run: |
cd documentation
yarn install --immutable
yarn build
29 changes: 29 additions & 0 deletions documentation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Dependencies
node_modules

# Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# 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*
785 changes: 785 additions & 0 deletions documentation/.yarn/releases/yarn-3.2.0.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions documentation/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.2.0.cjs
36 changes: 36 additions & 0 deletions documentation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Documentation

The documentation is built using [Docusaurus 2](https://docusaurus.io/). The deployment is done through a centralized build from [IOTA WIKI](https://github.com/iota-community/iota-wiki). To run a local instance the [IOTA WIKI CLI](https://github.com/iota-community/iota-wiki-cli) is used.

## Prerequisites

- [Node.js v14.14+](https://nodejs.org/en/)
- [yarn](https://yarnpkg.com/getting-started/install)

## Installation

```console
yarn
```

This command installs all necessary dependencies.

## Local Development

```console
yarn start
```

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

## Including .md file

```console
{@import <file path>}
```

Example:

```console
{@import ../README.md}
```
17 changes: 17 additions & 0 deletions documentation/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const path = require('path');

module.exports = {
plugins: [
[
'@docusaurus/plugin-content-docs',
{
id: 'cli-wallet',
path: path.resolve(__dirname, 'docs'),
routeBasePath: 'cli-wallet',
sidebarPath: path.resolve(__dirname, 'sidebars.js'),
editUrl: 'https://github.com/iotaledger/cli-wallet/edit/develop/documentation',
}
],
],
staticDirectories: [path.resolve(__dirname, 'static')],
};
17 changes: 17 additions & 0 deletions documentation/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "cli-wallet",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "iota-wiki start",
"build": "iota-wiki build"
},
"license": "UNLICENSED",
"engines": {
"node": ">=14.14.0"
},
"devDependencies": {
"@iota-community/iota-wiki-cli": "iota-community/iota-wiki-cli#v2"
},
"packageManager": "[email protected]"
}
31 changes: 31 additions & 0 deletions documentation/sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
*/

// @ts-check

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],

// But you can create a sidebar manually
/*
tutorialSidebar: [
{
type: 'category',
label: 'Tutorial',
items: ['hello'],
},
],
*/
};

module.exports = sidebars;
Loading

0 comments on commit a2f3ced

Please sign in to comment.