Giter VIP home page Giter VIP logo

hedgedoc's Introduction

HedgeDoc Logo

#HedgeDoc on matrix.org version POEditor Mastodon Twitter REUSE Compliance Check Nest.JS CI codecov

HedgeDoc lets you create real-time collaborative markdown notes.

Getting Started

State of the project

HedgeDoc 1.x is stable and used around the world, but the codebase has grown over time, making it hard to add new features.
We are currently working on HedgeDoc 2, a complete rewrite of HedgeDoc. Please note the following:

  • This branch contains the latest development code and does not implement all features yet. If you are looking for the 1.x source code, have a look at the master branch.
  • The 1.x release is maintenance-only. We do not accept feature requests or PRs for this release anymore and may choose to close non-critical bug reports, if the bug will be non-existent in 2.0.
  • HedgeDoc 2 will be split in two components. The backend and the frontend. Both are present in this repository.

Development

Information for setting up a local development environment can be found in the developer documentation

HedgeDoc 2 Alpha

Curious about the new look and feel of HedgeDoc 2? We provide a demo of the alpha on hedgedoc.dev.

If you want to try it out on your own devices, visit the HedgeDoc 2 docs. But be aware that these may change over time.

Contributions

We welcome contributions!
Have a look at our contribution docs to find out how you can help. If you want to contribute to HedgeDoc 2, please join our development chat.

License

Licensed under AGPLv3. For our list of contributors, see AUTHORS.

The license does not include the HedgeDoc logo, whose terms of usage can be found in the github repository.

hedgedoc's People

Contributors

abhilasha06 avatar alexandruvaleanu avatar chasethechicken avatar davidmehren avatar dependabot[bot] avatar dermolly avatar diwakarkashyap avatar eisfunke avatar erikmichelson avatar ggh-weybozeto avatar glmdgrielson avatar herhde avatar hugopeixoto avatar innaytool avatar jfowl avatar junedkhan101 avatar kosssi avatar lautaroalvarez avatar lukas-mertens avatar mrdrogdrog avatar nidico avatar renovate-bot avatar sisheogorath avatar stragu avatar tamo avatar truh avatar yamashush avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hedgedoc's Issues

Equations are not rendered correctly

I found that codimd cannot render complex latex equations, for example, the following latex

$$
\alpha
$$

can be rendered correctly, while

$$
\alpha\beta
$$

cannot be rendered, (rendered equation disappear immediately, then invisible forever)

styling slides in markdown view-mode (not slide mode)

I've noticed that there is room for improvement in the way slides are HTML-previewed in CodiMD (as opposed to how they're shown in the actual reveal.js slide mode), for example the way lists and bullets are centered or the fact that notes (which should be hidden on a slide) appear as text (see below). I find this very distracting when working on a presentation.

I would like to customize this and perhaps offer it as PR should there be interest. Before I do that, it would be good to know:

  1. is there a particular reason this hasn't been done before? Would anybody be against, for instance, hiding notes in the HTML-view of Markdown slides?
  2. is index.css the logical place to add aside.notes {display:none;} in?

Π‘ΠΊΡ€ΠΈΠ½ΡˆΠΎΡ‚ 2019-05-25 16 38 34

Is `CMD_URL_PATH` working at the moment?

I'm trying (unsuccessfully) to get CodiMD served up at https://server.com/codimd

I'm wondering a couple of things as I peruse the docs and issues. Firstly am I doing something wrong? I'm starting CodiMD with the following variables.

CMD_DOMAIN=server.com
CMD_PROTOCOL_USESSL=true
CMD_URL_PATH=codimd

Secondly is it possibly broken at the moment?
I normally assume I'm doing something wrong, but I came across this commit from this issue so I just wondered if anyone could clarify?

I have successfully deployed CodiMD using a dedicated subdomain on codimd.server.com without any issues.

Thanks!

Make explore page filters/sorting bookmarkable

I recently heard about CodiMD and immediately downloaded it and started playing with it. I was amazed at how well the markdown engine worked. Well done! As I continued to play with it, one thing stood out that would make it way easier to use for me, pinning a tag to the nav bar.

