--- image: https://i.imgur.com/oRbNzRm.jpg tags: releases --- # CodiMD 2.0.0 Urocissa caerulea - 2020/03/02 <div style="text-align: center; margin-bottom: 1em;"> <img src="https://i.imgur.com/oRbNzRm.jpg" width="600"> <small style="display: block;">Urocissa caerulea</small> </div> > The Taiwan blue magpie (Urocissa caerulea), also called the Taiwan magpie, Formosan blue magpie, or the "long-tailed mountain lady", is a species of bird of the crow family. It is endemic to Taiwan. > > \- Wikipedia [Taiwan blue magpie](https://en.wikipedia.org/wiki/Taiwan_blue_magpie) In the past few months, we delivered not only a bunch of awesome features but also some critical bug fixes. Moreover, we refactored CodiMD's backend and started to write new tests. To make it easier to maintain, we dropped legacy code, reorganize the repository, and add new documentation. For these reasons, we decided to make a huge leap toward version 2.0.0. Here are the highlights coming from version 2.0.0: - [Multilanguage spellchecker](#Multilanguage-spellchecker) - [Customize editor color schemes](#Customize-editor-color-schemes) - [Export note with Pandoc](#Support-Pandoc-export) - [Embed Geolocation data](#Embedding-Geolocation-data) - [Version checking](#Auto-version-check-for-site-admin) - [Meet the new CodiMD CLI](#Meet-the-new-CodiMD-CLI) - [Refreshed Documentation structure and new Markdown guides](#Refreshed-Documentation-structure-and-new-Markdown-guides) It's our pleasure to announce CodiMD `2.0.0`. Enjoy as always :heartpulse:. For the latest updates, tricks and news, please follow [@Codimd_Dev on Twitter](https://twitter.com/CodiMD_Dev)! ## Highlights ### Editor #### Multilanguage spellchecker In this release, we added an initial multilanguage spellchecker support to CodiMD. Click the <span class="btn btn-default fa fa-check"></span> button on the status bar and choose the language you want to do spellcheck. ![](https://i.imgur.com/KC9PVzv.png) We rewrote CodeMirror spellcheck plugin to let it support multiple languages. It uses [Typo.js](https://github.com/cfinke/Typo.js/) and [wooorm/dictionaries](https://github.com/wooorm/dictionaries) under the hood. For the complete details, please take a look at [PR #1355](https://github.com/hackmdio/codimd/pull/1355). We support four spellcheckers by far. Tell us about what to be added next! - English (United States) - German - German (Austria) - German (Switzerland) #### Customize editor color schemes CodiMD finally supports customizing color schemes! Let us show off a few of them. :art: **One Dark (Current default)** ![](https://i.imgur.com/kNH6R4w.png) **Dracula** ![](https://i.imgur.com/AeL97q7.png) **Tomorror Night Eighties** ![](https://i.imgur.com/kAx0KVS.png) :::info :::spoiler Click to reveal all available color schemes - Light - One Dark (Default) - Monokai - Solarized Dark - Solarized Light - Dracula - Material - Nord - Panda - Ayu Dark - Ayu Mirage - Tomorror Night Bright - Tomorror Night Eighties ::: #### Swapping `edit`/`view` mode button The edit button group is now in the new order, as same as CodiMD's editor layout ordering. ![](https://i.imgur.com/vHbPgyc.png =300x) This proposal was originally from the PR [#665](https://github.com/hackmdio/codimd/pull/665). Although it lost activity for a while, we think this UX change really makes sense! Thank you [@pirate](https://github.com/pirate) for bringing this up! ### Markdown #### Support Pandoc export CodiMD now supports exporting note with Pandoc! :tada: You can try this feature in the download section of the menu. ![](https://i.imgur.com/B5SKSKi.png) **Select output format and click Export** ![](https://i.imgur.com/ShjEXf4.png) For the detail of implementation, please see PR [#1273](https://github.com/hackmdio/codimd/pull/1273) and [hackmdio/pandoc.js](https://github.com/hackmdio/pandoc.js) repository. :::info :::spoiler Click to reveal supported output formats - AsciiDoc - ConTeXt - EPUB (.epub) - EPUB v3 (.epub3) - LaTeX - OpenOffice (.odt) - reStructuredText (.rst) - Rich Text Format (.rtf) - Textile - World (.docx) ::: #### Embedding Geolocation data You can now embed geolocation as map (Open Street Map) in CodiMD. This feature was originally requested in issue [#592](https://github.com/hackmdio/codimd/issues/592). ![](https://i.imgur.com/LH98HnC.png) [Click here to read the documentation and learn how to use it](https://hackmd.io/c/codimd-documentation/%2F%40codimd%2Fextra-supported-syntax#Geo-Map). The syntax is very limited for now, please help us to make it better! [Giving feedback in issue #592](https://github.com/hackmdio/codimd/issues/592). #### PlantUML syntax highlighting CodiMD now supports PlantUML syntax highlighting in the editor. This was done in [hackmdio/CodeMirror#5](https://github.com/hackmdio/CodeMirror/pull/5). The PlantUML CodeMirror grammer is originally implemented by [kkeisuke/plantuml-editor](https://github.com/kkeisuke/plantuml-editor/blob/master/src/lib/codemirror/mode/plantuml/plantuml.js), many thanks to [@kkeisuke](https://github.com/kkeisuke) who've done this awesome work. :smiley_cat: ![](https://i.imgur.com/Ufb0j4I.png) ### Auto version check for site admin CodiMD now checks the running version is whether up-to-date upon the service starts. If your running version is outdated, CodiMD will log the latest version information to console(see the red box in the screenshot): ![](https://i.imgur.com/WwbAGSI.png) While this feature is on by default, we do collect the following information for letting us know the distribution of CodiMD installations: - Running version of CodiMD - Instance IP address (country/location) Due to privacy concerns, you can always opt-out by setting environment variable `CMD_AUTO_VERSION_CHECK` to `false` or setting `autoVersionCheck` to `false` in `config.json`. See [PR #1399](https://github.com/hackmdio/codimd/pull/1399) for the implementation detail. Don't miss any new features! :chart_with_upwards_trend: ### Meet the new CodiMD CLI The new CodiMD CLI is now available on [hackmdio/codimd-cli](https://github.com/hackmdio/codimd-cli)! You can manipulate your notes on CodiMD within your terminal. The new CodiMD CLI is built on top of the [oclif framework](https://oclif.io/) and is written in TypeScript. It's a new lineup of CodiMD. Please help making it better! Open an issue, submit a feature request, or engage in development on the [codimd-cli GitHub repository](https://github.com/hackmdio/codimd-cli). ### Refreshed Documentation structure and new Markdown guides ![](https://i.imgur.com/Rl2LxLT.png) During the release, we've updated several existing documentation, including [Understanding your Editor][understanding-your-editor], [Manage Note Permission][manage-note-permission], [Markdown Syntax guide][markdown-syntax] and [Extra Supported Syntax][extra-supported-syntax]. We recommend every CodiMD user to read these pieces. If you find some parts confused you, welcome to open a pull request to make it better! The source of [CodiMD hosted documentation](https://hackmd.io/c/codimd-documentation) now lives in a separate repository: [hackmdio/codimd-docs](https://github.com/hackmdio/codimd-docs). [understanding-your-editor]: https://hackmd.io/c/codimd-documentation/%2F%40codimd%2Funderstanding-your-editor [manage-note-permission]: https://hackmd.io/c/codimd-documentation/%2F%40codimd%2Fnote-permission [markdown-syntax]: https://hackmd.io/c/codimd-documentation/%2F%40codimd%2Fmarkdown-syntax [extra-supported-syntax]: https://hackmd.io/c/codimd-documentation/%2F%40codimd%2Fextra-supported-syntax ## Breaking Changes ### Drop yarn the package manager We only need one of the package managers, NPM is good enough to provide consistent command and stable lock file now. Yeah, yeah we know that. :joy: ![](https://i.imgur.com/ZXAIPvE.jpg =200x) ### Drop old environment variables support In 2.0.0, we dropped old environment variables that start with `HMD`. For most cases, you can simply change the prefix from `HMD` to `CMD`. Watch out for: - `DEBUG`, now set `NODE_ENV` to `development` to enable it - `DATABASE_URL` become `CMD_DB_URL` - `URL_PATH` become `CMD_URL_PATH` - `PORT` become `CMD_PORT` [Click to see full changeset of the environment variables](https://hackmd.io/c/codimd-documentation/%2F%40codimd%2Fmigrate-2-0#1-Drop-old-environment-variables-support). ### Emphasize your privacy The anonymous policy has been changed in 2.0.0 to provide better privacy defaults. We changed `CMD_ALLOW_ANONYMOUS` to be `false` along with `CMD_ALLOW_ANONYMOUS_EDITS` and `CMD_ALLOW_ANONYMOUS_VIEWS` to be `true`. Please check [Anonymous (Guest) related config](https://hackmd.io/@codimd/note-permission#Anonymous-Guest-related-config) for detailed explanation. ### Prevent unexpected HSTS behavior for subdomains In previous default settings, it forced subdomain to use HSTS, but it might break the sites that hosted in the subdomain and didn’t configured with HTTPS protocol. We changed this behavior in 2.0.0, in order to disable HSTS IncludeSubdomain feature by default. If you want to turn on this feature, please set `CMD_HSTS_INCLUDE_SUBDOMAINS` to `true`. ## Enhancements - Flip the view and edit buttons on the navbar [#1398](https://github.com/hackmdio/codimd/pull/1398) - Refactor server architecture [#1384](https://github.com/hackmdio/codimd/pull/1384) - Support emojify.css by CDN [#1400](https://github.com/hackmdio/codimd/pull/1400) - Drop yarn the package manager [#1410](https://github.com/hackmdio/codimd/pull/1410) - Upgrade mermaid to version 8.4.8 [#1418](https://github.com/hackmdio/codimd/pull/1418) - Upgrade reveal.js to version 3.9.2 [#1420](https://github.com/hackmdio/codimd/pull/1420) - Support highlight PlantUML language in editor [#1428](https://github.com/hackmdio/codimd/pull/1428) - Upgrade markdown-it to version 10.0.0 [#1429](https://github.com/hackmdio/codimd/pull/1429) - Support highlight Vega-Lite language in editor and use svg renderer [#1422](https://github.com/hackmdio/codimd/pull/1422) - Support hostedName in Google OAuth provider [#1426](https://github.com/hackmdio/codimd/pull/1426) ## Fixes - Fix to catch viz.js render async error and recreate Viz instance [#1419](https://github.com/hackmdio/codimd/pull/1419) - Fix server crash when download pdf multiple times [#1421](https://github.com/hackmdio/codimd/pull/1421) - Fix server crash when use OAuth2 provider with non-existing email [#1424](https://github.com/hackmdio/codimd/pull/1424) - Fix to use validator.isURL to validate URL to avoid regex catastrophic backtracking [#1430](https://github.com/hackmdio/codimd/pull/1430) - Fix to allow Dropbox dropins in CSP directives ([e2c31e4c](https://github.com/hackmdio/codimd/pull/1439/commits/e2c31e4cb3c304273b68fb5ef348dbafa09bda4c)) ## Thank you These pull requests came from CodiMD community, thank you guys for being here and making CodiMD awesome :hearts: - Add Bitbucket Support for OAuth [#1381](https://github.com/hackmdio/codimd/pull/1381) [@YusukeIwaki](https://github.com/YusukeIwaki) - Upgrade PostgreSQL docker image from version 11.5 to 11.6-alpine [#1389](https://github.com/hackmdio/codimd/pull/1389) [@tunagohan](https://github.com/tunagohan)