-
Notifications
You must be signed in to change notification settings - Fork 49
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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). | ||
|
||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. making it technically less accurate - nice dude 🌮 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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`. | ||
|
||
|
@@ -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` | ||
|
@@ -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). | ||
|
@@ -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 | ||
``` | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you mean
curl
right?!