README.md 2.76 KB
Newer Older
tavit ohanian's avatar
tavit ohanian committed
1 2
# dir-index-html

3
[![Made by Protocol Labs](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai)
tavit ohanian's avatar
tavit ohanian committed
4 5 6
[![Project: DMS3](https://img.shields.io/badge/project-DMS3-blue.svg?style=flat-square)](https://dms3.io/)
[![Matrix](https://img.shields.io/badge/matrix-%23dms3%3Amatrix.org-blue.svg?style=flat-square)](https://matrix.to/#/room/#dms3:matrix.org)
[![IRC](https://img.shields.io/badge/freenode-%23dms3-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23dms3)
Richard Littauer's avatar
Richard Littauer committed
7 8
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)

tavit ohanian's avatar
tavit ohanian committed
9
> Directory listing HTML for `go-dms3` gateways
Juan Benet's avatar
Juan Benet committed
10

tavit ohanian's avatar
tavit ohanian committed
11
**NOTE:** This repo is not intended to be used as a standalone project! This code is used by the gateway code within [`go-dms3`](https://gitlab.dms3.io/dms3/go-dms3). In the long term, once the the gateway is extracted from `go-dms3`, the code in this repo will be merged into that gateway package.
12

Jessica Schilling's avatar
Jessica Schilling committed
13
![](https://user-images.githubusercontent.com/157609/88379209-ce6f0600-cda2-11ea-9620-20b9237bb441.png)
Juan Benet's avatar
Juan Benet committed
14

Steven Allen's avatar
Steven Allen committed
15 16
## Updating

17 18 19
When making updates to the directory listing page template, please note the following:

1. Make your changes to the (human-friendly) source documents in the `src` directory
20
2. Before testing or releasing, make sure to run the build script to update the minified version in the top-level directory:
21 22 23 24

```bash
> npm run build
```
tavit ohanian's avatar
tavit ohanian committed
25
3. To get your updates into `go-dms3`, you'll need to do the following:
26
     - Cut a new, appropriately versioned release of `dir-index-html` (don't forget to bump the version number in `package.json`)
tavit ohanian's avatar
tavit ohanian committed
27
     - Make a PR against `go-dms3` following [these instructions](https://gitlab.dms3.io/dms3/go-dms3/tree/master/assets#updating-dir-index-html) for updating the directory index
Steven Allen's avatar
Steven Allen committed
28

Steven Allen's avatar
Steven Allen committed
29 30
## Testing

31 32
1. Make sure you have [Go](https://golang.org/dl/) installed
2. Start the test server, which lives in its own directory:
Steven Allen's avatar
Steven Allen committed
33 34 35 36 37

```bash
> cd test
> go run .
```
38
This will listen on [`localhost:3000`](http://localhost:3000/) and reload the template every time you refresh the page.
Steven Allen's avatar
Steven Allen committed
39

40
If you get a "no such file or directory" error upon trying `go run .`, make sure you ran `npm run build` to generate the minified artifact that the test is looking for.
Steven Allen's avatar
Steven Allen committed
41

Richard Littauer's avatar
Richard Littauer committed
42 43
## Contribute

tavit ohanian's avatar
tavit ohanian committed
44
Feel free to join in. All are welcome! A good place to start is to check the [issues](https://gitlab.dms3.io/dms3/dir-index-html/issues) for anything you find interesting.
Richard Littauer's avatar
Richard Littauer committed
45

tavit ohanian's avatar
tavit ohanian committed
46
This repository falls under the DMS3 [Code of Conduct](https://gitlab.dms3.io/dms3/community/blob/master/code-of-conduct.md).
Richard Littauer's avatar
Richard Littauer committed
47

tavit ohanian's avatar
tavit ohanian committed
48
### Want to hack on DMS3?
Richard Littauer's avatar
Richard Littauer committed
49

tavit ohanian's avatar
tavit ohanian committed
50
[![](https://cdn.rawgit.com/jbenet/contribute-dms3-gif/master/img/contribute.gif)](https://gitlab.dms3.io/dms3/community/blob/master/CONTRIBUTING.md)
Richard Littauer's avatar
Richard Littauer committed
51 52 53

## License

Steven Allen's avatar
Steven Allen committed
54
MIT