Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pengx17 committed Aug 23, 2021
1 parent 64b8e3d commit 1ef6ddc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Binary file modified demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 11 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
# Logseq Plugin Link Preview

A simple plugin to show basic link information on hovering external links in Logseq.
A simple plugin to show basic link information (based on [OpenGraph Protocol](https://ogp.me/)) for external links in Logseq.

By default when it is enabled, when you hovering any external link in Logseq, it will show the link preview.
Also this plugin will register a `Convert to Link Card` command for you to convert the link to a link card.

## Disclaimer 🚨

- This plugin WILL send network requests to the author's server https://logseq-plugin-link-preview.vercel.app/. If you feel insecure about it, please either do not use it, or deploy it yourself, which is explained in the next session.
- The link preview does not always work. e.g., internal links inside of your private network.

## Features

- Show link preview when hovering any external link in Logseq
- Convert the link to a link card when you use the `Convert to Link Card` command
- Cache the results locally
- Light & dark theme

### Deploy your own backend

Due to some technical limitations (CORS), the link preview metadata could not work without a proxy server.
Expand All @@ -22,12 +32,6 @@ The easiest solution is to deploy your own backend to [Vercel](https://vercel.co

![](./demo.gif)

## TODO

- [ ] Add docs about how to self-hosting the backend
- [ ] Adapt for dark theme
- [ ] An toggle to let the user change the link to link card in the document.

## How does this plugin work?

It will register `mouseenter` and `mouseleave` events on all external links in the main document of Logseq. Note, in this step this plugin uses a unsafe `top` context of the main document, which might not work in the future.
Expand Down

1 comment on commit 1ef6ddc

@vercel
Copy link

@vercel vercel bot commented on 1ef6ddc Aug 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.