Skip to content

Commit

Permalink
Add fancy web docs (atuinsh#725)
Browse files Browse the repository at this point in the history
* Add initial site

* WIP again

* Replace docs with web docs

* Bring back translations

* Update README.md

* remove images
  • Loading branch information
ellie committed Feb 25, 2023
1 parent 5f2db5b commit c558da5
Show file tree
Hide file tree
Showing 35 changed files with 21,002 additions and 98 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ I wanted to. And I **really** don't want to.

- [Quickstart](#quickstart)
- [Install](#install)
- [Import](docs/import.md)
- [Configuration](docs/config.md)
- [Searching history](docs/search.md)
- [Cloud history sync](docs/sync.md)
- [History stats](docs/stats.md)
- [Running your own server](docs/server.md)
- [Key binding](docs/key-binding.md)
- [Shell completions](docs/shell-completions.md)
- [Import](https://atuin.sh/docs/commands/import)
- [Configuration](https://atuin.sh/docs/config)
- [Searching history](https://atuin.sh/docs/commands/search)
- [Cloud history sync](https://atuin.sh/docs/commands/sync)
- [History stats](https://atuin.sh/docs/commands/stats)
- [Self host Atuin server](https://atuin.sh/docs/self-hosting)
- [Key binding](https://atuin.sh/docs/config/key-binding)
- [Shell completions](https://atuin.sh/docs/commands/shell-completions)

## Supported Shells

Expand Down
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*
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 2](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.
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')],
};
5 changes: 5 additions & 0 deletions docs/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ellie:
name: Ellie Huxtable
title: Maintainer of Atuin
url: https://github.com/ellie
image_url: https://github.com/ellie.png
5 changes: 5 additions & 0 deletions docs/docs/commands/commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Commands
---

- [`atuin import`](/docs/commands/import)
9 changes: 8 additions & 1 deletion docs/import.md → docs/docs/commands/import.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Import History
sidebar_position: 2
---

# `atuin import`

Atuin can import your history from your "old" history file
Expand All @@ -24,4 +29,6 @@ This supports both the simple and extended format

# bash

TODO
```
atuin import bash
```
9 changes: 5 additions & 4 deletions docs/list.md → docs/docs/commands/list.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Listing history
---
title: Listing History
---

# `atuin history list`

```
atuin history list
```

| Arg | Description |
| -------------- | ----------------------------------------------------------------------------- |
Expand Down
9 changes: 5 additions & 4 deletions docs/search.md → docs/docs/commands/search.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: Searching History
---

# `atuin search`

```
atuin search <query>
```

Atuin search also supports wildcards, with either the `*` or `%` character. By
Atuin search supports wildcards, with either the `*` or `%` character. By
default, a prefix search is performed (ie, all queries are automatically
appended with a wildcard).

Expand Down
14 changes: 14 additions & 0 deletions docs/docs/commands/server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Server
---

# `atuin server`

Atuin allows you to run your own sync server, in case you don't want to use the
one I host :)

There's currently only one subcommand, `atuin server start` which will start the
Atuin http sync server

See the [self hosting docs](/docs/self-host) for more

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
41 changes: 41 additions & 0 deletions docs/docs/self-hosting/self-hosting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: Self Hosting
---

While we offer a public sync server, and cannot view your data (as it is encrypted), you may still wish to self host your own Atuin sync server.

The requirements to do so are pretty minimal! You need to be able to run a binary or docker container, and have a PostgreSQL database setup.

## Configuration

The config for the server is kept separate from the config for the client, even
though they are the same binary. Server config can be found at
`~/.config/atuin/server.toml`.

It looks something like this:

```toml
host = "0.0.0.0"
port = 8888
open_registration = true
db_uri="postgres:https://user:password@hostname/database"
```

Alternatively, configuration can also be provided with environment variables.

```sh
ATUIN_HOST="0.0.0.0"
ATUIN_PORT=8888
ATUIN_OPEN_REGISTRATION=true
ATUIN_DB_URI="postgres:https://user:password@hostname/database"
```


| Parameter | Description |
| ------------------- | ----------------------------------------------------------------------------- |
| `host` | The host to listen on (default: 127.0.0.1) |
| `port` | The port to listen on (default: 8888) |
| `open_registration` | If `true`, accept new user registrations (default: false) |
| `db_uri` | A valid PostgreSQL URI, for saving history (default: false) |
| `path` | A path to prepend to all routes of the server (default: false) |

Loading

0 comments on commit c558da5

Please sign in to comment.