Commit Graph

2894 Commits

Author SHA1 Message Date
Ca Chen b957b8bda2 Use brace wrapped param
Signed-off-by: Ca Chen <kiancaca@gmail.com>
2020-07-02 12:48:10 +08:00
Ca Chen aad7dcad95 fix lint errors
Signed-off-by: Ca Chen <kiancaca@gmail.com>
2020-07-02 12:48:10 +08:00
Ca Chen ac7a229b1c fix: css overwritten
Signed-off-by: Ca Chen <kiancaca@gmail.com>
2020-07-02 12:48:10 +08:00
Ca Chen 6f580e9be8 1. mv fretboard path to `public/js/lib/renderer`
2. use `string-loader` instead of `svg-inline-loader`

Signed-off-by: Ca Chen <kiancaca@gmail.com>
2020-07-02 12:48:10 +08:00
Ca Chen 370423aefc add css, make fretboardSVG.js to separate svg files
Signed-off-by: Ca Chen <kiancaca@gmail.com>
2020-07-02 12:48:10 +08:00
Ca Chen 2ea3e59842 init ascii fretboard
Signed-off-by: Ca Chen <kiancaca@gmail.com>
2020-07-02 12:48:10 +08:00
James Tsai f0faaa58d6 Update gitignore
Signed-off-by: James Tsai <jamesscamel@gmail.com>
2020-07-01 11:42:28 +08:00
James Tsai 84814ee1ee Remove reduntant file
Signed-off-by: James Tsai <jamesscamel@gmail.com>
2020-07-01 11:42:28 +08:00
James Tsai 07f32f5bbf Fix standard
Signed-off-by: James Tsai <jamesscamel@gmail.com>
2020-07-01 11:42:28 +08:00
James Tsai 2973bfbceb Add list-my-note API
Signed-off-by: James Tsai <jamesscamel@gmail.com>
2020-07-01 11:42:28 +08:00
schokotets 2c9f73cfb2
feature: pass-through yaml metadata image to html meta tag
Signed-off-by: schokotets <moritzleni@gmail.com>
2020-06-27 17:22:11 +02:00
Gereon Dusella c7013574e2 added documentation to features.md
Signed-off-by: Gereon Dusella <git@gereondusella.de>
2020-06-03 20:43:52 +02:00
Gereon Dusella 1248bc9cd4 added default value `3` to CMD_DEFAULT_TOC_DEPTH
Signed-off-by: Gereon Dusella <git@gereondusella.de>
2020-06-03 20:17:06 +02:00
Gereon Dusella aa7fb0e012 wrong package referenced in public/docs/yaml-metadata.md
Signed-off-by: Gereon Dusella <git@gereondusella.de>
2020-06-03 18:41:41 +02:00
Gereon Dusella b15c59e15e added an option to set the TOC depth directly inside the [toc] tag
Signed-off-by: Gereon Dusella <git@gereondusella.de>
2020-06-03 18:32:48 +02:00
Gereon Dusella 56e01fa76e added an Environment Variable `CMD_DEFAULT_TOC_DEPTH` to set default toc depth
Signed-off-by: Gereon Dusella <git@gereondusella.de>
2020-06-03 17:38:28 +02:00
Yukai Huang 7b148457a7
Merge pull request #1530 from hackmdio/fix/improve-filesystem-upload
fix: improve image upload to filesystem may caused app crash
2020-06-02 07:45:48 +08:00
Gereon Dusella 5847bf09bf added an option to set the depth of the table of contents freely for every note
Signed-off-by: Gereon Dusella <git@gereondusella.de>
2020-06-01 22:27:16 +02:00
Raccoon c6b6d63301
Merge pull request #1531 from hackmdio/feature/editor-scroll-over-lines
Make editor can scroll over lines
2020-06-01 23:39:56 +08:00
Max Wu b67079d0ed Update to make editor have extra scroll padding in the bottom
that can scroll over editor lines and leave only one line on top of the editor

Signed-off-by: Max Wu <jackymaxj@gmail.com>
2020-06-01 23:08:45 +08:00
Raccoon 8b67d6916d
fix: improve image upload to filesystem may caused app crash
Signed-off-by: Raccoon <raccoon@hackmd.io>
2020-05-31 00:41:01 +08:00
Yukai Huang 4fdb7f8786
Merge pull request #1520 from hackmdio/chore/add-nvmrc
chore: add .nvmrc to fix node version
2020-05-25 22:28:00 +08:00
Yukai Huang f8ff977e98
Merge pull request #1522 from hackmdio/fix/btn-social
fix: replace btn-social with btn-login-method
2020-05-25 22:27:14 +08:00
Max Wu 54d174278e
Merge pull request #1521 from hackmdio/chore/example-to-2.1.0 2020-05-25 22:09:46 +08:00
Raccoon ebec2c0537
fix: replace btn-social with btn-login-method
avoid to use btn-social, some AD block will delete
the DOM with btn-social class.

fixed #1491

Signed-off-by: Raccoon <raccoon@hackmd.io>
2020-05-19 14:42:47 +08:00
Raccoon 201c9bfa84
chore: change image version to 2.1.0 in docker-compose example
Signed-off-by: Raccoon <raccoon@hackmd.io>
2020-05-19 02:13:39 +08:00
Raccoon f8364c4118
chore: add .nvmrc to fix node version
we're use node.js dubnium lts (10.20.1) for docker image.
therefor add .nvmrc to specify node.js version