Right now at the top there are two choices, Intro and History. It would be awesome if I could pin certain tags to the top nav bar. Basically it would be a saved search for the tag specified.

In addition, being able to either remove the Intro tab, since it isn't useful after set up, or customize that view with link to common tags or info would also be very helpful.

History entry deletion is easily mistaken for Note deletion

Problem found by my colleague.

Reproduce instructions

  1. Create a new note on https://demo.codimd.org with the following content:
# Note deletion test
  1. Open a new tab and browse https://demo.codimd.org, in the "History" view, click the "Note deletion test" note's cross button on the top left corner and select "Yes, do it!" button in the note deletion prompt
  2. Go back to the original tab and refresh the page.

Expected behavior

The original note is no longer available as it is "deleted"

Current behavior

The original note is still available with its content retained.

Server crashes on upload to filesystem

I don't really know whats happening, maybe I misconfigured something, but I'm sure the server should not crash :D

2019-05-14T07:46:02.528Z error: 	uncaughtException: Invalid URL: /uploads/
TypeError [ERR_INVALID_URL]: Invalid URL: /uploads/
    at onParseError (internal/url.js:219:17)
    at parse (internal/url.js:228:3)
    at new URL (internal/url.js:311:5)
    at new URL (internal/url.js:309:14)
    at Object.exports.uploadImage (/codimd/lib/web/imageRouter/filesystem.js:19:19)
    at /codimd/lib/web/imageRouter/index.js:31:22
    at IncomingForm.<anonymous> (/codimd/node_modules/formidable/lib/incoming_form.js:107:9)
    at emitNone (events.js:106:13)
    at IncomingForm.emit (events.js:208:7)
    at IncomingForm._maybeEnd (/codimd/node_modules/formidable/lib/incoming_form.js:557:8)
    at /codimd/node_modules/formidable/lib/incoming_form.js:238:12
    at WriteStream.<anonymous> (/codimd/node_modules/formidable/lib/file.js:79:5)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at WriteStream.emit (events.js:208:7)
    at finishMaybe (_stream_writable.js:613:14)
2019-05-14T07:46:02.529Z error: 	An uncaught exception has occured.
2019-05-14T07:46:02.529Z error: 	Invalid URL: /uploads/
2019-05-14T07:46:02.530Z error: 	Process will exit now.
/usr/local/bin/docker-entrypoint.sh: 5: [: missing ]

This is my configuration:


      - CMD_DB_URL=postgres://hackmd:hackmdpass@database:5432/hackmd
      - CMD_IMAGE_UPLOAD_TYPE=filesystem
      - CMD_ALLOW_GRAVATAR=false
      - CMD_USECDN=false
      - CMD_ALLOW_ANONYMOUS=false
      - CMD_ALLOW_ANONYMOUS_EDITS=false
      - CMD_ALLOW_FREEURL=true
      - CMD_EMAIL=true
      - CMD_ALLOW_EMAIL_REGISTER=true
      - CMD_SESSION_SECRET=<RANDOM STRING>

List of all available documents

hackmdio/codimd#975

A page with a list of all documents a particular user can access. Maybe only for users who have an account, so it lets us have "secret documents" not publicly listed for anonymous visitors but still open to anyone we send the link.

When connected, before the tab "History", a new tab "All notes", and inside all the accessible notes for me.

night mode does not shade some view mode buttons

Hi all! Thanks for your amazing work :)

There's an issue with the night mode: two out of three view mode buttons do not use a darker colour when selected (the buttons right next to "CodiMD" in the toolbar). "View" does have a darker colour when pressed, as expected, but "Both" and "Edit" don't. (Actually, when looking very closely, there is a slight difference but it is barely noticeable.)

I am using demo.codimd.org.

Cheers

