Skip to content

Commit

Permalink
Update docs (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
G4brym authored Dec 20, 2024
1 parent 1015923 commit fb5915d
Show file tree
Hide file tree
Showing 33 changed files with 55 additions and 69 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ packages/dashboard/.quasar

template/package-lock.json
template/node_modules/

packages/docs/site
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">
<a href="https://r2explorer.dev/">
<img src="https://raw.githubusercontent.com/G4brym/R2-explorer/refs/heads/main/docs/pages/assets/r2-explorer-logo.png" width="500" height="auto" alt="R2-Explorer"/>
<img src="https://raw.githubusercontent.com/G4brym/R2-explorer/refs/heads/main/packages/docs/pages/assets/r2-explorer-logo.png" width="500" height="auto" alt="R2-Explorer"/>
</a>
</div>

Expand Down
18 changes: 0 additions & 18 deletions docs/pages/guides/continue-using-legacy-dashboard.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/requirements.txt

This file was deleted.

File renamed without changes.
4 changes: 3 additions & 1 deletion docs/mkdocs.yml → packages/docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ nav:
- guides/setup-email-explorer.md
- guides/migrating-to-1.0.md
- guides/migrating-to-1.1.md
- guides/continue-using-legacy-dashboard.md
- Email explorer: https://r2explorer.dev/guides/setup-email-explorer/
- Live demo: https://demo.r2explorer.dev/
markdown_extensions:
- def_list
- pymdownx.tasklist:
custom_checkbox: true
- attr_list
- toc:
permalink: true
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ All customizations are applied in the `src/index.ts` file.

Here is all the available options:

| Name | Type(s) | Description | Examples |
|--------------------|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|
| `readonly` | `boolean` or `undefined` | Controls the write access globally, default: `true` | `true` |
| `cors` | `boolean` or `undefined` | Enables or disables CORS access to the internal API, default: `false` | `true` |
| `cfAccessTeamName` | `string` or `undefined` | When set enforces Cloudflare Access in all requests | `radar` (taken from https://radar.cloudflareaccess.com/) |
| `dashboardUrl` | `string` or `undefined` | Allows you to serve a custom dashboard, read more [here](/guides/migrating-to-1.0/#why-is-the-dashboard-no-longer-bundled-in-the-worker) | `https://demo.r2explorer.dev` |
| `emailRouting` | `object` or `undefined` | Customize Email Explorer, read more [here](/guides/setup-email-explorer) | `https://demo.r2explorer.dev` |
| `cacheAssets` | `boolean` or `undefined` | Cache dashboard assets by 5 minutes, default: `true` | `https://demo.r2explorer.dev` |
| Name | Type(s) | Description | Examples |
|--------------------|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|
| `readonly` | `boolean` or `undefined` | Controls the write access globally, default: `true` | `true` |
| `cors` | `boolean` or `undefined` | Enables or disables CORS access to the internal API, default: `false` | `true` |
| `cfAccessTeamName` | `string` or `undefined` | When set enforces Cloudflare Access in all requests | `radar` (taken from https://radar.cloudflareaccess.com/) |
| `dashboardUrl` | `string` or `undefined` | Allows you to serve a custom dashboard, read more [here](../guides/migrating-to-1.0.md/#why-is-the-dashboard-no-longer-bundled-in-the-worker) | `https://demo.r2explorer.dev` |
| `emailRouting` | `object` or `undefined` | Customize Email Explorer, read more [here](../guides/setup-email-explorer.md) | `https://demo.r2explorer.dev` |
| `cacheAssets` | `boolean` or `undefined` | Cache dashboard assets by 5 minutes, default: `true` | `https://demo.r2explorer.dev` |

`emailRouting` options:

Expand Down Expand Up @@ -45,7 +45,7 @@ wrangler deploy
To setup a custom domain, just open the [Cloudflare dashboard](https://dash.cloudflare.com/?to=/:account/workers/services/view/:worker/production/settings#domains) and go to Workers & Pages ->
your worker -> Triggers. And click "Add Custom Domain".

![Cloudflare Workers Dashboard](/assets/custom-domain.png)
![Cloudflare Workers Dashboard](../assets/custom-domain.png)

## Configuring Email Explorer target bucket

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

Start by creating a new fork of the [github repository here](https://github.com/G4brym/R2-Explorer/fork).

![Fork](/assets/github-action/fork.png)
![Fork](../assets/github-action/fork.png)

Create a new API Token as described in the [official Cloudflare Docs](https://developers.cloudflare.com/workers/wrangler/migration/v1-to-v2/wrangler-legacy/authentication/#api-token).

Then, in your new repository go to Settings -> Secret and variables -> Actions -> New repository secret.

![new secret](/assets/github-action/new-secret.png)
![new secret](../assets/github-action/new-secret.png)

Create a new secret with the name `CF_API_TOKEN` and the value as the newly created token.

![add cf token](/assets/github-action/add-cf-token.png)
![add cf token](../assets/github-action/add-cf-token.png)

Now switch to the variables tab and create the following variables:

Expand All @@ -30,20 +30,20 @@ Example variables:
- `R2EXPLORER_DOMAIN => my-domain.com`


![add variables](/assets/github-action/add-variables.png)
![add variables](../assets/github-action/add-variables.png)


Now go to the github repository and click Actions -> I understand my workflows, go ahead and enable them.

![enable actions](/assets/github-action/enable-actions.png)
![enable actions](../assets/github-action/enable-actions.png)


After enabling actions, go ahead and trigger a new deploy, you can use this flow at any time to re-deploy
your application.

Click Actions -> Deploy -> Run workflow -> Run workflow.

![trigger update](/assets/github-action/trigger-update.png)
![trigger update](../assets/github-action/trigger-update.png)


## 2nd Method (create-cloudflare)
Expand All @@ -65,5 +65,5 @@ This command with automatically create the project files locally and install all

## 3rd Method (manual template)

If you prefer to do the things yourself, there is a project template available on
If you prefer to do the things yourself, there is a project template available on
[github here](https://github.com/G4brym/R2-Explorer/tree/main/template), that you can use.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default R2Explorer({ readonly: false, basicAuth: [{
},{
username: 'anotherUser',
password: '123567'
}]
}]
});
```

Expand Down Expand Up @@ -46,7 +46,7 @@ You can find the team name, in the Zero trust dashboard -> Settings -> Custom Pa

In my account the team name is `r2explorer`.

![Cloudflare Zero Trust Dashboard](/assets/cloudflare-access.png)
![Cloudflare Zero Trust Dashboard](../assets/cloudflare-access.png)

---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
R2 Explorer receives updates regularly, you will be prompted to update your application inside your
instance, in the bottom left connor, like this:

![Update available](/assets/update-available.png)
![Update available](../assets/update-available.png)

## Manual update

Expand All @@ -18,10 +18,10 @@ wrangler deploy

## Update using github actions

You can check if your workers needs to update in fork github repository, by looking into the commits behind
You can check if your workers needs to update in fork github repository, by looking into the commits behind
section.

To start the update, just click sync fork and then click update branch.
To start the update, just click sync fork and then click update branch.

This will update your fork and trigger an automatic deploy to update your Cloudflare worker.

Expand All @@ -30,5 +30,5 @@ This will update your fork and trigger an automatic deploy to update your Cloudf
Update using github actions, **requires** you to setup your instance following this [tutorial here](./creating-a-new-project.md).


![update](/assets/github-action/update-available.png)
![update](../assets/github-action/update-available.png)

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Email Explorer is a feature, that allows you and your team to see and open email received using
[Cloudflare Email routing](https://www.cloudflare.com/developer-platform/email-routing/).

![Email routing screenshot](/assets/setup-email-routing-4.png)
![Email routing screenshot](../assets/setup-email-routing-4.png)

It works by catching the emails you configure to send to your R2 Explorer instance, saving theses
in a R2 bucket and then exposing a UI built around the R2 API.
Expand Down Expand Up @@ -34,11 +34,11 @@ the domain you want to setup.

Open the Email -> Email Routing

![open email routing tab](/assets/setup-email-routing-3.png)
![open email routing tab](../assets/setup-email-routing-3.png)

Then click Routes and in the bottom select Edit in the Catch-all address.

![edit routing](/assets/setup-email-routing.png)
![edit routing](../assets/setup-email-routing.png)

!!! note

Expand All @@ -47,12 +47,12 @@ Then click Routes and in the bottom select Edit in the Catch-all address.

Finally click Send to a Worker, pick your R2 Explorer instance and click save.

![edit routing](/assets/setup-email-routing-2.png)
![edit routing](../assets/setup-email-routing-2.png)

Congratulations! you will now be able to see all the emails you receive inside your R2 Explorer instance.

By default your emails will end up in the 1º bucket you have, but you can overwrite it, read more
[here](/getting-started/configuration/#configuring-email-explorer-target-bucket).
By default your emails will end up in the 1º bucket you have, but you can overwrite it, read more
[here](../getting-started/configuration.md#configuring-email-explorer-target-bucket).



35 changes: 20 additions & 15 deletions docs/pages/index.md → packages/docs/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ hide:
# - toc
---

# R2 Explorer

<div align="center">
<a href="https://r2explorer.dev/">
<img src="https://raw.githubusercontent.com/G4brym/R2-explorer/refs/heads/main/docs/pages/assets/r2-explorer-logo.png" width="500" height="auto" alt="R2-Explorer"/>
<img src="https://raw.githubusercontent.com/G4brym/R2-explorer/refs/heads/main/packages/docs/pages/assets/r2-explorer-logo.png" width="500" height="auto" alt="R2-Explorer"/>
</a>
</div>

Expand Down Expand Up @@ -44,20 +46,23 @@ Read this in other languages: [Español](https://r2explorer-dev.translate.goog/?

- Self-hosted/Deployed on your own Cloudflare Account
- [Receive and read emails](https://r2explorer.dev/guides/setup-email-explorer/) (via Cloudflare Email Routing)
- Security:
- [Basic Auth](https://r2explorer.dev/getting-started/security/#basic-auth)
- [Cloudflare Access](https://r2explorer.dev/getting-started/security/#authenticating-with-cloudflare-access)
- Managing files:
- In-browser File preview (pdf, image, txt, markdown, csv, logpush...)
- In-browser File editing
- Drag-and-Drop upload
- Upload files or folders with files
- Multipart upload for big files
- HTTP/Custom metadata edit
- Organization:
- Create folders
- Upload/Rename/Download/Delete files
- Right click in file for extra options

##### Security:
- [Basic Auth](https://r2explorer.dev/getting-started/security/#basic-auth)
- [Cloudflare Access](https://r2explorer.dev/getting-started/security/#authenticating-with-cloudflare-access)

##### Managing files:
- In-browser File preview (pdf, image, txt, markdown, csv, logpush...)
- In-browser File editing
- Drag-and-Drop upload
- Upload files or folders with files
- Multipart upload for big files
- HTTP/Custom metadata edit

##### Organization:
- Create folders
- Upload/Rename/Download/Delete files
- Right click in file for extra options

## Installation

Expand Down
1 change: 1 addition & 0 deletions packages/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mkdocs-material==9.5.49

0 comments on commit fb5915d

Please sign in to comment.