Coder Social home page Coder Social logo

alangrainger / share-note Goto Github PK

View Code? Open in Web Editor NEW
219.0 219.0 11.0 1.17 MB

Instantly share an Obsidian note with the full theme exactly like you see in your vault. Data is shared encrypted by default, and only you and the person you send it to have the key.

License: MIT License

JavaScript 2.75% TypeScript 96.60% CSS 0.66%

share-note's People

Contributors

alangrainger 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

share-note's Issues

Obsidian footnotes are not working

Hi, I recently started trying out this plugin. In doing so, I seem to have come across an issue which could be a bug.
I have a couple of footnotes in my document using the default obsidian syntax for footnotes, but whenever I click on the footnote link, it takes me to another page stating "Unable to decrypt using this key". There should be a way to link to it internally on the page itself, rather than whatever the service is misinterpreting it as.

I hope this gets resolved soon, cheers!

Can't decrypt a previously encrypted note

First of all, thank you for this truly amazing plugin!

I'm trying out the new share_unencrypted: true property option, because I want a preview of the note to appear when sharing the link. The note was previously shared / uploaded without this property, so it was encrypted.

Is it possible to have share_unencrypted: true decrypt a previously encrypted upload. If not, what might a workaround be? A related question, is it possible to remove / unshare a shared note?

Attachments don't display on mobile

I'm using obsidian on mobile and any shared note will display the filenames of attachment, but the attachment can't be viewed from the share note link.

See attachment for visualization of what's being displayed.
Screenshot_2023-11-08-09-07-57-71_40deb401b9ffe8e1df2f1cc5ba480b12

Neither inline title nor banner header present for note with banner

I cannot get either the banner header or the inline title (Show inline title) to appear in the uploaded note anymore.

See this upload: https://share.note.sx/e612da498b038c3e5e367043782e2b59

In Obsidian, it has a banner header as you can see here:
image

I've also tried to remove the header and enable Show inline title instead, but that doesn't appear either.

I've force re-uploaded the note and refreshed several times without cache.

Demo vault:
Share note demo vault.zip

Add ability to set webpage title in properties, or use first H1 heading / banner header as webpage title

In this note: https://share.note.sx/e612da498b038c3e5e367043782e2b59, I have an H1 heading, which I regard as the title of the article / document, namely "Kanban Reading List for Academics".

However, when I share the link, the link preview shows the HTML title, which is the same as the local filename in Obsidian.
image

Given a H1 title or banner header in the note / document, it would be nice if these were used as the HTML title (shown in the title bar). In the absence of these, the filename could be used as a fallback option. For more user control, and less ambiguity, this could also be set in a share_title property.

Dashboard cssclass is applied although not applied in Obsidian

I have this note I am working on:

image

When I upload it, the dashboard cssclass by Tfthacker is somehow applied (code below), and it looks like this:

image

Note, I've never had the dashboard cssclass applied to this particular note in Obsidian. Here's the note properties:

image

I only applied it after running into this issue to verify what was happening.

I also opened the uploaded .css file using developer tools, and you can see that the dashboard cssclass is in-fact applied:

image

I've also had the same issue with other notes that do not have the dashboard cssclass applied.

Dashboard css:

/* Updated 2022-02-28 */

.dashboard {
    padding-left: 25px !important;
    padding-right: 25px !important;
    padding-top: 20px !important;
}

/* Title at top of the document */
.dashboard .markdown-preview-section .title {
    top: 60px;
    position: absolute;
    font-size: 26pt !important;
    font-weight: bolder;
    letter-spacing: 8px;
}

.dashboard h1 {
    border-bottom-style: dotted !important;
    border-width: 1px !important;
    padding-bottom: 3px !important;
}

.dashboard div > ul {
    list-style: none;
    display: flex;
    column-gap: 50px;
    row-gap: 30px;
    flex-flow: row wrap;
}

.dashboard div > ul > li {
    min-width: 250px;
    width: 15%;
}
 .dashboard .markdown-preview-section {
    width: 90% !important;
    max-width: 90% !important;
 }

ul.dataview.list-view-ul {
	list-style: disc;
	display: inline-block;
}

Cannot read properties of undefined (reading 'getViewState')

