summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix wrong maxAgeSeconds multiplicationSheogorath2018-11-192-2/+2
| | | | | | | | | | | | | | | | | | | It seems like the inital work on the hsts module expected milliseconds. This has either changed or was never true. Either way, it caused that the current defaults resulted in theory in a 1000 year HSTS policy. Luckily helmet was smart enough to not go higher than 1 year. Anyway, this patch fixes the multiplication of the configured size with 1000 by removing this multiplication. Also to simplify the reading of the defaults, we split them into their components, 60 times 60 seconds so we get one hour. 24 of those hours so we get a day and finally 365 days to get our original wanted default of one year. Reference: https://github.com/hackmdio/CodiMD/commit/d69d65ea7434eee85db4b905f0852f4d8fa7ecce Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* Merge pull request #1043 from SISheogorath/fix/tocEmptyHeadChristoph (Sheogorath) Kern2018-11-193-6/+9
|\ | | | | Fix ToC breaking documents with empty h* elements
| * Fix wrong anchorsSheogorath2018-11-192-2/+5
| | | | | | | | | | | | | | | | | | | | While experimenting with the ToC changes, it became obvious that anchors for those unnamed headers don't work. This patch fixes those links by running the autolinkify twice and make sure linkify only adds links to non-empty ids. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
| * Fix ToC breaking documents with empty h* elementsSheogorath2018-11-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Right now, the ToC has an undefined variable i that was an index in the original ToC code. Since the major rewrite in 4fe062085324c50f2cfa062258559cf31858ef5f it's a recursive function without this index. The variable `i` was wrongly copied into its current place from the old code. This patch replaces the variable `i` with the index of the header element. Fix the undefined variable problem. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* | Merge pull request #1061 from SISheogorath/feature/updateHintsChristoph (Sheogorath) Kern2018-11-191-0/+4
|\ \ | | | | | | Add hints about how to be informed about updates
| * | Add hints about how to be informed about updatesSheogorath2018-11-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keeping people in the loop about new version of CodiMD is not easy. When people don't keep an eye on GitHub it's easy to miss new versions. To help people keeping their software up to date, this patch adds hints to check out our community channel or simply the GitHub Atom feed generated for based on the release page to get informed about new versions. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* | | Update de.json (POEditor.com)Christoph (Sheogorath) Kern2018-11-181-103/+35
| | |
* | | Update fr.json (POEditor.com)Christoph (Sheogorath) Kern2018-11-181-103/+35
| | |
* | | Update nl.json (POEditor.com)Christoph (Sheogorath) Kern2018-11-181-103/+35
| | |
* | | Update zh-TW.json (POEditor.com)Christoph (Sheogorath) Kern2018-11-181-103/+35
| | |
* | | Update zh-CN.json (POEditor.com)Christoph (Sheogorath) Kern2018-11-181-103/+35
| | |
* | | Update de.json (POEditor.com)Christoph (Sheogorath) Kern2018-11-181-33/+103
| | |
* | | Update fr.json (POEditor.com)Christoph (Sheogorath) Kern2018-11-181-34/+103
| | |
* | | Update nl.json (POEditor.com)Christoph (Sheogorath) Kern2018-11-181-10/+16
| | |
* | | Update zh-TW.json (POEditor.com)Christoph (Sheogorath) Kern2018-11-181-107/+184
| | |
* | | Update zh-CN.json (POEditor.com)Christoph (Sheogorath) Kern2018-11-181-108/+184
| | |
* | | Merge pull request #1060 from SISheogorath/fix/indexLinksChristoph (Sheogorath) Kern2018-11-181-3/+3
|\ \ \ | |/ / |/| | Fixing links on index page
| * | Fixing links on index pageSheogorath2018-11-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seems like ids in Firefox are case sensitive. So linking in the current way fails. This patch fixes the links by using the exact matching version of the titles on the features page. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* | | Update nl.json (POEditor.com)Christoph (Sheogorath) Kern2018-11-181-105/+178
| | |
* | | Merge pull request #1053 from dsprenkels/robots.txtChristoph (Sheogorath) Kern2018-11-174-1/+5
|\ \ \ | | | | | | | | Disallow creation of robots.txt in freeurl
| * | | Disallow creation of robots.txt in freeurlDaan Sprenkels2018-11-174-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a configuration setting to "hard"-disable creation of notes as set by the configuration value. This defaults to `['robots.txt', 'favicon.ico']`, because these files are often accidentally created by bots and browsers. This commit fixes #1052. Signed-off-by: Daan Sprenkels <hello@dsprenkels.com>
* | | | Merge pull request #943 from SISheogorath/feature/improveSetupChristoph (Sheogorath) Kern2018-11-172-5/+7
|\ \ \ \ | | | | | | | | | | Some minor improvements for setup script
| * | | | Run db migrations on startSheogorath2018-09-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should force db migrations to run on every start. This will minimize the impact of breaking migrations in future. While it may causes some issues with the next start since CodiMD won't start when the migrations fail. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
| * | | | Some minor improvements for setup scriptSheogorath2018-09-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we use `yarn` for our container setup and try to enforce dependencies, we should also use yarn in the setup script. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* | | | | Merge pull request #1040 from sunbit/masterChristoph (Sheogorath) Kern2018-11-178-8/+8
|\ \ \ \ \ | | | | | | | | | | | | Fix migration failure due to change on error messages
| * | | | | Update error message text checksCarles Bruguera2018-11-168-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Carles Bruguera <carlesba@gmail.com>
* | | | | | Merge pull request #1059 from SISheogorath/fix/winstonStreamingChristoph (Sheogorath) Kern2018-11-172-2/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix streaming for winston
| * | | | | | Fix streaming for winstonSheogorath2018-11-162-2/+10
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the upgrade of winston in c3584770f24205d84b9399abd9535cb27dc7b00c a the class extension for streaming was removed. This caused silent crashes. Somehow winston simply called `process.exit(1)` whenever `logger.write()` was called. This is really bad and only easy to debug because of the testing right after upgrading. However, reimplementing the stream interface as it was, didn't work, due to the fact that `logger.write()` is already implemented and causes the mentioned problem. So we extent the object with an `stream` object that implements `write()` for streams and pass that to morgan. So this patch fixes unexpected exiting for streaming towards our logging module. References: https://www.digitalocean.com/community/tutorials/how-to-use-winston-to-log-node-js-applications https://github.com/hackmdio/codimd/commit/c3584770f24205d84b9399abd9535cb27dc7b00c https://stackoverflow.com/a/28824464 Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* | | | | | Merge pull request #1058 from ccoenen/bug/oauth2internalerrorChristoph (Sheogorath) Kern2018-11-161-4/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | InternalOAuthError is not part of passport, but of passport-oauth2 #1056
| * | | | | | InternalOAuthError is not part of passport, but of passport-oauth2Claudius Coenen2018-11-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes part of #1056: an error while obtaining the profile would have `502`-crashed the server. Signed-off-by: Claudius Coenen <opensource@amenthes.de>
* | | | | | | Merge pull request #1057 from ccoenen/eslintChristoph (Sheogorath) Kern2018-11-1613-44/+75
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | switching to eslint for code checking
| * | | | | | switching to eslint for code checkingClaudius Coenen2018-11-1413-44/+75
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | most rules degraded to WARN, so we don't go insane. This will change over time. The aim is to conform to a common style Signed-off-by: Claudius Coenen <opensource@amenthes.de>
* | | | | | Merge pull request #1055 from SISheogorath/upgrade/winstonChristoph (Sheogorath) Kern2018-11-147-17/+25
|\ \ \ \ \ \ | | | | | | | | | | | | | | Upgrade winston / refactor logging
| * | | | | | Upgrade winstonSheogorath2018-11-147-17/+25
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our log library got a new major version which should be implemented. That's exactly what this patch does. Implementing the new version of the logging library. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* | | | | | Merge pull request #1047 from SISheogorath/docs/slideModeChristoph (Sheogorath) Kern2018-11-143-15/+29
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Add documentation for document type
| * | | | | Add documentation for slide view mode to features pageSheogorath2018-11-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since it's a very useful feature, we should mention it in multiple locations. So we mention it in the slide mode section of the features page. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
| * | | | | Some minor improvements to the yaml-metadata docsSheogorath2018-11-141-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switching form XAML to YAML syntax highlighting and fixing some grammar. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
| * | | | | Add documentation for type fieldSheogorath2018-11-141-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The yaml-metadata documentation should mention the type field. This is also open for future extension. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
| * | | | | Activate slide editing mode for exampleSheogorath2018-11-141-0/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have this awesome editing mode for slide shows. We just don't enable it or tell anyone that it exists. Maybe we should do this. This patch sets the type for the slide example. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* | | | | Merge pull request #1054 from SISheogorath/fix/otLoggingChristoph (Sheogorath) Kern2018-11-131-5/+5
|\ \ \ \ \ | |/ / / / |/| | | | Fix logging in ot module
| * | | | Fix logging in ot moduleSheogorath2018-11-131-5/+5
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Seems like there was some debugging going on some day, this patch should make sure the right logging is used. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* | | | Merge pull request #1027 from asg017/masterChristoph (Sheogorath) Kern2018-11-121-0/+3
|\ \ \ \ | | | | | | | | | | Add download action to published notes
| * | | | forgot break statementAlex Garcia2018-10-271-0/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alex Garcia <alexsebastian.garcia@gmail.com>
| * | | | Add download action to published notesAlex Garcia2018-10-271-0/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Alex Garcia <alexsebastian.garcia@gmail.com>
* | | | | Merge pull request #983 from SISheogorath/fix/disableIndexesChristoph (Sheogorath) Kern2018-11-121-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Enforce disabled index for static assets
| * | | | | Enforce disabled index for static assetsSheogorath2018-11-121-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ExpressJS still does allow serving index.html files. This change disables that permanently. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* | | | | Merge pull request #1028 from SISheogorath/docs/editorModesChristoph (Sheogorath) Kern2018-11-121-2/+16
|\ \ \ \ \ | | | | | | | | | | | | Add documentation about editor modes in features page
| * | | | | Add documentation about editor modes in features pageSheogorath2018-10-281-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Codemirror provides various modes via keymapping. These are already available by a menu in the interface. But they aren't mentioned anywhere. This patch provides some documentation about the editor modes and their implications. Since they are a feature, the documentation is done on the features page. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
* | | | | | Merge pull request #1048 from dsprenkels/etherpad-migration-guideChristoph (Sheogorath) Kern2018-11-121-0/+131
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add an etherpad migration guide
| * | | | | | Add an etherpad migration guideDaan Sprenkels2018-11-101-0/+131
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this guide I share how a migration from etherpad to codimd can be done. I am not completely sure if the script that is included is completely error-free. Readers/reviewers should be aware that there may be bugs.may be bugs. Signed-off-by: Daan Sprenkels <hello@dsprenkels.com>