Skip to content

Commit 4ebda60

Browse files
Reorganize README.md structure, cc #574
1 parent 53c2d0b commit 4ebda60

File tree

1 file changed

+58
-59
lines changed

1 file changed

+58
-59
lines changed

README.md

Lines changed: 58 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,7 @@ Still in the early stage, feel free to fork or contribute to HackMD.
1414

1515
Thanks for using! :smile:
1616

17-
[docker-hackmd](https://github.com/hackmdio/docker-hackmd)
18-
---
19-
20-
Before you go too far, here is the great docker repo for HackMD.
21-
With docker, you can deploy a server in minutes without any downtime.
22-
23-
Heroku Deployment
24-
---
25-
26-
You can quickly setup a sample heroku hackmd application by clicking the button below.
27-
28-
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
29-
30-
[migration-to-0.5.0](https://github.com/hackmdio/migration-to-0.5.0)
31-
---
32-
33-
We don't use LZString to compress socket.io data and DB data after version 0.5.0.
34-
Please run the migration tool if you're upgrading from the old version.
35-
36-
[migration-to-0.4.0](https://github.com/hackmdio/migration-to-0.4.0)
37-
---
38-
39-
We've dropped MongoDB after version 0.4.0.
40-
So here is the migration tool for you to transfer the old DB data to the new DB.
41-
This tool is also used for official service.
42-
43-
Browsers Requirement
44-
---
17+
# Browsers Requirement
4518

4619
- Chrome >= 47, Chrome for Android >= 47
4720
- Safari >= 9, iOS Safari >= 8.4
@@ -50,15 +23,17 @@ Browsers Requirement
5023
- Opera >= 34, Opera Mini not supported
5124
- Android Browser >= 4.4
5225

53-
Prerequisite
54-
---
26+
# Installation
27+
28+
## Getting started (Native install)
29+
30+
### Prerequisite
5531

5632
- Node.js 6.x or up (test up to 7.5.0)
5733
- Database (PostgreSQL, MySQL, MariaDB, SQLite, MSSQL) use charset `utf8`
5834
- npm (and its dependencies, especially [uWebSockets](https://github.com/uWebSockets/uWebSockets#nodejs-developers), [node-gyp](https://github.com/nodejs/node-gyp#installation))
5935

60-
Get started
61-
---
36+
### Instructions
6237

6338
1. Download a release and unzip or clone into a directory
6439
2. Enter the directory and type `bin/setup`, which will install npm dependencies and create configs. The setup script is written in Bash, you would need bash as a prerequisite.
@@ -67,8 +42,22 @@ Get started
6742
5. Build front-end bundle by `npm run build` (use `npm run dev` if you are in development)
6843
6. Run the server as you like (node, forever, pm2)
6944

70-
Upgrade guide
71-
---
45+
## Heroku Deployment
46+
47+
You can quickly setup a sample heroku hackmd application by clicking the button below.
48+
49+
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
50+
51+
## HackMD by docker container
52+
53+
[docker-hackmd](https://github.com/hackmdio/docker-hackmd)
54+
55+
Before you go too far, here is the great docker repo for HackMD.
56+
With docker, you can deploy a server in minutes without any downtime.
57+
58+
# Upgrade
59+
60+
## Native setup
7261

7362
If you are upgrading HackMD from an older version, follow these steps:
7463

@@ -81,32 +70,26 @@ If you are upgrading HackMD from an older version, follow these steps:
8170
6. Run `node_modules/.bin/sequelize db:migrate`, this step will migrate your db to the latest schema
8271
7. Start your whole new server!
8372

84-
Structure
85-
---
73+
* [migration-to-0.5.0](https://github.com/hackmdio/migration-to-0.5.0)
8674

87-
```text
88-
hackmd/
89-
├── tmp/ --- temporary files
90-
├── docs/ --- document files
91-
├── lib/ --- server libraries
92-
└── public/ --- client files
93-
├── css/ --- css styles
94-
├── js/ --- js scripts
95-
├── vendor/ --- vendor includes
96-
└── views/ --- view templates
97-
```
75+
We don't use LZString to compress socket.io data and DB data after version 0.5.0.
76+
Please run the migration tool if you're upgrading from the old version.
77+
78+
* [migration-to-0.4.0](https://github.com/hackmdio/migration-to-0.4.0)
79+
80+
We've dropped MongoDB after version 0.4.0.
81+
So here is the migration tool for you to transfer the old DB data to the new DB.
82+
This tool is also used for official service.
9883

99-
Configuration files
100-
---
84+
# Configuration
10185

10286
There are some configs you need to change in the files below
10387

10488
```
10589
./config.json ----application settings
10690
```
10791

108-
Environment variables (will overwrite other server configs)
109-
---
92+
## Environment variables (will overwrite other server configs)
11093

11194
| variables | example values | description |
11295
| --------- | ------ | ----------- |
@@ -155,8 +138,7 @@ Environment variables (will overwrite other server configs)
155138
| HMD_S3_REGION | `ap-northeast-1` | AWS S3 region |
156139
| HMD_S3_BUCKET | no example | AWS S3 bucket name |
157140

158-
Application settings `config.json`
159-
---
141+
## Application settings `config.json`
160142

161143
| variables | example values | description |
162144
| --------- | ------ | ----------- |
@@ -199,17 +181,15 @@ Application settings `config.json`
199181
| s3 | `{ "accessKeyId": "YOUR_S3_ACCESS_KEY_ID", "secretAccessKey": "YOUR_S3_ACCESS_KEY", "region": "YOUR_S3_REGION" }` | When `imageUploadType` be setted to `s3`, you would also need to setup this key, check our [S3 Image Upload Guide](docs/guides/s3-image-upload.md) |
200182
| s3bucket | `YOUR_S3_BUCKET_NAME` | bucket name when `imageUploadType` is set to `s3` |
201183

202-
Third-party integration api key settings
203-
---
184+
## Third-party integration api key settings
204185

205186
| service | settings location | description |
206187
| ------- | --------- | ----------- |
207188
| facebook, twitter, github, gitlab, dropbox, google, ldap | environment variables or `config.json` | for signin |
208189
| imgur | environment variables or `config.json` | for image upload |
209190
| google drive(`google/apiKey`, `google/clientID`), dropbox(`dropbox/appKey`) | `config.json` | for export and import |
210191

211-
Third-party integration oauth callback urls
212-
---
192+
## Third-party integration oauth callback urls
213193

214194
| service | callback url (after the server url) |
215195
| ------- | --------- |
@@ -220,14 +200,33 @@ Third-party integration oauth callback urls
220200
| dropbox | `/auth/dropbox/callback` |
221201
| google | `/auth/google/callback` |
222202

223-
Operational Transformation
224-
---
203+
# Developer Notes
204+
205+
## Structure
206+
207+
```text
208+
hackmd/
209+
├── tmp/ --- temporary files
210+
├── docs/ --- document files
211+
├── lib/ --- server libraries
212+
└── public/ --- client files
213+
├── css/ --- css styles
214+
├── js/ --- js scripts
215+
├── vendor/ --- vendor includes
216+
└── views/ --- view templates
217+
```
218+
219+
## Operational Transformation
225220

226221
From 0.3.2, we started supporting operational transformation.
227222
It makes concurrent editing safe and will not break up other users' operations.
228223
Additionally, now can show other clients' selections.
229224
See more at [http://operational-transformation.github.io/](http://operational-transformation.github.io/)
230225

226+
227+
228+
# License
229+
231230
**License under MIT.**
232231

233232
[gitter-image]: https://badges.gitter.im/Join%20Chat.svg

0 commit comments

Comments
 (0)