striving for consistency across various docs
Signed-off-by: Claudius <opensource@amenthes.de>
This commit is contained in:
parent
74fdd26ea0
commit
54edec8900
27 changed files with 175 additions and 171 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -8,7 +8,6 @@ composer.lock
|
||||||
.idea/
|
.idea/
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
hackmd_io
|
|
||||||
newrelic_agent.log
|
newrelic_agent.log
|
||||||
logs/
|
logs/
|
||||||
tmp/
|
tmp/
|
||||||
|
|
|
@ -6,7 +6,8 @@ CodiMD
|
||||||
[![version][github-version-badge]][github-release-page]
|
[![version][github-version-badge]][github-release-page]
|
||||||
[![POEditor][poeditor-image]][poeditor-url]
|
[![POEditor][poeditor-image]][poeditor-url]
|
||||||
|
|
||||||
CodiMD lets you create real-time collaborative markdown notes on all platforms.
|
CodiMD lets you create real-time collaborative markdown notes.
|
||||||
|
|
||||||
It is inspired by Hackpad, Etherpad and similar collaborative editors. This
|
It is inspired by Hackpad, Etherpad and similar collaborative editors. This
|
||||||
project originated with the team at [HackMD](https://hackmd.io) and now forked
|
project originated with the team at [HackMD](https://hackmd.io) and now forked
|
||||||
into its own organisation. [A longer writeup can be read in the history doc](docs/history.md).
|
into its own organisation. [A longer writeup can be read in the history doc](docs/history.md).
|
||||||
|
@ -16,13 +17,14 @@ into its own organisation. [A longer writeup can be read in the history doc](doc
|
||||||
|
|
||||||
## Community and Contributions
|
## Community and Contributions
|
||||||
|
|
||||||
We welcome contributions! There's a lot to do. If you would like to report bugs
|
We welcome contributions! There's a lot to do. If you would like to report bugs,
|
||||||
the [issue tracker](github-issue-tracker) is the right place. If you want to
|
the [issue tracker](github-issue-tracker) is the right place. If you want to
|
||||||
help translating, find us on [POEditor](poeditor-url). To get started developing,
|
help translating, find us on [POEditor](poeditor-url). To get started developing,
|
||||||
take a look at the [docs/dev](docs/dev) directory. In any case: come talk to us,
|
take a look at the [docs/dev](docs/dev) directory. In any case: come talk to us,
|
||||||
we'll be delighted to help you with the first steps.
|
we'll be delighted to help you with the first steps.
|
||||||
|
|
||||||
To stay up to date with your installation it's recommended to join our [Matrix channel][matrix.org-url] or subscribe to the [release feed][github-release-feed].
|
To stay up to date with our work it's recommended to join our
|
||||||
|
[Matrix channel][matrix.org-url] or subscribe to the [release feed][github-release-feed].
|
||||||
|
|
||||||
|
|
||||||
## Installation / Upgrading
|
## Installation / Upgrading
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# Configuration Using Config file
|
Configuration Using Config file
|
||||||
|
===
|
||||||
|
|
||||||
You can choose to configure CodiMD with either a config file or with
|
You can choose to configure CodiMD with either a config file or with
|
||||||
[environment variables](configuration-env-vars.md). The config file is processed
|
[environment variables](configuration-env-vars.md). The config file is processed
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# Configuration Using Environment variables
|
Configuration Using Environment variables
|
||||||
|
===
|
||||||
|
|
||||||
You can choose to configure CodiMD with either a
|
You can choose to configure CodiMD with either a
|
||||||
[config file](configuration-config-file.md) or with environment variables.
|
[config file](configuration-config-file.md) or with environment variables.
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Developer Notes
|
Developer Notes
|
||||||
|
===
|
||||||
|
|
||||||
## Preparing for running the code
|
## Preparing for running the code
|
||||||
|
|
||||||
**Notice:** *If you're into [docker](../setup/docker.md) or [heroku](../setup/heroku.md),
|
**Notice:** *There's [specialised instructions for docker](../setup/docker.md) or [heroku](../setup/heroku.md), if you prefer running code this way!*
|
||||||
there's extra documents for those!*
|
|
||||||
|
|
||||||
1. Clone the repository (Cloning is the preferred way, but you can also download
|
1. Clone the repository with `git clone https://github.com/codimd/server.git codimd-server`
|
||||||
and unzip a release)
|
(cloning is the preferred way, but you can also download and unzip a release)
|
||||||
2. Enter the directory and run `bin/setup`, which will install npm dependencies
|
2. Enter the directory and run `bin/setup`, which will install npm dependencies
|
||||||
and create configs. The setup script is written in Bash, you would need bash
|
and create configs. The setup script is written in Bash, you would need bash
|
||||||
as a prerequisite.
|
as a prerequisite.
|
||||||
|
|
|
@ -1,6 +1,14 @@
|
||||||
## Operational Transformation
|
Operational Transformation
|
||||||
|
===
|
||||||
|
|
||||||
From 0.3.2, we started supporting operational transformation.
|
From 0.3.2, we started supporting operational transformation.
|
||||||
It makes concurrent editing safe and will not break up other users' operations.
|
It makes concurrent editing safe and will not break up other users' operations.
|
||||||
Additionally, now can show other clients' selections.
|
Additionally, now can show other clients' selections.
|
||||||
See more at [http://operational-transformation.github.io/](http://operational-transformation.github.io/)
|
|
||||||
|
See more at [https://operational-transformation.github.io/](https://operational-transformation.github.io/)
|
||||||
|
|
||||||
|
And even more in this 2010 article series:
|
||||||
|
|
||||||
|
* https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs_21.html
|
||||||
|
* https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs_22.html
|
||||||
|
* https://drive.googleblog.com/2010/09/whats-different-about-new-google-docs.html
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
# Webpack Docs
|
Webpack
|
||||||
|
===
|
||||||
|
|
||||||
|
Webpack is a JavaScript build system for frontend code. You can find out all
|
||||||
|
about it on [the webpack website](https://webpack.js.org/).
|
||||||
|
|
||||||
|
Here's how we're using it:
|
||||||
|
|
||||||
## `webpack.common.js`
|
## `webpack.common.js`
|
||||||
This file contains all common definition for chunks and plugins, that are needed by the whole app.
|
This file contains all common definition for chunks and plugins, that are needed by the whole app.
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,24 @@
|
||||||
Authentication guide - GitHub
|
Authentication guide - GitHub
|
||||||
===
|
===
|
||||||
|
|
||||||
***Note:** This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
**Note:** *This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
||||||
|
|
||||||
1. Sign-in or sign-up for a GitHub account
|
1. Sign-in or sign-up for a GitHub account
|
||||||
2. Navigate to developer settings in your GitHub account [here](https://github.com/settings/developers) and select the "OAuth Apps" tab
|
2. Navigate to developer settings in your GitHub account [here](https://github.com/settings/developers) and select the "OAuth Apps" tab
|
||||||
3. Click on the **New OAuth App** button, to create a new OAuth App:
|
3. Click on the **New OAuth App** button, to create a new OAuth App:
|
||||||
|
![create-oauth-app](../../images/auth/create-oauth-app.png)
|
||||||
![create-oauth-app](../../images/auth/create-oauth-app.png)
|
|
||||||
|
|
||||||
4. Fill out the new OAuth application registration form, and click **Register Application**
|
4. Fill out the new OAuth application registration form, and click **Register Application**
|
||||||
|
![register-oauth-application-form](../../images/auth/register-oauth-application-form.png)
|
||||||
|
|
||||||
![register-oauth-application-form](../../images/auth/register-oauth-application-form.png)
|
**Note:** *The callback URL is <your-codimd-url>/auth/github/callback*
|
||||||
|
|
||||||
*Note: The callback URL is <your-hackmd-url>/auth/github/callback*
|
|
||||||
|
|
||||||
5. After successfully registering the application, you'll receive the Client ID and Client Secret for the application
|
5. After successfully registering the application, you'll receive the Client ID and Client Secret for the application
|
||||||
|
![application-page](../../images/auth/application-page.png)
|
||||||
![application-page](../../images/auth/application-page.png)
|
|
||||||
|
|
||||||
6. Add the Client ID and Client Secret to your config.json file or pass them as environment variables
|
6. Add the Client ID and Client Secret to your config.json file or pass them as environment variables
|
||||||
* config.json:
|
* `config.json`:
|
||||||
````javascript
|
```js
|
||||||
{
|
{
|
||||||
"production": {
|
"production": {
|
||||||
"github": {
|
"github": {
|
||||||
|
@ -30,9 +27,9 @@ Authentication guide - GitHub
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
````
|
```
|
||||||
* environment variables:
|
* environment variables:
|
||||||
````
|
```sh
|
||||||
HMD_GITHUB_CLIENTID=3747d30eaccXXXXXXXXX
|
CMD_GITHUB_CLIENTID=3747d30eaccXXXXXXXXX
|
||||||
HMD_GITHUB_CLIENTSECRET=2a8e682948eee0c580XXXXXXXXXXXXXXXXXXXXXX
|
CMD_GITHUB_CLIENTSECRET=2a8e682948eee0c580XXXXXXXXXXXXXXXXXXXXXX
|
||||||
````
|
````
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# GitLab (self-hosted)
|
GitLab (self-hosted)
|
||||||
===
|
===
|
||||||
|
|
||||||
***Note:** This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
**Note:** *This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
||||||
|
|
||||||
1. Sign in to your GitLab
|
1. Sign in to your GitLab
|
||||||
2. Navigate to the application management page at `https://your.gitlab.domain/admin/applications` (admin permissions required)
|
2. Navigate to the application management page at `https://your.gitlab.domain/admin/applications` (admin permissions required)
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
6. In the `docker-compose.yml` add the following environment variables to `app:` `environment:`
|
6. In the `docker-compose.yml` add the following environment variables to `app:` `environment:`
|
||||||
|
|
||||||
```
|
```
|
||||||
- HMD_DOMAIN=your.hackmd.domain
|
- HMD_DOMAIN=your.codimd.domain
|
||||||
- HMD_URL_ADDPORT=443
|
- HMD_URL_ADDPORT=443
|
||||||
- HMD_PROTOCOL_USESSL=true
|
- HMD_PROTOCOL_USESSL=true
|
||||||
- HMD_GITLAB_BASEURL=https://your.gitlab.domain
|
- HMD_GITLAB_BASEURL=https://your.gitlab.domain
|
||||||
|
@ -27,6 +27,6 @@
|
||||||
```
|
```
|
||||||
|
|
||||||
7. Run `docker-compose up -d` to apply your settings.
|
7. Run `docker-compose up -d` to apply your settings.
|
||||||
8. Sign in to your HackMD using your GitLab ID:
|
8. Sign in to your CodiMD using your GitLab ID:
|
||||||
|
|
||||||
![Sign in via GitLab](../../images/auth/gitlab-sign-in.png)
|
![Sign in via GitLab](../../images/auth/gitlab-sign-in.png)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
AD LDAP auth
|
AD LDAP auth
|
||||||
===
|
===
|
||||||
|
|
||||||
|
|
||||||
To setup your CodiMD instance with Active Directory you need the following configs:
|
To setup your CodiMD instance with Active Directory you need the following configs:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,33 +1,29 @@
|
||||||
Authentication guide - Mattermost (self-hosted)
|
Authentication guide - Mattermost (self-hosted)
|
||||||
===
|
===
|
||||||
|
|
||||||
*Note: The Mattermost setup portion of this document is just a quick guide. See the [official documentation](https://docs.mattermost.com/developer/oauth-2-0-applications.html) for more details.*
|
**Note:** *The Mattermost setup portion of this document is just a quick guide. See the [official documentation](https://docs.mattermost.com/developer/oauth-2-0-applications.html) for more details.*
|
||||||
|
|
||||||
This guide uses the generic OAuth2 module for compatibility with Mattermost version 5.0 and above.
|
This guide uses the generic OAuth2 module for compatibility with Mattermost version 5.0 and above.
|
||||||
|
|
||||||
1. Sign-in with an administrator account to your Mattermost instance
|
1. Sign-in with an administrator account to your Mattermost instance
|
||||||
2. Make sure **OAuth 2.0 Service Provider** is enabled in the Main Menu (menu button next to your username in the top left corner) --> System Console --> Custom Integrations menu, which you can find at `https://your.mattermost.domain/admin_console/integrations/custom`
|
2. Make sure **OAuth 2.0 Service Provider** is enabled in the Main Menu (menu button next to your username in the top left corner) --> System Console --> Custom Integrations menu, which you can find at `https://your.mattermost.domain/admin_console/integrations/custom`
|
||||||
|
![mattermost-enable-oauth2](../../images/auth/mattermost-enable-oauth2.png)
|
||||||
![mattermost-enable-oauth2](../../images/auth/mattermost-enable-oauth2.png)
|
|
||||||
|
|
||||||
3. Navigate to the OAuth integration settings through Main Menu --> Integrations --> OAuth 2.0 Applications, at `https://your.mattermost.domain/yourteam/integrations/oauth2-apps`
|
3. Navigate to the OAuth integration settings through Main Menu --> Integrations --> OAuth 2.0 Applications, at `https://your.mattermost.domain/yourteam/integrations/oauth2-apps`
|
||||||
4. Click on the **Add OAuth 2.0 Application** button to add a new OAuth application
|
4. Click on the **Add OAuth 2.0 Application** button to add a new OAuth application
|
||||||
|
![mattermost-oauth-app-add](../../images/auth/mattermost-oauth-app-add.png)
|
||||||
![mattermost-oauth-app-add](../../images/auth/mattermost-oauth-app-add.png)
|
|
||||||
|
|
||||||
5. Fill out the form and click **Save**
|
5. Fill out the form and click **Save**
|
||||||
|
![mattermost-oauth-app-form](../../images/auth/mattermost-oauth-app-form.png)
|
||||||
![mattermost-oauth-app-form](../../images/auth/mattermost-oauth-app-form.png)
|
|
||||||
|
|
||||||
*Note: The callback URL is \<your-codimd-url\>/auth/oauth2/callback*
|
*Note: The callback URL is \<your-codimd-url\>/auth/oauth2/callback*
|
||||||
|
|
||||||
6. After saving the application, you'll receive the Client ID and Client Secret
|
6. After saving the application, you'll receive the Client ID and Client Secret
|
||||||
|
![mattermost-oauth-app-done](../../images/auth/mattermost-oauth-app-done.png)
|
||||||
![mattermost-oauth-app-done](../../images/auth/mattermost-oauth-app-done.png)
|
|
||||||
|
|
||||||
7. Add the Client ID and Client Secret to your config.json file or pass them as environment variables
|
7. Add the Client ID and Client Secret to your config.json file or pass them as environment variables
|
||||||
* config.json:
|
* `config.json`:
|
||||||
````javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"production": {
|
"production": {
|
||||||
"oauth2": {
|
"oauth2": {
|
||||||
|
@ -43,9 +39,9 @@ This guide uses the generic OAuth2 module for compatibility with Mattermost vers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
````
|
```
|
||||||
* environment variables:
|
* environment variables:
|
||||||
````
|
```sh
|
||||||
CMD_OAUTH2_BASEURL=https://your.mattermost.domain
|
CMD_OAUTH2_BASEURL=https://your.mattermost.domain
|
||||||
CMD_OAUTH2_USER_PROFILE_URL=https://your.mattermost.domain/api/v4/users/me
|
CMD_OAUTH2_USER_PROFILE_URL=https://your.mattermost.domain/api/v4/users/me
|
||||||
CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=id
|
CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR=id
|
||||||
|
@ -55,4 +51,4 @@ This guide uses the generic OAuth2 module for compatibility with Mattermost vers
|
||||||
CMD_OAUTH2_AUTHORIZATION_URL=https://your.mattermost.domain/oauth/authorize
|
CMD_OAUTH2_AUTHORIZATION_URL=https://your.mattermost.domain/oauth/authorize
|
||||||
CMD_OAUTH2_CLIENT_ID=ii4p1u3jz7dXXXXXXXXXXXXXXX
|
CMD_OAUTH2_CLIENT_ID=ii4p1u3jz7dXXXXXXXXXXXXXXX
|
||||||
CMD_OAUTH2_CLIENT_SECRET=mqzzx6fydbXXXXXXXXXXXXXXXX
|
CMD_OAUTH2_CLIENT_SECRET=mqzzx6fydbXXXXXXXXXXXXXXXX
|
||||||
````
|
```
|
||||||
|
|
|
@ -1,40 +1,35 @@
|
||||||
Authentication guide - SAML (OneLogin)
|
Authentication guide - SAML (OneLogin)
|
||||||
===
|
===
|
||||||
|
|
||||||
***Note:** This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
**Note:** *This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
||||||
|
|
||||||
1. Sign-in or sign-up for an OneLogin account. (available free trial for 2 weeks)
|
1. Sign-in or sign-up for an OneLogin account. (available free trial for 2 weeks)
|
||||||
2. Go to the administration page.
|
2. Go to the administration page.
|
||||||
3. Select the **APPS** menu and click on the **Add Apps**.
|
3. Select the **APPS** menu and click on the **Add Apps**.
|
||||||
|
![onelogin-add-app](../../images/auth/onelogin-add-app.png)
|
||||||
![onelogin-add-app](../../images/auth/onelogin-add-app.png)
|
|
||||||
|
|
||||||
4. Find "SAML Test Connector (SP)" for template of settings and select it.
|
4. Find "SAML Test Connector (SP)" for template of settings and select it.
|
||||||
|
![onelogin-select-template](../../images/auth/onelogin-select-template.png)
|
||||||
![onelogin-select-template](../../images/auth/onelogin-select-template.png)
|
|
||||||
|
|
||||||
5. Edit display name and icons for OneLogin dashboard as you want, and click **SAVE**.
|
5. Edit display name and icons for OneLogin dashboard as you want, and click **SAVE**.
|
||||||
|
![onelogin-edit-app-name](../../images/auth/onelogin-edit-app-name.png)
|
||||||
![onelogin-edit-app-name](../../images/auth/onelogin-edit-app-name.png)
|
|
||||||
|
|
||||||
6. After that other tabs will appear, click the **Configuration**, and fill out the below items, and click **SAVE**.
|
6. After that other tabs will appear, click the **Configuration**, and fill out the below items, and click **SAVE**.
|
||||||
* RelayState: The base URL of your hackmd, which is issuer. (last slash is not needed)
|
* RelayState: The base URL of your CodiMD, which is issuer. (last slash is not needed)
|
||||||
* ACS (Consumer) URL Validator: The callback URL of your hackmd. (serverurl + /auth/saml/callback)
|
* ACS (Consumer) URL Validator: The callback URL of your CodiMD. (serverurl + /auth/saml/callback)
|
||||||
* ACS (Consumer) URL: same as above.
|
* ACS (Consumer) URL: same as above.
|
||||||
* Login URL: login URL(SAML requester) of your hackmd. (serverurl + /auth/saml)
|
* Login URL: login URL(SAML requester) of your CopiMD. (serverurl + /auth/saml)
|
||||||
|
![onelogin-edit-sp-metadata](../../images/auth/onelogin-edit-sp-metadata.png)
|
||||||
![onelogin-edit-sp-metadata](../../images/auth/onelogin-edit-sp-metadata.png)
|
|
||||||
|
|
||||||
7. The registration is completed. Next, click **SSO** and copy or download the items below.
|
7. The registration is completed. Next, click **SSO** and copy or download the items below.
|
||||||
* X.509 Certificate: Click **View Details** and **DOWNLOAD** or copy the content of certificate ....(A)
|
* X.509 Certificate: Click **View Details** and **DOWNLOAD** or copy the content of certificate ....(A)
|
||||||
* SAML 2.0 Endpoint (HTTP): Copy the URL ....(B)
|
* SAML 2.0 Endpoint (HTTP): Copy the URL ....(B)
|
||||||
|
![onelogin-copy-idp-metadata](../../images/auth/onelogin-copy-idp-metadata.png)
|
||||||
|
|
||||||
![onelogin-copy-idp-metadata](../../images/auth/onelogin-copy-idp-metadata.png)
|
8. In your CodiMD server, create IdP certificate file from (A)
|
||||||
|
|
||||||
8. In your hackmd server, create IdP certificate file from (A)
|
|
||||||
9. Add the IdP URL (B) and the Idp certificate file path to your config.json file or pass them as environment variables.
|
9. Add the IdP URL (B) and the Idp certificate file path to your config.json file or pass them as environment variables.
|
||||||
* config.json:
|
* `config.json`:
|
||||||
````javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"production": {
|
"production": {
|
||||||
"saml": {
|
"saml": {
|
||||||
|
@ -43,12 +38,11 @@ Authentication guide - SAML (OneLogin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
````
|
```
|
||||||
* environment variables
|
* environment variables
|
||||||
````
|
```sh
|
||||||
HMD_SAML_IDPSSOURL=https://*******.onelogin.com/trust/saml2/http-post/sso/******
|
CMD_SAML_IDPSSOURL=https://*******.onelogin.com/trust/saml2/http-post/sso/******
|
||||||
HMD_SAML_IDPCERT=/path/to/idp_cert.pem
|
CMD_SAML_IDPCERT=/path/to/idp_cert.pem
|
||||||
````
|
```
|
||||||
10. Try sign-in with SAML from your hackmd sign-in button or OneLogin dashboard (like the screenshot below).
|
10. Try sign-in with SAML from your CodiMD sign-in button or OneLogin dashboard (like the screenshot below).
|
||||||
|
![onelogin-use-dashboard](../../images/auth/onelogin-use-dashboard.png)
|
||||||
![onelogin-use-dashboard](../../images/auth/onelogin-use-dashboard.png)
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Authentication guide - SAML
|
Authentication guide - SAML
|
||||||
===
|
===
|
||||||
|
|
||||||
***Note:** This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
**Note:** *This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
||||||
|
|
||||||
The basic procedure is the same as the case of OneLogin which is mentioned in [OneLogin-Guide](./saml-onelogin.md). If you want to match your IdP, you can use more configurations as below.
|
The basic procedure is the same as the case of OneLogin which is mentioned in [OneLogin-Guide](./saml-onelogin.md). If you want to match your IdP, you can use more configurations as below.
|
||||||
|
|
||||||
|
@ -9,36 +9,36 @@ The basic procedure is the same as the case of OneLogin which is mentioned in [O
|
||||||
* {{your-serverurl}}/auth/saml/metadata
|
* {{your-serverurl}}/auth/saml/metadata
|
||||||
* _Note: If not accessible from IdP, download to local once and upload to IdP._
|
* _Note: If not accessible from IdP, download to local once and upload to IdP._
|
||||||
* Change the value of `issuer`, `identifierFormat` to match your IdP.
|
* Change the value of `issuer`, `identifierFormat` to match your IdP.
|
||||||
* `issuer`: A unique id to identify the application to the IdP, which is the base URL of your HackMD as default
|
* `issuer`: A unique id to identify the application to the IdP, which is the base URL of your CodiMD as default
|
||||||
* `identifierFormat`: A format of unique id to identify the user of IdP, which is the format based on email address as default. It is recommend that you use as below.
|
* `identifierFormat`: A format of unique id to identify the user of IdP, which is the format based on email address as default. It is recommend that you use as below.
|
||||||
* urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress (default)
|
* urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress (default)
|
||||||
* urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
|
* urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
|
||||||
* config.json:
|
* `config.json`:
|
||||||
````javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"production": {
|
"production": {
|
||||||
"saml": {
|
"saml": {
|
||||||
/* omitted */
|
/* omitted */
|
||||||
"issuer": "myhackmd"
|
"issuer": "mycodimd"
|
||||||
"identifierFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
|
"identifierFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
````
|
```
|
||||||
* environment variables
|
* environment variables
|
||||||
````
|
```
|
||||||
HMD_SAML_ISSUER=myhackmd
|
CMD_SAML_ISSUER=mycodimd
|
||||||
HMD_SAML_IDENTIFIERFORMAT=urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
|
CMD_SAML_IDENTIFIERFORMAT=urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
|
||||||
````
|
```
|
||||||
|
|
||||||
* Change mapping of attribute names to customize the displaying user name and email address to match your IdP.
|
* Change mapping of attribute names to customize the displaying user name and email address to match your IdP.
|
||||||
* `attribute`: A dictionary to map attribute names
|
* `attribute`: A dictionary to map attribute names
|
||||||
* `attribute.id`: A primary key of user table for your HackMD
|
* `attribute.id`: A primary key of user table for your CodiMD
|
||||||
* `attribute.username`: Attribute name of displaying user name on HackMD
|
* `attribute.username`: Attribute name of displaying user name on CodiMD
|
||||||
* `attribute.email`: Attribute name of email address, which will be also used for Gravatar
|
* `attribute.email`: Attribute name of email address, which will be also used for Gravatar
|
||||||
* _Note: Default value of all attributes is NameID of SAML response, which is email address if `identifierFormat` is default._
|
* _Note: Default value of all attributes is NameID of SAML response, which is email address if `identifierFormat` is default._
|
||||||
* config.json:
|
* `config.json`:
|
||||||
````javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"production": {
|
"production": {
|
||||||
"saml": {
|
"saml": {
|
||||||
|
@ -51,35 +51,35 @@ The basic procedure is the same as the case of OneLogin which is mentioned in [O
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
````
|
```
|
||||||
* environment variables
|
* environment variables
|
||||||
````
|
```sh
|
||||||
HMD_SAML_ATTRIBUTE_ID=sAMAccountName
|
CMD_SAML_ATTRIBUTE_ID=sAMAccountName
|
||||||
HMD_SAML_ATTRIBUTE_USERNAME=nickName
|
CMD_SAML_ATTRIBUTE_USERNAME=nickName
|
||||||
HMD_SAML_ATTRIBUTE_EMAIL=mail
|
CMD_SAML_ATTRIBUTE_EMAIL=mail
|
||||||
````
|
```
|
||||||
|
|
||||||
* If you want to control permission by group membership, add group attribute name and required group (allowed) or external group (not allowed).
|
* If you want to control permission by group membership, add group attribute name and required group (allowed) or external group (not allowed).
|
||||||
* `groupAttribute`: An attribute name of group membership
|
* `groupAttribute`: An attribute name of group membership
|
||||||
* `requiredGroups`: Group names array for allowed access to HackMD. Use vertical bar to separate for environment variables.
|
* `requiredGroups`: Group names array for allowed access to CodiMD. Use vertical bar to separate for environment variables.
|
||||||
* `externalGroups`: Group names array for not allowed access to HackMD. Use vertical bar to separate for environment variables.
|
* `externalGroups`: Group names array for not allowed access to CodiMD. Use vertical bar to separate for environment variables.
|
||||||
* _Note: Evaluates `externalGroups` first_
|
* _Note: Evaluates `externalGroups` first_
|
||||||
* config.json:
|
* `config.json`:
|
||||||
````javascript
|
```javascript
|
||||||
{
|
{
|
||||||
"production": {
|
"production": {
|
||||||
"saml": {
|
"saml": {
|
||||||
/* omitted */
|
/* omitted */
|
||||||
"groupAttribute": "memberOf",
|
"groupAttribute": "memberOf",
|
||||||
"requiredGroups": [ "hackmd-users", "board-members" ],
|
"requiredGroups": [ "codimd-users", "board-members" ],
|
||||||
"externalGroups": [ "temporary-staff" ]
|
"externalGroups": [ "temporary-staff" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
````
|
```
|
||||||
* environment variables
|
* environment variables
|
||||||
````
|
```sh
|
||||||
HMD_SAML_GROUPATTRIBUTE=memberOf
|
CMD_SAML_GROUPATTRIBUTE=memberOf
|
||||||
HMD_SAML_REQUIREDGROUPS=hackmd-users|board-members
|
CMD_SAML_REQUIREDGROUPS=codimd-users|board-members
|
||||||
HMD_SAML_EXTERNALGROUPS=temporary-staff
|
CMD_SAML_EXTERNALGROUPS=temporary-staff
|
||||||
````
|
```
|
||||||
|
|
|
@ -1,33 +1,29 @@
|
||||||
Authentication guide - Twitter
|
Authentication guide - Twitter
|
||||||
===
|
===
|
||||||
|
|
||||||
***Note:** This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
**Note:** *This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
||||||
|
|
||||||
1. Sign-in or sign-up for a Twitter account
|
1. Sign-in or sign-up for a Twitter account
|
||||||
2. Go to the Twitter Application management page [here](https://apps.twitter.com/)
|
2. Go to the Twitter Application management page [here](https://apps.twitter.com/)
|
||||||
3. Click on the **Create New App** button to create a new Twitter app:
|
3. Click on the **Create New App** button to create a new Twitter app:
|
||||||
|
![create-twitter-app](../../images/auth/create-twitter-app.png)
|
||||||
![create-twitter-app](../../images/auth/create-twitter-app.png)
|
|
||||||
|
|
||||||
4. Fill out the create application form, check the developer agreement box, and click **Create Your Twitter Application**
|
4. Fill out the create application form, check the developer agreement box, and click **Create Your Twitter Application**
|
||||||
|
![register-twitter-application](../../images/auth/register-twitter-application.png)
|
||||||
|
|
||||||
![register-twitter-application](../../images/auth/register-twitter-application.png)
|
*Note: you may have to register your phone number with Twitter to create a Twitter application*
|
||||||
|
|
||||||
*Note: you may have to register your phone number with Twitter to create a Twitter application*
|
To do this Click your profile icon --> Settings and privacy --> Mobile --> Select Country/region --> Enter phone number --> Click Continue
|
||||||
|
|
||||||
To do this Click your profile icon --> Settings and privacy --> Mobile --> Select Country/region --> Enter phone number --> Click Continue
|
|
||||||
|
|
||||||
5. After you receive confirmation that the Twitter application was created, click **Keys and Access Tokens**
|
5. After you receive confirmation that the Twitter application was created, click **Keys and Access Tokens**
|
||||||
|
![twitter-app-confirmation](../../images/auth/twitter-app-confirmation.png)
|
||||||
![twitter-app-confirmation](../../images/auth/twitter-app-confirmation.png)
|
|
||||||
|
|
||||||
6. Obtain your Twitter Consumer Key and Consumer Secret
|
6. Obtain your Twitter Consumer Key and Consumer Secret
|
||||||
|
![twitter-app-keys](../../images/auth/twitter-app-keys.png)
|
||||||
|
|
||||||
![twitter-app-keys](../../images/auth/twitter-app-keys.png)
|
7. Add your Consumer Key and Consumer Secret to your `config.json` file or pass them as environment variables:
|
||||||
|
* `config.json`:
|
||||||
7. Add your Consumer Key and Consumer Secret to your config.json file or pass them as environment variables:
|
```javascript
|
||||||
* config.json:
|
|
||||||
````javascript
|
|
||||||
{
|
{
|
||||||
"production": {
|
"production": {
|
||||||
"twitter": {
|
"twitter": {
|
||||||
|
@ -36,9 +32,9 @@ To do this Click your profile icon --> Settings and privacy --> Mobile --> Sele
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
````
|
```
|
||||||
* environment variables:
|
* environment variables:
|
||||||
````
|
```sh
|
||||||
HMD_TWITTER_CONSUMERKEY=esTCJFXXXXXXXXXXXXXXXXXXX
|
CMD_TWITTER_CONSUMERKEY=esTCJFXXXXXXXXXXXXXXXXXXX
|
||||||
HMD_TWITTER_CONSUMERSECRET=zpCs4tU86pRVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
CMD_TWITTER_CONSUMERSECRET=zpCs4tU86pRVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||||
````
|
```
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# Migrations and Notable Changes
|
Migrations and Notable Changes
|
||||||
|
===
|
||||||
|
|
||||||
## Migrating to 1.3.2
|
## Migrating to 1.3.2
|
||||||
|
|
||||||
|
@ -37,22 +38,15 @@ We deprecated the older lower case config style and moved on to camel case style
|
||||||
|
|
||||||
## Migrating to 0.5.0
|
## Migrating to 0.5.0
|
||||||
|
|
||||||
[**migration-to-0.5.0**](https://github.com/hackmdio/migration-to-0.5.0)
|
[migration-to-0.5.0 migration tool](https://github.com/hackmdio/migration-to-0.5.0)
|
||||||
|
|
||||||
We don't use LZString to compress socket.io data and DB data after version 0.5.0.
|
We don't use LZString to compress socket.io data and DB data after version 0.5.0.
|
||||||
Please run the migration tool if you're upgrading from the old version.
|
Please run the migration tool if you're upgrading from the old version.
|
||||||
|
|
||||||
## Migrating to 0.4.0
|
## Migrating to 0.4.0
|
||||||
|
|
||||||
[**migration-to-0.4.0**](https://github.com/hackmdio/migration-to-0.4.0)
|
[migration-to-0.4.0 migration tool](https://github.com/hackmdio/migration-to-0.4.0)
|
||||||
|
|
||||||
We've dropped MongoDB after version 0.4.0.
|
We've dropped MongoDB after version 0.4.0.
|
||||||
So here is the migration tool for you to transfer the old DB data to the new DB.
|
So here is the migration tool for you to transfer the old DB data to the new DB.
|
||||||
This tool is also used for official service.
|
This tool is also used for official service.
|
||||||
|
|
||||||
## Operational Transformation in 0.3.2
|
|
||||||
|
|
||||||
From 0.3.2, we started supporting operational transformation.
|
|
||||||
It makes concurrent editing safe and will not break up other users' operations.
|
|
||||||
Additionally, now can show other clients' selections.
|
|
||||||
See more at [http://operational-transformation.github.io/](http://operational-transformation.github.io/)
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Minio Guide for CodiMD
|
Minio Guide for CodiMD
|
||||||
===
|
===
|
||||||
|
|
||||||
***Note:** This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
**Note:** *This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
||||||
|
|
||||||
1. First of all you need to setup Minio itself.
|
1. First of all you need to setup Minio itself.
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ Minio Guide for CodiMD
|
||||||
production setup.
|
production setup.
|
||||||
|
|
||||||
For checking it out and development purposes a non-persistent setup is enough:
|
For checking it out and development purposes a non-persistent setup is enough:
|
||||||
```console
|
```sh
|
||||||
docker run --name test-minio --rm -d -p 9000:9000 minio/minio server /data
|
docker run --name test-minio --rm -d -p 9000:9000 minio/minio server /data
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ Minio Guide for CodiMD
|
||||||
|
|
||||||
2. Next step is to get the credentials form the container:
|
2. Next step is to get the credentials form the container:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
docker logs test-minio
|
docker logs test-minio
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ Minio Guide for CodiMD
|
||||||
|
|
||||||
![minio default view](../images/minio-image-upload/default-view.png)
|
![minio default view](../images/minio-image-upload/default-view.png)
|
||||||
|
|
||||||
4. Create a bucket for HackMD
|
4. Create a bucket for CodiMD
|
||||||
|
|
||||||
![minio create bucket](../images/minio-image-upload/create-bucket.png)
|
![minio create bucket](../images/minio-image-upload/create-bucket.png)
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ Minio Guide for CodiMD
|
||||||
![minio policy adding](../images/minio-image-upload/create-policy.png)
|
![minio policy adding](../images/minio-image-upload/create-policy.png)
|
||||||
*Add policy for uploads*
|
*Add policy for uploads*
|
||||||
|
|
||||||
6. Set credentials and configs for Minio in HackMD's `config.json`
|
6. Set credentials and configs for Minio in CodiMD's `config.json`
|
||||||
|
|
||||||
```JSON
|
```JSON
|
||||||
"minio": {
|
"minio": {
|
||||||
|
@ -58,7 +58,7 @@ Minio Guide for CodiMD
|
||||||
7. Set bucket name
|
7. Set bucket name
|
||||||
|
|
||||||
```JSON
|
```JSON
|
||||||
"s3bucket": "hackmd"
|
"s3bucket": "codimd"
|
||||||
```
|
```
|
||||||
|
|
||||||
8. Set upload type.
|
8. Set upload type.
|
||||||
|
@ -79,7 +79,7 @@ Minio Guide for CodiMD
|
||||||
"port": 9000,
|
"port": 9000,
|
||||||
"secure": false
|
"secure": false
|
||||||
},
|
},
|
||||||
"s3bucket": "hackmd",
|
"s3bucket": "codimd",
|
||||||
"imageuploadtype": "minio"
|
"imageuploadtype": "minio"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
# Guide - Setup CodiMD S3 image upload
|
Guide - Setup CodiMD S3 image upload
|
||||||
|
===
|
||||||
|
|
||||||
***Note:** This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
**Note:** *This guide was written before the renaming. Just replace `HackMD` with `CodiMD` in your mind :smile: thanks!*
|
||||||
|
|
||||||
1. Go to [AWS S3 console](https://console.aws.amazon.com/s3/home) and create a new bucket.
|
1. Go to [AWS S3 console](https://console.aws.amazon.com/s3/home) and create a new bucket.
|
||||||
|
|
||||||
|
@ -76,7 +77,7 @@
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
9. In additional to edit `config.json` directly, you could also try [environment variable](https://github.com/codimd/server#environment-variables-will-overwrite-other-server-configs).
|
9. In additional to edit `config.json` directly, you could also try [environment variables](../configuration-env-vars.md).
|
||||||
|
|
||||||
## Related Tools
|
## Related Tools
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# History of CodiMD
|
History of CodiMD
|
||||||
|
===
|
||||||
|
|
||||||
## It started with HackMD
|
## It started with HackMD
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
## Cloudron
|
Cloudron
|
||||||
|
===
|
||||||
|
|
||||||
Install CodiMD on [Cloudron](https://cloudron.io):
|
Install CodiMD on [Cloudron](https://cloudron.io):
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
CodiMD by docker container
|
||||||
|
===
|
||||||
|
|
||||||
## CodiMD by docker container
|
|
||||||
[![Try in PWD](https://cdn.rawgit.com/play-with-docker/stacks/cff22438/assets/images/button.png)](http://play-with-docker.com?stack=https://github.com/codimd/container/raw/master/docker-compose.yml&stack_name=codimd)
|
[![Try in PWD](https://cdn.rawgit.com/play-with-docker/stacks/cff22438/assets/images/button.png)](http://play-with-docker.com?stack=https://github.com/codimd/container/raw/master/docker-compose.yml&stack_name=codimd)
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,9 +15,9 @@
|
||||||
|
|
||||||
The easiest way to setup CodiMD using docker are using the following three commands:
|
The easiest way to setup CodiMD using docker are using the following three commands:
|
||||||
|
|
||||||
```console
|
```sh
|
||||||
git clone https://github.com/codimd/container.git
|
git clone https://github.com/codimd/container.git
|
||||||
cd codimd-container
|
cd codimd-container
|
||||||
docker-compose up
|
docker-compose up
|
||||||
```
|
```
|
||||||
Read more about it in the [container repository…](https://github.com/codimd/container)
|
Read more about it in the [container repository](https://github.com/codimd/container).
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
## Heroku Deployment
|
Heroku Deployment
|
||||||
|
===
|
||||||
|
|
||||||
You can quickly setup a sample Heroku CodiMD application by clicking the button
|
You can quickly setup a sample Heroku CodiMD application by clicking the button
|
||||||
below.
|
below.
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
## Kubernetes
|
Kubernetes
|
||||||
|
===
|
||||||
|
|
||||||
To install use `helm install stable/hackmd`.
|
To install use `helm install stable/hackmd`.
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# Manual Installation
|
Manual Installation
|
||||||
|
===
|
||||||
|
|
||||||
## Requirements on your server
|
## Requirements on your server
|
||||||
|
|
||||||
|
@ -8,6 +9,7 @@
|
||||||
- `libssl-dev` for building scrypt (see [here](https://github.com/ml1nk/node-scrypt/blob/master/README.md#installation-instructions) for further information)
|
- `libssl-dev` for building scrypt (see [here](https://github.com/ml1nk/node-scrypt/blob/master/README.md#installation-instructions) for further information)
|
||||||
- For **building** CodiMD we recommend to use a machine with at least **2GB** RAM
|
- For **building** CodiMD we recommend to use a machine with at least **2GB** RAM
|
||||||
|
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
|
|
||||||
1. Download a release and unzip or clone into a directory
|
1. Download a release and unzip or clone into a directory
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
## Slide Separators
|
Slide Separators
|
||||||
|
===
|
||||||
|
|
||||||
If you're getting started with reveal.js slides, there are a few things you need to know.
|
If you're getting started with reveal.js slides, there are a few things you need to know.
|
||||||
|
|
||||||
There are two types of slides, those that transition horizontally and those that transition vertically (subslides).
|
There are two types of slides, those that transition horizontally and those that transition vertically (subslides).
|
||||||
|
|
||||||
The following separators are used for each in the hackmd syntax:
|
The following separators are used for each in the CodiMD syntax:
|
||||||
```
|
```
|
||||||
# First Slide
|
# First Slide
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ There are four possible options:
|
||||||
Notes can be embedded as follows:
|
Notes can be embedded as follows:
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<iframe width="100%" height="500" src="https://hackmd.io/features" frameborder="0"></iframe>
|
<iframe width="100%" height="500" src="https://demo.codimd.io/features" frameborder="0"></iframe>
|
||||||
```
|
```
|
||||||
|
|
||||||
## [Slide Mode](./slide-example):
|
## [Slide Mode](./slide-example):
|
||||||
|
|
|
@ -184,7 +184,7 @@ Release Notes
|
||||||
---
|
---
|
||||||
|
|
||||||
### Announcement
|
### Announcement
|
||||||
* HackMD CE is renamed to CodiMD to prevent confusion. [For details see here](https://github.com/codimd/server#hackmd-ce-became-codimd)
|
* HackMD CE is renamed to CodiMD to prevent confusion. [For details see here](https://github.com/codimd/server/tree/master/docs/history.md)
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
* Show full title by hovering over to table of contents entries
|
* Show full title by hovering over to table of contents entries
|
||||||
|
|
Loading…
Reference in a new issue