From edf301cfa320cce48eaf055a57f416bc1aa6ee1e Mon Sep 17 00:00:00 2001 From: Claudius Date: Sun, 31 Mar 2019 16:02:05 +0200 Subject: splitting README.md into files in /docs for better readability Signed-off-by: Claudius --- docs/dev/getting-started.md | 16 ++++++++++++++++ docs/dev/ot.md | 6 ++++++ 2 files changed, 22 insertions(+) create mode 100644 docs/dev/getting-started.md create mode 100644 docs/dev/ot.md (limited to 'docs/dev') diff --git a/docs/dev/getting-started.md b/docs/dev/getting-started.md new file mode 100644 index 00000000..6eb1b136 --- /dev/null +++ b/docs/dev/getting-started.md @@ -0,0 +1,16 @@ +# Developer Notes + +## Structure + +```text +codimd/ +├── test/ --- test suite +├── docs/ --- documentation +├── lib/ --- server libraries +└── public/ --- client files + ├── css/ --- css styles + ├── docs/ --- default documents + ├── js/ --- js scripts + ├── vendor/ --- vendor includes + └── views/ --- view templates +``` diff --git a/docs/dev/ot.md b/docs/dev/ot.md new file mode 100644 index 00000000..71f7f78d --- /dev/null +++ b/docs/dev/ot.md @@ -0,0 +1,6 @@ +## Operational Transformation + +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/) -- cgit v1.3.1 From 74fdd26ea057dab77e761614497d69d2c90a66d7 Mon Sep 17 00:00:00 2001 From: Claudius Date: Sun, 31 Mar 2019 18:57:26 +0200 Subject: integrating information from the old wiki Signed-off-by: Claudius --- CHANGELOG.md | 7 ++ docs/dev/getting-started.md | 49 ++++++++++++-- docs/slide-options.md | 159 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 211 insertions(+), 4 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 docs/slide-options.md (limited to 'docs/dev') diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..97224d1e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# CHANGELOG + +Please refer to the release notes published under +[`public/docs/release-notes.md`](public/docs/release-notes.md). + +These are also available on each CodiMD instance under +https://[domain-name]/release-notes diff --git a/docs/dev/getting-started.md b/docs/dev/getting-started.md index 6eb1b136..79a97d4a 100644 --- a/docs/dev/getting-started.md +++ b/docs/dev/getting-started.md @@ -1,13 +1,54 @@ # Developer Notes +## Preparing for running the code + +**Notice:** *If you're into [docker](../setup/docker.md) or [heroku](../setup/heroku.md), +there's extra documents for those!* + +1. Clone the repository (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 + and create configs. The setup script is written in Bash, you would need bash + as a prerequisite. +3. Setup the [config file](../configuration-config-file.md) or set up + [environment variables](../configuration-env-vars.md). + + +## Running the Code + +Now that everything is in place, we can start CodiMD: + +4. `npm run build` will build the frontend bundle. It uses webpack to do that. +5. Run the server with `node app.js` + + +## Running the Code with Auto-Reload + +The commands above are fine for production, but you're a developer and surely +you want to change things. You would need to restart both commands whenever you +change something. Luckily, you can run these commands that will automatically +rebuild the frontend or restart the server if necessary. + +The commands will stay active in your terminal, so you will need multiple tabs +to run both at the same time. + +4. Use `npm run dev` if you want webpack to continuously rebuild the frontend + code. +5. To auto-reload the server, the easiest method is to install [nodemon](https://www.npmjs.com/package/nodemon) + and run `nodemon --watch app.js --watch lib --watch locales app.js`. + + ## Structure +The repository contains two parts: a server (backend) and a client (frontend). +most of the server code is in `/lib` and most of the client code is in `public`. + ```text -codimd/ -├── test/ --- test suite +codimd-server/ ├── docs/ --- documentation -├── lib/ --- server libraries -└── public/ --- client files +├── lib/ --- server code +├── test/ --- test suite +└── public/ --- client code ├── css/ --- css styles ├── docs/ --- default documents ├── js/ --- js scripts diff --git a/docs/slide-options.md b/docs/slide-options.md new file mode 100644 index 00000000..8da5dc10 --- /dev/null +++ b/docs/slide-options.md @@ -0,0 +1,159 @@ +## Slide Separators +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). + +The following separators are used for each in the hackmd syntax: +``` +# First Slide + +--- + +# Next slide + +---- + +## Subslide +``` +as you can see, horizontal transitions are separated by `---` and vertical transitions by `----` + +## Basic YAML header +It's possible to customise the slide options using the YAML header in the slide markdown. + +eg: +``` +--- +title: Example Slide +tags: presentation +slideOptions: + theme: solarized + transition: 'fade' + # parallaxBackgroundImage: 'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg' +--- +``` +make sure to have two spaces only at the start of the listed slide options. + +you can comment out options with a `#` + +### Some other options +``` +# Display controls in the bottom right corner +controls: true + +# Display a presentation progress bar +progress: true + +# Set default timing of 2 minutes per slide +defaultTiming: 120 + +# Display the page number of the current slide +slideNumber: false + +# Push each slide change to the browser history +history: false + +# Enable keyboard shortcuts for navigation +keyboard: true + +# Enable the slide overview mode +overview: true + +# Vertical centering of slides +center: true + +# Enables touch navigation on devices with touch input +touch: true + +# Loop the presentation +loop: false + +# Change the presentation direction to be RTL +rtl: false + +# Randomizes the order of slides each time the presentation loads +shuffle: false + +# Turns fragments on and off globally +fragments: true + +# Flags if the presentation is running in an embedded mode, +# i.e. contained within a limited portion of the screen +embedded: false + +# Flags if we should show a help overlay when the questionmark +# key is pressed +help: true + +# Flags if speaker notes should be visible to all viewers +showNotes: false + +# Global override for autolaying embedded media (video/audio/iframe) +# - null: Media will only autoplay if data-autoplay is present +# - true: All media will autoplay, regardless of individual setting +# - false: No media will autoplay, regardless of individual setting +autoPlayMedia: null + +# Number of milliseconds between automatically proceeding to the +# next slide, disabled when set to 0, this value can be overwritten +# by using a data-autoslide attribute on your slides +autoSlide: 0 + +# Stop auto-sliding after user input +autoSlideStoppable: true + +# Use this method for navigation when auto-sliding +autoSlideMethod: Reveal.navigateNext + +# Enable slide navigation via mouse wheel +mouseWheel: false + +# Hides the address bar on mobile devices +hideAddressBar: true + +# Opens links in an iframe preview overlay +previewLinks: false + +# Transition style +transition: 'slide' +# none/fade/slide/convex/concave/zoom + +# Transition speed +transitionSpeed: 'default' +# default/fast/slow + +# Transition style for full page slide backgrounds +backgroundTransition: 'fade' +# none/fade/slide/convex/concave/zoom + +# Number of slides away from the current that are visible +viewDistance: 3 + +# Parallax background image +parallaxBackgroundImage: '' +# e.g. "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'" + +# Parallax background size +parallaxBackgroundSize: '' +# CSS syntax, e.g. "2100px 900px" + +# Number of pixels to move the parallax background per slide +# - Calculated automatically unless specified +# - Set to 0 to disable movement along an axis +parallaxBackgroundHorizontal: null +parallaxBackgroundVertical: null + +# The display mode that will be used to show slides +display: 'block' +``` + +## Customising individual slides + +custom background image: +``` +--- + + +#### testslide + +--- +``` -- cgit v1.3.1 From 54edec89000aec94cae325be3d5c85442ac21adf Mon Sep 17 00:00:00 2001 From: Claudius Date: Sun, 31 Mar 2019 20:10:32 +0200 Subject: striving for consistency across various docs Signed-off-by: Claudius --- .gitignore | 1 - README.md | 8 ++-- docs/configuration-config-file.md | 3 +- docs/configuration-env-vars.md | 3 +- docs/dev/getting-started.md | 10 ++--- docs/dev/ot.md | 12 ++++- docs/dev/webpack.md | 9 +++- docs/guides/auth/github.md | 31 ++++++------- docs/guides/auth/gitlab-self-hosted.md | 8 ++-- docs/guides/auth/ldap-AD.md | 1 - docs/guides/auth/mattermost-self-hosted.md | 32 ++++++------- docs/guides/auth/nextcloud.md | 4 +- docs/guides/auth/saml-onelogin.md | 52 ++++++++++----------- docs/guides/auth/saml.md | 62 +++++++++++++------------- docs/guides/auth/twitter.md | 42 ++++++++--------- docs/guides/migrations-and-breaking-changes.md | 14 ++---- docs/guides/minio-image-upload.md | 14 +++--- docs/guides/s3-image-upload.md | 7 +-- docs/history.md | 3 +- docs/setup/cloudron.md | 3 +- docs/setup/docker.md | 7 +-- docs/setup/heroku.md | 3 +- docs/setup/kubernetes.md | 3 +- docs/setup/manual-setup.md | 4 +- docs/slide-options.md | 6 ++- public/docs/features.md | 2 +- public/docs/release-notes.md | 2 +- 27 files changed, 175 insertions(+), 171 deletions(-) (limited to 'docs/dev') diff --git a/.gitignore b/.gitignore index 755e3f94..a31c3148 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ composer.lock .idea/ Thumbs.db npm-debug.log -hackmd_io newrelic_agent.log logs/ tmp/ diff --git a/README.md b/README.md index 6e4d349f..2cc9f46f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ CodiMD [![version][github-version-badge]][github-release-page] [![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 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). @@ -16,13 +17,14 @@ into its own organisation. [A longer writeup can be read in the history doc](doc ## 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 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, 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 diff --git a/docs/configuration-config-file.md b/docs/configuration-config-file.md index 4edbbf0f..bc9c19e3 100644 --- a/docs/configuration-config-file.md +++ b/docs/configuration-config-file.md @@ -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 [environment variables](configuration-env-vars.md). The config file is processed diff --git a/docs/configuration-env-vars.md b/docs/configuration-env-vars.md index 2823a402..aa70b95d 100644 --- a/docs/configuration-env-vars.md +++ b/docs/configuration-env-vars.md @@ -1,4 +1,5 @@ -# Configuration Using Environment variables +Configuration Using Environment variables +=== You can choose to configure CodiMD with either a [config file](configuration-config-file.md) or with environment variables. diff --git a/docs/dev/getting-started.md b/docs/dev/getting-started.md index 79a97d4a..07524971 100644 --- a/docs/dev/getting-started.md +++ b/docs/dev/getting-started.md @@ -1,12 +1,12 @@ -# Developer Notes +Developer Notes +=== ## Preparing for running the code -**Notice:** *If you're into [docker](../setup/docker.md) or [heroku](../setup/heroku.md), -there's extra documents for those!* +**Notice:** *There's [specialised instructions for docker](../setup/docker.md) or [heroku](../setup/heroku.md), if you prefer running code this way!* -1. Clone the repository (Cloning is the preferred way, but you can also download - and unzip a release) +1. Clone the repository with `git clone https://github.com/codimd/server.git codimd-server` + (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 and create configs. The setup script is written in Bash, you would need bash as a prerequisite. diff --git a/docs/dev/ot.md b/docs/dev/ot.md index 71f7f78d..924be693 100644 --- a/docs/dev/ot.md +++ b/docs/dev/ot.md @@ -1,6 +1,14 @@ -## Operational Transformation +Operational Transformation +=== 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/) + +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 diff --git a/docs/dev/webpack.md b/docs/dev/webpack.md index 7b391f3a..b05fd1d3 100644 --- a/docs/dev/webpack.md +++ b/docs/dev/webpack.md @@ -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` This file contains all common definition for chunks and plugins, that are needed by the whole app. diff --git a/docs/guides/auth/github.md b/docs/guides/auth/github.md index 482bca31..d16b486f 100644 --- a/docs/guides/auth/github.md +++ b/docs/guides/auth/github.md @@ -1,27 +1,24 @@ 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 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** + ![register-oauth-application-form](../../images/auth/register-oauth-application-form.png) -4. Fill out the new OAuth application registration form, and click **Register Application** + **Note:** *The callback URL is /auth/github/callback* -![register-oauth-application-form](../../images/auth/register-oauth-application-form.png) - -*Note: The callback URL is /auth/github/callback* - -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) +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) 6. Add the Client ID and Client Secret to your config.json file or pass them as environment variables - * config.json: - ````javascript + * `config.json`: + ```js { "production": { "github": { @@ -30,9 +27,9 @@ Authentication guide - GitHub } } } - ```` + ``` * environment variables: - ```` - HMD_GITHUB_CLIENTID=3747d30eaccXXXXXXXXX - HMD_GITHUB_CLIENTSECRET=2a8e682948eee0c580XXXXXXXXXXXXXXXXXXXXXX + ```sh + CMD_GITHUB_CLIENTID=3747d30eaccXXXXXXXXX + CMD_GITHUB_CLIENTSECRET=2a8e682948eee0c580XXXXXXXXXXXXXXXXXXXXXX ```` diff --git a/docs/guides/auth/gitlab-self-hosted.md b/docs/guides/auth/gitlab-self-hosted.md index d19caf76..ea1ad6bd 100644 --- a/docs/guides/auth/gitlab-self-hosted.md +++ b/docs/guides/auth/gitlab-self-hosted.md @@ -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 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:` ``` -- HMD_DOMAIN=your.hackmd.domain +- HMD_DOMAIN=your.codimd.domain - HMD_URL_ADDPORT=443 - HMD_PROTOCOL_USESSL=true - HMD_GITLAB_BASEURL=https://your.gitlab.domain @@ -27,6 +27,6 @@ ``` 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) diff --git a/docs/guides/auth/ldap-AD.md b/docs/guides/auth/ldap-AD.md index 77521db3..e74121f1 100644 --- a/docs/guides/auth/ldap-AD.md +++ b/docs/guides/auth/ldap-AD.md @@ -1,7 +1,6 @@ AD LDAP auth === - To setup your CodiMD instance with Active Directory you need the following configs: ``` diff --git a/docs/guides/auth/mattermost-self-hosted.md b/docs/guides/auth/mattermost-self-hosted.md index e3050595..d8280399 100644 --- a/docs/guides/auth/mattermost-self-hosted.md +++ b/docs/guides/auth/mattermost-self-hosted.md @@ -1,33 +1,29 @@ 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. 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` - -![mattermost-enable-oauth2](../../images/auth/mattermost-enable-oauth2.png) +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) 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 - -![mattermost-oauth-app-add](../../images/auth/mattermost-oauth-app-add.png) +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) -5. Fill out the form and click **Save** - -![mattermost-oauth-app-form](../../images/auth/mattermost-oauth-app-form.png) +5. Fill out the form and click **Save** + ![mattermost-oauth-app-form](../../images/auth/mattermost-oauth-app-form.png) *Note: The callback URL is \/auth/oauth2/callback* -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) +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) 7. Add the Client ID and Client Secret to your config.json file or pass them as environment variables - * config.json: - ````javascript + * `config.json`: + ```javascript { "production": { "oauth2": { @@ -43,9 +39,9 @@ This guide uses the generic OAuth2 module for compatibility with Mattermost vers } } } - ```` + ``` * environment variables: - ```` + ```sh CMD_OAUTH2_BASEURL=https://your.mattermost.domain CMD_OAUTH2_USER_PROFILE_URL=https://your.mattermost.domain/api/v4/users/me 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_CLIENT_ID=ii4p1u3jz7dXXXXXXXXXXXXXXX CMD_OAUTH2_CLIENT_SECRET=mqzzx6fydbXXXXXXXXXXXXXXXX - ```` + ``` diff --git a/docs/guides/auth/nextcloud.md b/docs/guides/auth/nextcloud.md index 42db8b42..3bf86d31 100644 --- a/docs/guides/auth/nextcloud.md +++ b/docs/guides/auth/nextcloud.md @@ -9,10 +9,10 @@ This guide uses the generic OAuth2 module for compatibility with Nextcloud 13 an 2. Navigate to the OAuth integration settings: Profile Icon (top right) --> Settings Then choose Security Settings from the *Administration* part of the list - Don't confuse this with Personal Security Settings, where you would change your personal password! - At the top there's OAuth 2.0-Clients. + At the top there's OAuth 2.0-Clients. ![Where to find OAuth2 in Nextcloud](../../images/auth/nextcloud-oauth2-1-settings.png) -3. Add your CodiMD instance by giving it a *name* (perhaps CodiMD, but could be anything) and a *Redirection-URI*. The Redirection-URI will be `\/auth/oauth2/callback`. Click Add. +3. Add your CodiMD instance by giving it a *name* (perhaps CodiMD, but could be anything) and a *Redirection-URI*. The Redirection-URI will be `\/auth/oauth2/callback`. Click Add. ![Adding a client to Nextcloud](../../images/auth/nextcloud-oauth2-2-client-add.png) diff --git a/docs/guides/auth/saml-onelogin.md b/docs/guides/auth/saml-onelogin.md index 14ce61a5..785e36ba 100644 --- a/docs/guides/auth/saml-onelogin.md +++ b/docs/guides/auth/saml-onelogin.md @@ -1,40 +1,35 @@ 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) 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. + ![onelogin-select-template](../../images/auth/onelogin-select-template.png) -4. Find "SAML Test Connector (SP)" for template of settings and select it. - -![onelogin-select-template](../../images/auth/onelogin-select-template.png) - -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) +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) 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) - * ACS (Consumer) URL Validator: The callback URL of your hackmd. (serverurl + /auth/saml/callback) + * RelayState: The base URL of your CodiMD, which is issuer. (last slash is not needed) + * ACS (Consumer) URL Validator: The callback URL of your CodiMD. (serverurl + /auth/saml/callback) * ACS (Consumer) URL: same as above. - * Login URL: login URL(SAML requester) of your hackmd. (serverurl + /auth/saml) - -![onelogin-edit-sp-metadata](../../images/auth/onelogin-edit-sp-metadata.png) + * Login URL: login URL(SAML requester) of your CopiMD. (serverurl + /auth/saml) + ![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. * X.509 Certificate: Click **View Details** and **DOWNLOAD** or copy the content of certificate ....(A) - * SAML 2.0 Endpoint (HTTP): Copy the URL ....(B) - -![onelogin-copy-idp-metadata](../../images/auth/onelogin-copy-idp-metadata.png) + * SAML 2.0 Endpoint (HTTP): Copy the URL ....(B) + ![onelogin-copy-idp-metadata](../../images/auth/onelogin-copy-idp-metadata.png) -8. In your hackmd server, create IdP certificate file from (A) +8. In your CodiMD 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. - * config.json: - ````javascript + * `config.json`: + ```javascript { "production": { "saml": { @@ -43,12 +38,11 @@ Authentication guide - SAML (OneLogin) } } } - ```` + ``` * environment variables - ```` - HMD_SAML_IDPSSOURL=https://*******.onelogin.com/trust/saml2/http-post/sso/****** - HMD_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). - -![onelogin-use-dashboard](../../images/auth/onelogin-use-dashboard.png) + ```sh + CMD_SAML_IDPSSOURL=https://*******.onelogin.com/trust/saml2/http-post/sso/****** + CMD_SAML_IDPCERT=/path/to/idp_cert.pem + ``` +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) diff --git a/docs/guides/auth/saml.md b/docs/guides/auth/saml.md index 7f63b748..3a64f5f7 100644 --- a/docs/guides/auth/saml.md +++ b/docs/guides/auth/saml.md @@ -1,7 +1,7 @@ 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. @@ -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 * _Note: If not accessible from IdP, download to local once and upload to 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. * urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress (default) * urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - * config.json: - ````javascript + * `config.json`: + ```javascript { "production": { "saml": { /* omitted */ - "issuer": "myhackmd" + "issuer": "mycodimd" "identifierFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified" } } } - ```` + ``` * environment variables - ```` - HMD_SAML_ISSUER=myhackmd - HMD_SAML_IDENTIFIERFORMAT=urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - ```` + ``` + CMD_SAML_ISSUER=mycodimd + 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. * `attribute`: A dictionary to map attribute names - * `attribute.id`: A primary key of user table for your HackMD - * `attribute.username`: Attribute name of displaying user name on HackMD + * `attribute.id`: A primary key of user table for your CodiMD + * `attribute.username`: Attribute name of displaying user name on CodiMD * `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._ - * config.json: - ````javascript + * `config.json`: + ```javascript { "production": { "saml": { @@ -51,35 +51,35 @@ The basic procedure is the same as the case of OneLogin which is mentioned in [O } } } - ```` + ``` * environment variables - ```` - HMD_SAML_ATTRIBUTE_ID=sAMAccountName - HMD_SAML_ATTRIBUTE_USERNAME=nickName - HMD_SAML_ATTRIBUTE_EMAIL=mail - ```` + ```sh + CMD_SAML_ATTRIBUTE_ID=sAMAccountName + CMD_SAML_ATTRIBUTE_USERNAME=nickName + 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). * `groupAttribute`: An attribute name of group membership - * `requiredGroups`: Group names array for allowed access to HackMD. 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. + * `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 CodiMD. Use vertical bar to separate for environment variables. * _Note: Evaluates `externalGroups` first_ - * config.json: - ````javascript + * `config.json`: + ```javascript { "production": { "saml": { /* omitted */ "groupAttribute": "memberOf", - "requiredGroups": [ "hackmd-users", "board-members" ], + "requiredGroups": [ "codimd-users", "board-members" ], "externalGroups": [ "temporary-staff" ] } } } - ```` + ``` * environment variables - ```` - HMD_SAML_GROUPATTRIBUTE=memberOf - HMD_SAML_REQUIREDGROUPS=hackmd-users|board-members - HMD_SAML_EXTERNALGROUPS=temporary-staff - ```` + ```sh + CMD_SAML_GROUPATTRIBUTE=memberOf + CMD_SAML_REQUIREDGROUPS=codimd-users|board-members + CMD_SAML_EXTERNALGROUPS=temporary-staff + ``` diff --git a/docs/guides/auth/twitter.md b/docs/guides/auth/twitter.md index da35a4e3..1973515c 100644 --- a/docs/guides/auth/twitter.md +++ b/docs/guides/auth/twitter.md @@ -1,33 +1,29 @@ 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 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** + ![register-twitter-application](../../images/auth/register-twitter-application.png) -4. Fill out the create application form, check the developer agreement box, and click **Create Your Twitter Application** + *Note: you may have to register your phone number with Twitter to create a Twitter application* -![register-twitter-application](../../images/auth/register-twitter-application.png) + To do this Click your profile icon --> Settings and privacy --> Mobile --> Select Country/region --> Enter phone number --> Click Continue -*Note: you may have to register your phone number with Twitter to create a Twitter application* +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) -To do this Click your profile icon --> Settings and privacy --> Mobile --> Select Country/region --> Enter phone number --> Click Continue +6. Obtain your Twitter Consumer Key and Consumer Secret + ![twitter-app-keys](../../images/auth/twitter-app-keys.png) -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) - -6. Obtain your Twitter Consumer Key and Consumer Secret - -![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: - ````javascript +7. Add your Consumer Key and Consumer Secret to your `config.json` file or pass them as environment variables: + * `config.json`: + ```javascript { "production": { "twitter": { @@ -36,9 +32,9 @@ To do this Click your profile icon --> Settings and privacy --> Mobile --> Sele } } } - ```` + ``` * environment variables: - ```` - HMD_TWITTER_CONSUMERKEY=esTCJFXXXXXXXXXXXXXXXXXXX - HMD_TWITTER_CONSUMERSECRET=zpCs4tU86pRVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - ```` + ```sh + CMD_TWITTER_CONSUMERKEY=esTCJFXXXXXXXXXXXXXXXXXXX + CMD_TWITTER_CONSUMERSECRET=zpCs4tU86pRVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + ``` diff --git a/docs/guides/migrations-and-breaking-changes.md b/docs/guides/migrations-and-breaking-changes.md index f5a416f6..776055b6 100644 --- a/docs/guides/migrations-and-breaking-changes.md +++ b/docs/guides/migrations-and-breaking-changes.md @@ -1,4 +1,5 @@ -# Migrations and Notable Changes +Migrations and Notable Changes +=== ## 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 -[**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. Please run the migration tool if you're upgrading from the old version. ## 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. 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. - -## 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/) diff --git a/docs/guides/minio-image-upload.md b/docs/guides/minio-image-upload.md index 1544e249..258b0d90 100644 --- a/docs/guides/minio-image-upload.md +++ b/docs/guides/minio-image-upload.md @@ -1,7 +1,7 @@ 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. @@ -9,7 +9,7 @@ Minio Guide for CodiMD production setup. 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 ``` @@ -18,7 +18,7 @@ Minio Guide for CodiMD 2. Next step is to get the credentials form the container: - ``` + ```sh docker logs test-minio ``` @@ -28,7 +28,7 @@ Minio Guide for CodiMD ![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) @@ -40,7 +40,7 @@ Minio Guide for CodiMD ![minio policy adding](../images/minio-image-upload/create-policy.png) *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 "minio": { @@ -58,7 +58,7 @@ Minio Guide for CodiMD 7. Set bucket name ```JSON - "s3bucket": "hackmd" + "s3bucket": "codimd" ``` 8. Set upload type. @@ -79,7 +79,7 @@ Minio Guide for CodiMD "port": 9000, "secure": false }, - "s3bucket": "hackmd", + "s3bucket": "codimd", "imageuploadtype": "minio" } ``` diff --git a/docs/guides/s3-image-upload.md b/docs/guides/s3-image-upload.md index 29437019..7ca8dd12 100644 --- a/docs/guides/s3-image-upload.md +++ b/docs/guides/s3-image-upload.md @@ -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. @@ -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 diff --git a/docs/history.md b/docs/history.md index b1dfde8a..cd12a369 100644 --- a/docs/history.md +++ b/docs/history.md @@ -1,4 +1,5 @@ -# History of CodiMD +History of CodiMD +=== ## It started with HackMD diff --git a/docs/setup/cloudron.md b/docs/setup/cloudron.md index edab7d0d..aa707dc4 100644 --- a/docs/setup/cloudron.md +++ b/docs/setup/cloudron.md @@ -1,4 +1,5 @@ -## Cloudron +Cloudron +=== Install CodiMD on [Cloudron](https://cloudron.io): diff --git a/docs/setup/docker.md b/docs/setup/docker.md index defe467a..1a9fd89f 100644 --- a/docs/setup/docker.md +++ b/docs/setup/docker.md @@ -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) @@ -14,9 +15,9 @@ The easiest way to setup CodiMD using docker are using the following three commands: -```console +```sh git clone https://github.com/codimd/container.git cd codimd-container 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). diff --git a/docs/setup/heroku.md b/docs/setup/heroku.md index 86b4ecae..9dc3bb3a 100644 --- a/docs/setup/heroku.md +++ b/docs/setup/heroku.md @@ -1,4 +1,5 @@ -## Heroku Deployment +Heroku Deployment +=== You can quickly setup a sample Heroku CodiMD application by clicking the button below. diff --git a/docs/setup/kubernetes.md b/docs/setup/kubernetes.md index 400e2b4f..db596851 100644 --- a/docs/setup/kubernetes.md +++ b/docs/setup/kubernetes.md @@ -1,4 +1,5 @@ -## Kubernetes +Kubernetes +=== To install use `helm install stable/hackmd`. diff --git a/docs/setup/manual-setup.md b/docs/setup/manual-setup.md index 25869ee0..721d5bf7 100644 --- a/docs/setup/manual-setup.md +++ b/docs/setup/manual-setup.md @@ -1,4 +1,5 @@ -# Manual Installation +Manual Installation +=== ## 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) - For **building** CodiMD we recommend to use a machine with at least **2GB** RAM + ## Instructions 1. Download a release and unzip or clone into a directory diff --git a/docs/slide-options.md b/docs/slide-options.md index 8da5dc10..d1277831 100644 --- a/docs/slide-options.md +++ b/docs/slide-options.md @@ -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. 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 diff --git a/public/docs/features.md b/public/docs/features.md index e17619fb..9f61992f 100644 --- a/public/docs/features.md +++ b/public/docs/features.md @@ -67,7 +67,7 @@ There are four possible options: Notes can be embedded as follows: ```xml - + ``` ## [Slide Mode](./slide-example): diff --git a/public/docs/release-notes.md b/public/docs/release-notes.md index 6c30a0ff..5eb2802d 100644 --- a/public/docs/release-notes.md +++ b/public/docs/release-notes.md @@ -184,7 +184,7 @@ Release Notes --- ### 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 * Show full title by hovering over to table of contents entries -- cgit v1.3.1