Skip to content

Commit

Permalink
docs: add initial page with API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jceb committed May 15, 2024
1 parent 64b1db5 commit d0265d7
Show file tree
Hide file tree
Showing 22 changed files with 24,401 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ target/

# ignore code coverage data
/client/cov_profile/

/.direnv
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs/_websites/dws.identinet.io"]
path = docs/_websites/dws.identinet.io
url = [email protected]:identinet/did-web-server-docs.git
5 changes: 5 additions & 0 deletions docs/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Documentation: https://direnv.net/man/direnv-stdlib.1.html
source_up_if_exists
dotenv_if_exists

use flake .flake
78 changes: 78 additions & 0 deletions docs/.flake/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions docs/.flake/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
description = "Dependencies";

# inputs.nixpkgs.url = "github:identinet/nixpkgs/identinet";
inputs.nixpkgs_unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs, nixpkgs_unstable, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
unstable = nixpkgs_unstable.legacyPackages.${system};
allOsPackages = with pkgs; [
# Nix packages: https://search.nixos.org/packages
# Shared dependencies
bashInteractive
just # Simple make replacement https://just.systems/
unstable.nushell # Nu Shell https://www.nushell.sh/
nodejs_20 # JS interpreter https://nodejs.org/en/
];
linuxOnlyPackages = with pkgs;
[
# datree # kubernetes configuration validation and verification https://datree.io/
];
in
{
devShell = pkgs.mkShell {
nativeBuildInputs =
if pkgs.system == "x86_64-linux" then
allOsPackages ++ linuxOnlyPackages
else
allOsPackages;
buildInputs = [ ];
};
});
}
22 changes: 22 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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*

/.direnv
37 changes: 37 additions & 0 deletions docs/Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env just --justfile
# Documentation: https://just.systems/man/en/

set shell := ['nu', '-c']

# Integration with nodejs package.json scripts, see https://just.systems/man/en/chapter_65.html

export PATH := env('PWD') / 'node_modules/.bin:' + env('PATH')

# Print this help
default:
@just -l

# Format Justfile
format:
@just --fmt --unstable

# Install application dependencies
install:
yarn install

# Run and watch application for development purposes
dev:
yarn run start

# Build production application
build:
#!/home/jceb/Documents/Projects/just-docker/env --image=node:20 bash
yarn run build

# Serve production application
serve:
yarn run serve

# Clean files
clean:
yarn run clear
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: 1 addition & 0 deletions docs/_websites/dws.identinet.io
Submodule dws.identinet.io added at 33964c
3 changes: 3 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
57 changes: 57 additions & 0 deletions docs/docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
sidebar_position: 1
---

# Tutorial Intro

Let's discover **Docusaurus in less than 5 minutes**.

## Getting Started

Get started by **creating a new site**.

Or **try Docusaurus immediately** with
**[docusaurus.new](https://docusaurus.new)**.

### What you'll need

- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
- When installing Node.js, you are recommended to check all checkboxes related
to dependencies.

## Generate a new site

Generate a new Docusaurus site using the **classic template**.

The classic template will automatically be added to your project after you run
the command:

```bash
npm init docusaurus@latest my-website classic
```

You can type this command into Command Prompt, Powershell, Terminal, or any
other integrated terminal of your code editor.

The command also installs all necessary dependencies you need to run Docusaurus.

## Start your site

Run the development server:

```bash
cd my-website
npm run start
```

The `cd` command changes the directory you're working with. In order to work
with your newly created Docusaurus site, you'll need to navigate the terminal
there.

The `npm run start` command builds your website locally and serves it through a
development server, ready for you to view at http://localhost:3000/.

Open `docs/intro.md` (this page) and edit some lines: the site **reloads
automatically** and displays your changes.

Blub
Loading

0 comments on commit d0265d7

Please sign in to comment.