Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document docatl usage on the Getting Started help page #126

Merged
merged 1 commit into from
Oct 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions doc/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
## Getting started with DOCAT

### Upload your documentation
### docatl, the docat CLI 🙀

The most convenient way to interact with docat is with it's official CLI
tool, [docatl](https://github.com/docat-org/docatl).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean curl right?!


You can download a standalone binary of the latest release
for your platform [here](https://github.com/docat-org/docatl/releases/latest)
or [use go](https://github.com/docat-org/docatl#using-go) or [use docker](https://github.com/docat-org/docatl#using-docker).

After you've obtained `docatl` just point it to your docs folder, which will be packaged and pushed to `docat`:

```sh
docatl push --host http://localhost:8000 ./docs/ awesome-project 1.0.0
```

Use `docatl --help` to discover all other commands to manage your docat documentation!

### Raw API endpoints

The following sections document the RAW API endpoints you can `curl`.

#### Upload your documentation

You can upload any static HTML site by zipping it and
then posting the file to the backend.

> Note: if a `index.html` file is present in the root of the zip file
most web server will serve the file by default.
it will be server automatically.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

making it technically less accurate - nice dude 🌮

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but tbf nobody cares so i like the change :D


For example to upload the file `docs.zip` as version `1.0.0` for `awesome-project`.

Expand All @@ -22,7 +43,7 @@ An uploaded pdf could be viewed like this:
You can also manually upload your documentation.
A very simple web form can be found under [upload](#/upload).

### Tag documentation
#### Tag documentation

After this you can tag a version, this can be useful when
the latest version should be available as `http://localhost:8000/docs/awesome-project/latest`
Expand All @@ -33,7 +54,7 @@ If you want to tag the version `1.0.0` as `latest` for awesome-project.
curl -X PUT http://localhost:8000/api/awesome-project/1.0.0/tags/latest
```

### Claim Project
#### Claim Project

Claiming a Project returns a `token` which can be used for actions
which require a authentication (for example deleting a version).
Expand All @@ -43,20 +64,20 @@ Each Project can be claimed exactly once.
curl -X GET http://localhost:8000/api/awesome-project/claim
```

### Authentication
#### Authentication

To make an authenticated call a header with the key `Docat-Api-Key` and your token is required.

```sh
curl -X DELETE --header "Docat-Api-Key: <token>" http://localhost:8000/api/awesome-project/1.0.0
```

### Delete Version
#### Delete Version

To delete a Project version you need to be authenticated.

If you want to remove the version `1.0.0` from awesome-project.

```sh
curl -X DELETE --header "Docat-Api-Key: <token>" http://localhost:8000/api/awesome-project/1.0.0
```
```