(copied from the old repo's issue)

Database cleanup

Hi,

I had problems uploading images but could fix it as described in Server crashes on upload to filesystem but what obviously happened was a server crash. I lost a document (only had a heading in it) and so it doesn't matter. But when I now Export user data I have some strange files in the archive like:

.md
-1.md
-2.md
-3.md
-4.md
-5.md
...and the rest of my files which look ok

The above files have 0 bytes.

I assume this happened due to the crash. My question is, how can I clean them out? - Any ideas.

Thanks in advance

Peter

Community Call! (moved to our forum)

The probably most important aspect of an open source project is the community. This is why we try to have semi-regular community calls. We use a tele-conferencing software (usually jitsi) for this. It is one more way to keep in in touch and to make your voice heard.

Usually we schedule these on the first sunday of a month at 18:00 UTC, but this is not set in stone.

If you wish to be notified, please subscribe yourself to this issue. We will add new appointments here and you'll get an email when we do.

Free-URL-Mode: alias can mask the ID of a Note.

I ran into a weird situation just now. I was not able to figure out the source of the problem, but here is the symptom:

Something or someone created an article with the Note ID but as an alias. This made accessing the actual document impossible. An example:

The real document: https://example.com/KVlJ9-dBQWKrMYWnq3Z1BA
Somehow another document with this url (alias/free url!): https://example.com/kvlj9-dbqwkrmywnq3z1ba

Whenever you would follow the first link, this code here would find an alias (because this match apparently is case-insensitive?) ...

https://github.com/codimd/server/blob/6462968e84e8d92292dd23764a9e558d7800147d/lib/models/note.js#L143-L151

... and then would redirect you to the "correct" spelling of the faulty alias.

https://github.com/codimd/server/blob/6462968e84e8d92292dd23764a9e558d7800147d/lib/response.js#L184

Internal Server Error when authenticating with OAuth via Nextcloud

Hello everyone,

when trying to log-in to my CodiMD using OAuth2 after authenticating on my Nextcloud I get an Internal Server Error on https://<mycodimd>/auth/oauth2/callback?state=&code=<code.

The log shows:

Jun 17 18:16:51 sapphire run[3116]: InternalOAuthError: Failed to obtain access token
Jun 17 18:16:51 sapphire run[3116]:     at OAuth2CustomStrategy.OAuth2Strategy._createOAuthError (/var/codimd/node_modules/passport-oauth2/lib/strategy.js:408:17)
Jun 17 18:16:51 sapphire run[3116]:     at /var/codimd/node_modules/passport-oauth2/lib/strategy.js:175:45
Jun 17 18:16:51 sapphire run[3116]:     at /var/codimd/node_modules/oauth/lib/oauth2.js:191:18
Jun 17 18:16:51 sapphire run[3116]:     at ClientRequest.<anonymous> (/var/codimd/node_modules/oauth/lib/oauth2.js:162:5)
Jun 17 18:16:51 sapphire run[3116]:     at ClientRequest.emit (events.js:193:13)
Jun 17 18:16:51 sapphire run[3116]:     at TLSSocket.socketErrorListener (_http_client.js:397:9)
Jun 17 18:16:51 sapphire run[3116]:     at TLSSocket.emit (events.js:193:13)
Jun 17 18:16:51 sapphire run[3116]:     at emitErrorNT (internal/streams/destroy.js:91:8)
Jun 17 18:16:51 sapphire run[3116]:     at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
Jun 17 18:16:51 sapphire run[3116]:     at processTicksAndRejections (internal/process/task_queues.js:81:17)

The OAuth2 part of my config.json:

"oauth2": {
            "clientID": "<client id>",
            "clientSecret": "<client secret>",
            "authorizationURL": "https://<my cloud>/apps/oauth2/authorize",
            "tokenURL": "https://<my cloud>/apps/oauth2/api/v1/token",
            "userProfileURL": "https://<my cloud>/ocs/v2.php/cloud/user?format=json",
            "userProfileUsernameAttr": "ocs.data.id",
            "userProfileDisplayNameAttr": "ocs.data.display-name",
            "userProfileEmailAttr": "ocs.data.email"
        },

This has some similarities to the problem I had when first setting up my CodiMD: hackmdio/codimd#1056.

I can't really say when it worked the last time, but it did once, but now I can't log back in anymore. Any ideas?

Export to pdf

Hello,
I've seen some installations with the option to export as PDF, but it seems to be disabled in the official demo.
What's the reason to have it disabled? Was this feature removed some time ago?

Regards
Andi

Provide prebuilt installation

Is it possible to provide a prebuilt installation. Maybe even with a gui to install?
I'm using a shared hosting service and the possibilities to built codimd on the server are very limited.

Presentation mode not working in 1.3.2?

I've recently updated to 1.3.2 and I'm running CodiMD from a Docker container (from a custom-built image; with only a couple of configuration changes in config.json). The presentation mode is not working for me an any more. The example slides that come with CodiMD, for instance, are stuck on the first slide with a (quite disturbing Parks&Rec πŸ˜ƒ) gif in the background repeating itself.

See here.

The console reports different errors in Safari and Firefox. In Safari:

[Error] Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy. (60lPn9O_V, line 0)

[Error] Refused to load data:text/css;charset=utf-8;base64,Y2xvdWRmbGFyZS1hcHBbYXBwLWlkPSJhLWJldHRlci1icm93c2VyIl0gewogIGRpc3BsYXk6IGJsb2NrOwogIGJhY2tncm91bmQ6ICM0NTQ4NGQ7CiAgY29sb3I6ICNmZmY7CiAgbGluZS1oZWlnaHQ6IDEuNDU7CiAgcG9zaXRpb246IGZpeGVkOwogIHotaW5kZXg6IDkwMDAwMDAwOwogIHRvcDogMDsKICBsZWZ0OiAwOwogIHJpZ2h0OiAwOwogIHBhZGRpbmc6IC41ZW0gMWVtOwogIHRleHQtYWxpZ246IGNlbnRlcjsKICAtd2Via2l0LXVzZXItc2VsZWN0OiBub25lOwogICAgIC1tb3otdXNlci1zZWxlY3Q6IG5vbmU7CiAgICAgIC1tcy11c2VyLXNlbGVjdDogbm9uZTsKICAgICAgICAgIHVzZXItc2VsZWN0OiBub25lOwp9Cgpj...RlcjsKICBmb250LXNpemU6IDEuNWVtOwogIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICByaWdodDogLjRlbTsKICB0b3A6IC4zNWVtOwogIGhlaWdodDogMWVtOwogIHdpZHRoOiAxZW07CiAgbGluZS1oZWlnaHQ6IDE7Cn0KCmNsb3VkZmxhcmUtYXBwW2FwcC1pZD0iYS1iZXR0ZXItYnJvd3NlciJdIGNsb3VkZmxhcmUtYXBwLWNsb3NlOmFjdGl2ZSB7CiAgLXdlYmtpdC10cmFuc2Zvcm06IHRyYW5zbGF0ZVkoMXB4KTsKICAgICAgICAgIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgxcHgpOwp9CgpjbG91ZGZsYXJlLWFwcFthcHAtaWQ9ImEtYmV0dGVyLWJyb3dzZXIiXSBjbG91ZGZsYXJlLWFwcC1jbG9zZTpob3ZlciB7CiAgb3BhY2l0eTogLjllbTsKICBjb2xvcjogI2ZmZjsKfQo= because it does not appear in the style-src directive of the Content Security Policy.

and in Firefox, only the latter.

I've played with the Content Security Policy in Nginx, and, for instance, I managed to get rid of these errors by using proxy_hide_header "content-security-policy"; and setting up a very permissive CSP in the /location but that did not resolve the issue with the slides: even with no errors being reported in the console, the slides were still not working.

I am really at a loss about how to troubleshoot this. I absolutely love CodiMD so I would really appreciate any tips or ideas about how to proceed here.

Many thanks in advance.

Exclude tags (especially images) from document name

I recently tried adding a small logo to one of my documents with the syntax and while that works flawlessly I also noticed that this would display the un-interpreted line as the "document name" in the personal history. That basically makes the title unreadable. Other common markdown tags such as italic, bold etc are already ignored as far as I can tell.

So my feature request would be to remove interpretable tags from the header alltogether.

Dropbox import/export breaks stuff

I recently set CMD_DROPBOX_APPKEY. Setting the key enabled Dropbox support but does not play well with the default install (I'm using Docker).

  • I needed to add www.dropbox.com as a valid CSP script-src to config.json.
  • when the page loads a CSP violation causes the e.g. spell checker to break:
     Refused to execute inline script because it violates the following Content Security Policy directive: "script-src www.dropbox.com 'self' vimeo.com https://gist.github.com www.slideshare.net https://query.yahooapis.com 'unsafe-eval' https://cdnjs.cloudflare.com https://cdn.mathjax.org 'nonce-429d68fb-28fe-4ce2-a9fb-a2c1c5cffcf1' 'sha256-Lc+VnBdinzYTTAkFrIoUqdoA9EQFeS1AF9ybmF+LLfM='". Either the 'unsafe-inline' keyword, a hash ('sha256-6wRdeNJzEHNIsDAMAdKbdVLWIqu8b6+Bs+xVNZqplQw='), or a nonce ('nonce-...') is required to enable inline execution.
    

Toolbar, File Upload Button feedback

Most of the things in #23 are completed, but I think this deserves its own issue:

[...] the label changes to the last chosen file's name. Not sure whether this is intended, but I guess it's due to the <input type="file">.
And you get no response if the chosen file type is not supported.

Originally posted by @HerHde in #23 (comment)

Support for abbreviations

I've started using Joplin for todo lists, note taking, etc. and it has a feature I would really like to see in CodiMD. You can do abbreviations for words that, when hovered over, display the expanded term. The syntax is just * [TermAbbr]: Expanded term and it goes on a line near the bottom. Any time TermAbbr shows up in the parsed document, it has a wavy underline and, when hovered over, displays Expanded term.

image

It's part of the markdown-it parser and they have a demo website you can look at. The abbreviations portion is at the very bottom.

config.json seems to be ignored after upgrading to 1.3.2 with new repo

Hi,

We are using our own instance of CodiMd on a Debian 9 server.

Everything was working fine until we tried to upgrade from v1.2x to v1.3.2 yesterday.
We switched to the new repo and followed the manual: "How to upgrade your installation".

There were a few dependancies issues, but we managed to fix them.
Now when we launch the app.js, we get the following error :

codimd@codimd:/opt/codimd$ node app.js
2019-04-15T22:01:50.771Z warn: 	Neither 'domain' nor 'CMD_DOMAIN' is configured. This can cause issues with various components.
Hint: Make sure 'protocolUseSSL' and 'urlAddPort' or 'CMD_PROTOCOL_USESSL' and 'CMD_URL_ADDPORT' are configured properly.
2019-04-15T22:01:50.774Z warn: 	Session secret not set. Using random generated one. Please set `sessionSecret` in your config.js file. All users will be logged out.
2019-04-15T22:01:51.505Z info: 	dmp worker process started
>> WARNING: SQLite does not support TEXT with options. Plain `TEXT` will be used instead.

But all the options mentioned in this error message are defined in our config.json file, and furthermore we are using Mysql, not Sqlite.
It seems that our config file is now entirely ignored.
The permissions on this file have not changed, the owner is still the user codimd, and it is readable.

So we are a bit at a loss atm, any help will be greatly appreciated :)

Refresh Slide (question)

Hi, first of all thank you for your great work. Besides the "normal" CodiMD features I am currently exploring the Slideshow features as well and I think I could replace my current digital signage solution with CodiMD/reveal.js.

I created a Slideshow using CodiMD, published it and pointed a full-screen browser to the published URL.

How can I force the browser to refresh the content when I changed the slideshow inside CodiMD, I mean instant updates like they happen with "normal" CodiMD content?

I don't know how exactly reveal.js is implemented in CodiMD but is there a way to use the reveal.js socket feature eg. to run slideshows simultaniously?
I know I could do that with reveal.js itself but hey, CodiMD is such a cool backend for doing it, why not?

In the future I could see CodiMD also becoming a great backend for a digital signage solution. One can use CodiMD to edit and host the digital signage content without the need for commercial reveal.js backends like slides.com

Thanks and keep this good work going!

Peter

Add support for WebDAV (Owncloud/Nextcloud among others)

Just porting this old issue: hackmdio/codimd#245

It would be really cool to have a WebDav support, and this way to support Nextcloud and Owncloud instances. This would be a lot easier and faster than managing exports to Nextcloud for each changes (or each time you want to preview some file).

Then the Nextcloud community could also create an app to integrate directly CodiMD into Nextcloud as a Markdown editor.

Wider view for view-only mode

Hello,

I have been asking @SISheogorath about this. My current issue is that even in plain view, I am getting a fairly reduced window when my browser is full screen on 1080p widescreen.

This was already raised in the former repository in issue hackmdio/codimd#1119

So far I managed to get a "satisfying" result by changing values in the build files (so, temporary) ./public/build/index.css and ./public/build/index-styles.css .
All I did was to change:
In ./public/build/index.css

.ui-infobar {               
    position: relative;     
    z-index: 2;             
    max-width: 1100px;      
    /* max-width: 758px; */ 
    margin-top: 25px;       
    margin-bottom: -25px;   
    color: #777;            
}                           

In ./public/build/index-styles.css :

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif,  "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    padding-top: 40px;
    padding-bottom: 40px;
    max-width: 1100px;
        overflow: visible !important;
}