HOW TO RE-CREATE

Put a picture within LIB folder, after that try to use it inside a note, when you try to set that note into read mode and force-reupload you get the error

image

ERROR

Error: ENOENT: no such file or directory, open 'home/lex/.notes/Main/CLOUD/LIB/ChristmasPinterest.jpg' 
plugin:share-note:15493

I think the error is related to the path being wrong cuz its home/lex... instead of /home/lex...

LaTeX equations don't display correctly.

Hello,

As a physics student, I'm using LaTeX on Obsidian every day to write my formulas and equations.

I was searching for a plugin which would help me to display my lectures notes to my colleagues, and I discovered your amazing plugin so first of all, thank you so much.

Now about my issue. I was uploading one of my lectures note and I noticed that LaTeX equations missed some letters and greek letters.
I think that some letters (like k, A and f) aren't working, and all greek letters are not working at all. Watch this: https://share.note.sx/h9re66zw

You may find my zipped demo vault in this WeTransfer https://we.tl/t-jK9YXXp7K8 (because its too huge (112 MB) as attachment, even if i removed almost everything in).

You will find also another lecture note inside, that is correctly working with LaTeX but there is no greek letter on.

Thank you again for trying to find a solution to my issue.

[FR]: Allow stylizing the shared note

Hello!
I use special callout that use float. In my obsidian and my width workflow, they look perfect.

But, on the website, i think some width need to be stylized using snippets, for reader to get more space etc.

I checked the css, but can't find any option / class specific to the shared note, so my snippets won't interfere on my obsidian.

So my FR is :

  • Set a custom class in body to allow this (for example shared-note )
  • Or allow to upload a specific css with the note, but not an enabled snippets.

Linked notes without frontmatter YAML fail

fail:

  • attempting to share note 1
  • note1 contains wiki-link to note2
  • note2 does NOT contain frontmatter YAML
  • RESULT: TypeError: Cannot read properties of undefined (reading 'share_link')

success:

  • attempting to share note 1
  • note1 contains wiki-link to note2
  • note2 contains frontmatter YAML
  • RESULT: Success message β†’ "File has been shared"

FR: svg image support

This plugin can be super useful. I used to use it as a template. But with the plugin , apparently it's not possible to publish a note containing an svg image. Is it because it's more complicated to implement or too heavy to host? If not, would it be possible to implement it?

Upload opposite theme mode too and allow switching

I sometimes upload my theme in light mode, but then open the note in the evening, which is very harsh on the eyes. I use Dark Reader to automatically convert websites to dark mode during the evening, but when it converts my Obsidian share notes, they become red and look very weird (see screenshot):
image

If you use Dark Reader, you can test it on this note: https://file.obsidianshare.com/1e/bb0cac33b70e8d759db51eda963c20d7.html#w5sTrJaGfaE3KxUnzNsC2ncHkya+Wza2LMLd9Dnk5l0

That's why I was thinking it would be nice if Obsidian share would actually upload both the current theme mode, and the opposite.

I guess the note should default to the mode the note was in, when it was uploaded. But then there could be a toggle to switch to light/dark mode.

I think a good option would be for this to be something that could be either set or overridden on a note-by-note basis using a property like share-theme: light, dark or both.

I don't know if this would increase storage requirements and upload time prohibitively much, though.

[BUG] Massive gap between Banner header and note text

This has been happening a few times, not sure what triggers it:

gjgUsoVEBt

Here are the conditions that apply:

  • The note has a banner
  • Show inline title is off to prevent duplication of the title, since:
  • The banner has a header (purple text)
  • I've added a --- divider to create spacing between the banner header and the start of the note text
    • Without this, then banner header overlaps the note text a bit (which is a separate issue)

I can get the note back to normal the following way:

  1. Remove the --- line and Share note
  2. Add the --- line back and Share note

[FR] Better support for Banners

I tried adding a banner to a shared note, but the banner only appears as a small image at the top, rather than going the full width as in the original note. Also, if I add a banner header, its placement is not right, and it overlaps the text in the main document.

Online:
image

Offline:
image

Also, as you can see, the offline banner has a gradient, but the online one doesn't.

Printing?