Signed-off-by: Raccoon <raccoon@hackmd.io>
2020-05-19 02:08:48 +08:00
Max Wu 89a0de4205
Merge pull request #1515 from hackmdio/release-2.1.0 2020-05-18 21:19:54 +08:00
Raccoon 720348a84b
chore: bump 2.1.0
Signed-off-by: Raccoon <raccoon@hackmd.io>
2020-05-18 21:12:42 +08:00
Max Wu fb1e07d203
Merge pull request #1519 from hackmdio/fix/photomjs 2020-05-18 21:04:33 +08:00
Raccoon b87500f866
fix: photomjs dep.
Signed-off-by: Raccoon <raccoon@hackmd.io>
2020-05-18 20:59:53 +08:00
Raccoon 1c38d2477d
Merge pull request #1518 from hackmdio/feat/node-10-build
Change to use nodejs 10.20.1
2020-05-18 13:20:51 +08:00
Raccoon 41519b13df fix: build
Signed-off-by: Raccoon <raccoon@hackmd.io>
2020-05-18 04:26:43 +08:00
Raccoon 209cd29b71 feat: change base image to node 10.20.1
Signed-off-by: Raccoon <raccoon@hackmd.io>
2020-05-17 19:48:17 +08:00
Raccoon 168fdf35c3 Merge branch 'develop' into release-2.1.0 2020-05-17 13:38:03 +08:00
Raccoon 641e569a49
Merge pull request #1517 from hackmdio/fix/getStatus
Fix getStatus caused "TypeError: Converting circular structure to JSON"
2020-05-17 13:31:03 +08:00
Raccoon ac6021a579 fix: returning 500 when getStatus failed
Signed-off-by: Raccoon <raccoon@hackmd.io>
2020-05-17 03:25:57 +08:00
Raccoon a3742e4564 fix: getStatus should reject promise
1. reject promise when getStatus failed
2. change to use promise-way call getStatus in debug message

Signed-off-by: Raccoon <raccoon@hackmd.io>
2020-05-17 03:25:20 +08:00
Raccoon 9c479dd574
Merge branch 'master' into release-2.1.0 2020-05-15 16:50:15 +08:00
Raccoon 54ab0a08de
Merge pull request #1512 from stregouet/oauth2-state
fix: add state parameter for oauth2
2020-05-13 16:26:26 +08:00
Raccoon 20bacfbaf1
Merge pull request #1507 from tarlety/feature-metrics-merge-develop
Exporting metrics for node.js, express, router, and codimd realtime status.
2020-05-13 16:25:38 +08:00
Samuel Trégouët 6ff6d215ab fix: add state parameter for oauth2
state parameter is recommended with oauth2 authentification
to mitigate CSRF attacks (see [1]).
hydra [2] will throw the following error message if state is
missing:

  description="The state is missing or has less than 8 characters and is therefore considered too weak" error=invalid_state hint="Request
 parameter \"state\" must be at least be 8 characters long to ensure sufficient entropy."

[1]: https://auth0.com/docs/protocols/oauth2/oauth-state
[2]: https://www.ory.sh/hydra/

Signed-off-by: Samuel Trégouët <samuel.tregouet@gmail.com>
2020-05-11 15:59:49 +02:00
Raccoon a6c7582aa2
Merge pull request #1500 from ldruschk/fix-internal-server-error-freeurl-not-logged-in
return errorForbidden when anonymous user tries to create freeUrl pad
2020-05-11 16:05:20 +08:00
tarlety ac31e51d67
Fix session flood issue after prometheus metrics are implemented.
Root cause:
- prometheus metrics '/metrics/codimd' exported by 3ca0341 are still in 'routes need sessions' section.
- prometheus scrapes metrics repeatedly.
- new session created every time while prometheus scrapes metrics '/metrics/codimd'.

Solution:
- move /metrics/codimd from lib/routes.js to lib/metrics.js.
- move /metrics/codimd from section 'routes need sessions' of app.js to 'routes without sessions'.

Signed-off-by: tarlety <tarlety@gmail.com>
2020-05-04 20:57:46 +08:00
tarlety 6c4fd144f5
Fix test:ci error in app.js.
Signed-off-by: tarlety <tarlety@gmail.com>
2020-05-02 00:31:34 +08:00
tarlety 09eb8556db
Exporting metrics for node.js, express, router, and codimd realtime status.
1. **/metrics/router** : exporting node.js/express Prometheus metrics by
[prometheus-api-metrics](https://www.npmjs.com/package/prometheus-api-metrics)

2. **/metrics/codimd** : exporting codimd realtime status (/status) as
Prometheus metrics

Signed-off-by: tarlety <tarlety@gmail.com>
2020-05-01 22:17:22 +08:00
Daniele Ricci 5463c8412c Use array for tags when available (close #1496)
Signed-off-by: Daniele Ricci <daniele@casaricci.it>
2020-04-30 20:31:22 +02:00
Lucas Druschke bcd92f500f return errorForbidden when anonymous user tries to create freeUrl pad (closes #1499)
Signed-off-by: Lucas Druschke <ldruschk@posteo.de>
2020-04-29 22:42:56 +02:00
zent00 65222df23c fix typography of footer
Signed-off-by: zent00 <rainylau@gmail.com>
2020-04-29 18:35:28 +08:00
zent00 b2af9d9fb7 Update zh-CN.json
Signed-off-by: zent00 <rainylau@gmail.com>
2020-04-28 14:50:02 +08:00