To give a better idea, this is what I get:

  • tablet size (Ipad)

  • HD / 1280 px wide

  • Full HD resolution

  • Current, from demo instance:

Add Mastodon account to README and perhaps index page

A link to our all new mastodon account should go into this README but also onto CodiMDs index page. If you think this could/should go in other places as well, feel free to add suggestions! If you wish to discuss changes or have any other questions, please join our community forums or our matrix chat!

The link to be added: https://social.codimd.org/mastodon (which will then redirect to https://social.snopyta.org/@CodiMD )

Mastodon has a forkawesome icon: fa-mastodon or fa-mastodon-alt.

https://github.com/codimd/server/blob/4c90863f2cd8499bcb3759cb39f8a1040488d258/README.md#L4-L7

https://github.com/codimd/server/blob/4c90863f2cd8499bcb3759cb39f8a1040488d258/public/views/index/body.ejs#L156-L158

includeSubDomains from hsts config outputs warning

There's a few places where we use a different naming than our hsts library. People configuring via config.js will get a warning like this:

hsts deprecated The "includeSubdomains" parameter is deprecated. Use "includeSubDomains" (with a capital D) instead. app.js:85:18

It comes from this line here:

https://github.com/codimd/server/blob/de669c7b93a69966cee119ffda0da8b78e83a55a/app.js#L87