Your script is wonderful. I ran into an issue when trying to print your sample page from my iPad. I tried different ways to print (including exporting to PDF Expert).

Make the `copy` button functional in code blocks

In the guide I shared recently, I was sharing some code snippets in code blocks.
As the visual elements are all present from Obsidian, there is a copy button in the code blocks. However, it is non-functional, which is a bit misleading, so I had to add a disclaimer about it.

It would be great if these buttons were functional, similar to how you made the callouts actually collapsible / expandable.

Error uploading current note

  1. Installed the plugin.
  2. Obtained an API key.
  3. Went to one of my notes and selected "Share Note: Share current note" from the command palette.
  4. An error message was displayed saying "There was an error uploading the note. Please try again."
  5. Trying again results in the same error.

No images

Hello,

My shared notes don't display images. In the documentation it says images are supported.
I tried several different browsers.

Large notes fail to share

Sharing a note, I get "Unable to find the file to update, please delete any existing share links and try again", or a 403 response. I used to use the old version of the plugin through templater, so I thought it might be due to the old share links, but removing them did not help.

That means it's probably an authentication issue. My user ID is efc89ed13177ef9c8c77729abc03b3cc.

Fix for "Unable to find the file to update": go to this comment.
"Large notes fail" starts after that.

Bug when sharing a note

I use the code styler plugin to give titles and style my codeblocks with this syntax:

```python title:name
code
```

Notes containing this syntax cannot be shared. The pop-up at the start of the sharing process appears, but then nothing happens and the link isn’t updated.

[FR] Gif and webm support

I just ran into this message:

image

I would be great to be able to embed gifs and / or webm into notes, especially for demonstration purposes in guides and such.

The plugin asks me to update it to version 0.4.0 or higher

I'm sorry to open an issue again, but I have a new problem that came up.
This morning, I was able to share my note without any problem. I didn't touch anything in particular, and now, when I try to share a note, it asks me to update it to version 0.4.0 or higher.
I've tried forcing the update with BRAT, there isn't one, I'm currently on 0.3.20. There is no more recent release currently on GitHub. What could this be due to?
I'd be embarrassed to have to reinstall share note because we've lost our user ID and I'd have to change all the note urls.
image

Deleting old notes after re-sharing

When re-sharing (either using the drop-down menu on the top right, or the icon in the properties pane), I often get a new URL / ID assigned. But the old link stays active.

This way, the old note remains online without any changes, but there is also no way to delete or revoke this (old) shared note. So there is no way to take it down anymore.

I assume, when re-sharing the link / ID should actually stay the same, so updates will be available after re-sharing for people I already shared the link with.

[FR] Support heading links

It seems that heading links are not supported? I tried to create a table of contents like so:

- [[#Reasoning and workflow|Reasoning and workflow]]
	- [[#Reasoning and workflow#Here's the gist of this workflow:|Here's the gist of this workflow:]]
- [[#What Zotero Kanban Maker does|What Zotero Kanban Maker does]]
- [[#Setup|Setup]]
	- [[#Setup#Plugins required|Plugins required]]
	- [[#Setup#First steps|First steps]]
	- [[#Setup#QuickAdd setup|QuickAdd setup]]
	- [[#Setup#Recommended Kanban board settings|Recommended Kanban board settings]]
	- [[#Setup#One-click literature note imports and updates|One-click literature note imports and updates]]
	- [[#Setup#Zotero setup|Zotero setup]]
- [[#Usage summary|Usage summary]]
- [[#Get the gist?|Get the gist?]]
- [[#Future plans|Future plans]]

But the links were simply stripped, leaving only the link text:
image

Only part of the note is uploaded

Sorry, no feature request this time, only bug reports.

When I upload this note using Force re-upload of all all data for this note, less than half of it is uploaded, as you can see here.

I've followed the troubleshooting steps, and I've forced a reload without cache in both Firefox (ctrl + F5) and Vivaldi (developer tools), to no avail.

[BUG] Callout icons missing

I'm back, making sure there is an issue open...
On a serious note, it seems like some callout icons are not being display as expected, that is, they are not displayed at all.

The tip callout type is working:
Obsidian:
image
Online:
image

But info and question are not:
Obsidian:
image
Online:
image

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.