Share Note plugin šŸš€ - share individual notes with full support for themes, images, Dataview, callouts, and more

Neither actually. If you have a version prior to 0.2.0, please refresh and youā€™ll see a better experience. The API key is there as a way to check that the user is a person and not a bot. Itā€™s solely there as a way to prevent abuse (e.g. some bot spamming the server and filling up all the storage).

Encryption is done locally inside your Obsidian, and is already encrypted before anything is sent to the server. Each note is encrypted with its own random salt - your own notes are completely unrelated to each other, and also from any other public note.

3 Likes

@gapmiss I have updated the docs to show the API calls and a reference implementation:

https://github.com/alangrainger/obsidian-share/blob/main/docs/Running%20your%20own%20server.md

2 Likes

Version 0.3.0 released

https://github.com/alangrainger/obsidian-share

New features

  • Add a Copy shared link item to the 3-dot menu. This is especially useful on mobile.

Screenshot_20230920_134441_Obsidian

  • Can set uploads to be light/dark theme, regardless of your Obsidian display mode

  • Add the ability to share an individual note unencrypted. This allows you to have a preview of the note visible when someone pastes a link.

Hereā€™s an example of an unencrypted note showing the preview text:

Improvements

  • Fixed issue sharing very long notes (10,000 words+)
  • Fixed issue with some fonts not uploading correctly
  • Responsively add/remove mobile classes when viewing the note
3 Likes

Thanks again for your plugin. Iā€™m in the process of creating a site with my notes thanks to your plugin, whereas Iā€™ve been struggling until now with various publish plugins.
But I would have liked to be able to extend the line length of my shared notes. I noticed that it was mentioned in the code as if it were an available parameter, but itā€™s not available in the plugin parameters. Will this be implemented in future versions ?

Sorry - that should have been on the Settings page.

Itā€™s there now in v0.3.1 if you update the plugin. Please note that the width will still be limited by the width that is set in your Obsidian theme.

1 Like

Thank you very much. The parameter was added and I was able to expand my pages.

1 Like

Hey!:wave:

Writing here with a feature request.

Would be cool to have Telegramā€™s ā€œInstantViewā€ compatibility like itā€™s made in Telegra.ph

Thanks!

Can you explain what that is? Iā€™m not familiar.

Is it possible to put external links via html that open in the same tab? Iā€™ve tried using the classic target=ā€œ_selfā€ syntax, but the links keep opening in a new page:

<a href="https://file.obsidianshare.com/82/ed9e619fba04b9d8f2b582ae66f58a34.html#53l2EQj/WTjGL6vr/BcnHtR4mJ23amwFD8qpoCNsoiY"  target="_self" style="text-decoration: none; color: #333; font-weight: bold;">
		<div style="border: 1px solid gray; padding: 10px; text-align: center; border-radius:10px; background-color: #5c5c5c; height: 100px; display: flex; flex-direction: column; justify-content: center; color: white;">
			šŸ“‘ Cours Excel
		</div>
	</a>

I will remove the target=blank. Itā€™s what Obsidian does but itā€™s bad UX for a webpage. Didnā€™t realise it was there.

https://github.com/alangrainger/obsidian-share/commit/f2c77fb60eb0e6a1545632f3d2366861553a545f

Will go live in next version.

Thank you very much.

@Anwen itā€™s live in 0.3.11

Iā€™ve updated the plugin version and reforced the note sharing, but the external links still open in a new tab. When I look with the browser inspector, there always seems to be the target=ā€œ_blankā€ in the external links of the shared note :thinking:.
On the other hand, thereā€™s no such problem when you put external links in markdown, it only appears when you put external links in html.

Ok, I can see what you mean in the other post - youā€™re using your own HTML inside your note.

The Share Note plugin is faithfully replicating exactly what Obsidian is outputting (check your preview mode - youā€™ll see there is a target=_blank for those links).

To get around this, add either the external-link or internal-link class to the <a> tag, and then your link will be in a format that Obsidian recognises, and the target will be stripped on upload.

<a class="internal-link" href="https://...
1 Like

Thanks, Iā€™ve added the external-link class, and it does work. Thanks again for the great plugin.

1 Like

Yeah, sure! It would be better if I just share their article on that. There is everything you need: https://instantview.telegram.org/

Thanks for the info :+1:

If you share a note unencrypted, it will publish the meta description and Open Graph tags.

Iā€™m not sure if that will help with Telegram, but I donā€™t plan to add anything extra to support Telegram InstantView. If the Open Graph tags arenā€™t enough and you have to coding ability, please feel free to submit a Pull Request.

Just be aware that this could only ever work for unencrypted notes, as otherwise that preview data will (and should) be encrypted.

1 Like

Iā€™m sorry to bother you again, but is there a note size limit for sharing? I can still share notes, but there was a note I had shared, I added content with a lot of codeblock, and now I canā€™t share it anymore. The pop-up at the start of the sharing process appears, but then nothing happens and the link isnā€™t updated.
I donā€™t know if it concerns the plugin, but the only error messages in the console are these:
[Violation] ā€˜requestAnimationFrameā€™ handler took 89ms
[Violation] Forced reflow while executing JavaScript took 81ms
plugin:share-note:539 [Violation] ā€˜setTimeoutā€™ handler took 64ms
[Violation] Forced reflow while executing JavaScript took 56ms

@Anwen can you please update to 0.3.14 and test again.

If the error persists, please open an issue with the details here:

https://github.com/alangrainger/obsidian-share/issues

Ok, sorry. This wasnā€™t actually due to the size of the note, but to the fact that I was using a plugin to style my codeblocks, in particular to give them a title. Nevertheless, I opened an issue on github.