We have to decide what we do about it in a more general sense, though: we have this capitalisation in our own configs as well. Do we change this to also have the capital D? Does anyone even use this configuration option to change the value from its default?

https://github.com/codimd/server/search?q=includeSubdomains&unscoped_q=includeSubdomains

CodiMD Document Extensions - request for comments

(originally published here: hackmdio/codimd#1023, very loosely related to hackmdio/codimd#787, as this is very very focused on how document rendering itself can be extended)

Right now, a lot of rendering is extended in public/js/extra.js. Among other things, it handles highlighters, mermaid, video plugins and so on. For the following, I'll use mermaid as an example, because I'm familar with how it works.

I would love if we came up with a common interface for things like that. This way we could get much of the code out of extra.js, and we might end up with more extensions along the way!

Basically, Mermaid is applied in three steps.

So basically, I propose a plugin or extension system that would take those commonalities so we could easily write more such additions, and also that could perhaps be lazy-loaded. Or they could even be distributed in a different way (think: their own NPM modules)

// example Document Extension
{
  keyword: 'mermaid',
  highlightRender: (code) => {
    // returns a html element for later processing
    return htmlElement;
  },
  finishView: (view) => {
    // modifies element in place
  }
}

perhaps we could even get away from that extra step and just pass an object reference right into finishView or something.

  • Name: Is "Document Extensions" the right name?
  • User expectation: how do we deal with different CodiMD instances offering different functionalities?
  • Do we need anything more than what's proposed? Does ony one of you know other extensions that would need different things?

To make this clear: this is not coming to CodiMD any time soon unless somebody takes this up. I might start working on it after user profiles. But everyone is welcome to just take this suggestion.

Add support for citation syntax

hackmdio/codimd#419

I was trying to use codimd as a research tool and citation has quickly become a major problem.

You can see an example of how I was using in the following link.

https://demo.codimd.org/D-dCnDMvRAOs-iDBIE1ABA

The following features should be available:

  • Automatic completion of citation, using either citation id or text based search using title.
  • Automatic id generation for new entries. Now you can see that I am using a hacky way, and need to manually keep track of next available id.
  • Would also be nice to remove the html anchor as it makes reading difficult.
  • Ability to go back to previous position after jumping to the anchor. Now you can see that when I click on the internal anchor link and I use browser back button, it does not work as my previous reading position has no anchors. I am not exactly sure how it can be fixed but it disrupts the reading experience. One idea would be to have a small javascript embedded in the anchor link, which will remember the current position and jump back to it later.
  • Ability to export all citations in bibtex compatible format, to facilitate writing in final latex document
  • Even better would be to just export directly to latex

Permit multiple owners of a note (or group)

hackmdio/codimd#1174

Let us have multiple admins on a note. In the config panel of a note, a selector should let us add other owners.

Or implement a new concept of groups, and if a note is assigned to a group, anyone in the group can change the config? Not the same way at all, but maybe can solve the problem too.

Add image proxy support

In order to improve the CSP and restrict used images, I would like to add support for image proxies, servers that either optimize pictures or in general load pictures from remote sources in order to provide them in CodiMD.

This is relevant for external pictures that are hosted outside of the image upload integration of a server. As they can not be restricted right now and therefore leak privacy relevant data like IP-addresses, cookies and more. And image proxy will prevent that.

Clarification: I'm not about to implement the proxy feature itself within the CodiMD backend. The idea is to be able to run an external image proxy like imageproxy or camo and have the frontend rendering process replacing the image URLs accordingly.

This practice is also used on GitHub and other platforms.

Can't change permissions or delete note

I have a single note that I cannot change permissions for (or delete it). The permissions are displayed in the edit screen, but there is no arrow to open the dropdown. I have tested deletion with other notes successfully.

2019-06-21_23-41-48

Subdomain

Hello,
I installed codimd to run under a subdomain. It is working fine so far, but when I access my other domains and Subdomains they also show my the codimd frontpage.
What can cause this issue?

Regards
Andi

Heading is hidden when jumping to it

When jumping to a heading higher than your current location, using the table of contents, the navigation bar on the right, or a link in the document, the heading you jump to is hidden by the tool bar at the top of the page. When you scroll down, it slides up but when you scroll up, it slides down and that's what hides it.

For example, I went to the bottom of the features page where the footnotes are, clicked the return emoji for the first one, and this is where it took me to.

image

After you know what's happening, it's not an issue but it was weird until I figured out what was going on.

Add opengraph metadata

Collaborative markdown note taking is what we do. This definitely includes sharing links to other people. Be it on social media, in chats, email and more. A lot of those media implement a link preview, that provides a short abstract, a title and maybe a picture that appears on the linked page. The data used for those previews is usually obtained using the Open Graph protocol.

CodiMD doesn't provide any of those metadata for now, which causes some link preview implementations to simply take the title attribute, the first text that appears and the first picture in the HTML to create this preview.

example of a preview in Riot

In order to make the information shown in the link preview more valuable, it would be great to implement the Open Graph protocol for CodiMD.

Points to start with would be:

https://github.com/codimd/server/blob/c6384567b8cf51edac6b3056b8c5b4139b86bd20/public/views/index/head.ejs#L7-L9

and:

https://github.com/codimd/server/blob/c6384567b8cf51edac6b3056b8c5b4139b86bd20/public/views/codimd/head.ejs#L6-L7

If you want to build it nice and fancy, you may also want to create an abstract version of it in the shared views directory.

Finally, if you want to rock it completely, feel free to add some yaml metadata to modify it, but that's optional :)

https://github.com/codimd/server/blob/ee725dc58c89f1d9662f14a791a34cc93e2409ff/lib/response.js#L97-L99

If you have any questions, feel free to reach out here or in our community channel. Looking forward to your contributions! πŸš€

Image upload optimization

Hi,

I would suggest the following concerning image uploads:

  • make it possible to browse already uploaded images
  • prefer usage of relative paths if possible
  • include images in exported user data

Description:

I use the Docker version of CodiMD and have my images folder exposed and accessible within CodiMD as /uploads. When uploading an image CodiMD inserts it like ![](http://server.fqdn/uploads/upload_bd6ff6cfc1624f0dca604f8e390216d1.png) and it shows up.

Server URls can change so using ![](/uploads/upload_bd6ff6cfc1624f0dca604f8e390216d1.png) also works and would make it easier to move documents to other systems without the need of modifying the source of the Markdown files. (correctly it should be ![](uploads/upload_bd6ff6cfc1624f0dca604f8e390216d1.png)) without the / in front.

When relative addressing of images is in place, images that are on the server should be included within the exported user data.

When an image has been uploaded but the image has been removed from a Markdown document you have no clue what the original image name was eg. upload_bd6ff6cfc1624f0dca604f8e390216d1.png. If possible, a browse button for images located on the server should be implemented somehow.

Please don't see that as criticism, I absolutely love CodiMD and your great work, I only wanted to share some ideas.

Regards

Peter

`breaks: false` as a global setup option

Hi,

I have been using CodiMD with great success in book sprints, workshops and document-athons. But in all of them I have observed that starting all documents in CodiMD with breaks: false in the YAML metadata block seems contra-intuitive for most of the people who already know Markdown, as they expect no hard breaks with single new line feeds and paragraphs be started with two line feeds, as in most Markdown processors.

Following the principle of least surprise, could the breaks: false YAML directive be setup as a global preference for all pads created in a particular CodiMD instance? (making breaks: true the directive you want to enable at the beginning of documents, if you want single line feed hard breaks)

Thanks,

A vision for CodiMD

Here we are! CodiMD is running in an own organization. Hard forking is usually the last resort for an open source project, but we felt that it was neccessary for continued development and the future of CodiMD. If you wish to read up on the final debate that lead to this, please refer to the old bug tracker.

It's time to stand together and find our way through the jungle. In some regards, we are back to zero, and that's sad. But on the bright side, the issue tracker has a lot room for your problems! πŸŽ‰

Let's work together!

The new GitHub organization provides us with all the flexibility we need to work on our own terms. We already sent out invitations to various community project participants and will welcome people to join us.

You might wonder about the next steps. We currently rebuild the infrastructure parts that were in the hands of HackMD, like the container repository, and work on integrating services with our new home, which was previously more difficult.

With this done, we look towards a very interesting future:

One of the first actions we'll take is providing a fully documented and working API for CodiMD, which should allow you to import, export, create, delete and even modify your notes. You are welcome to participate in the debate about the API design.

APIs are great, but your eyes deserve some love, too: So we also started working on some UI/UX improvements. User Profiles will be continued and completed over here.

Finally, we also want to work on improving the connections and collaboration within the community. Our community forum should be up in a few days is up.

I'm looking forward to your ideas, inspiration and comments. Let everyone know, that CodiMD is not dead, it's reborn!

List of notes owned by a particular user (including "My notes")

hackmdio/codimd#653

A page for each user, with the list of all owned notes.

Also, for ourselves, we must have the link for "My notes" in the tabs menu with "History" and "All notes" (#53).

If one day there is a group functionnality, in "My notes", we must see also notes owned by our groups. The purpose is to see "all notes where I'm admin, where I can change the config".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.