https://github.com/logseq/logseq-plugin-samples
Logseq plugin samples for beginner π±
https://github.com/logseq/logseq-plugin-samples
Last synced: 4 days ago
JSON representation
Logseq plugin samples for beginner π±
- Host: GitHub
- URL: https://github.com/logseq/logseq-plugin-samples
- Owner: logseq
- License: mit
- Created: 2021-04-19T12:58:46.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-19T07:29:14.000Z (10 months ago)
- Last Synced: 2024-05-23T01:26:42.949Z (9 months ago)
- Language: CSS
- Size: 19.1 MB
- Stars: 281
- Watchers: 12
- Forks: 80
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Logseq Plugin Samples
This repository contains sample code illustrating the Logseq Plugin API. You can read, play with or adapt from these
samples to create your own plugins.Plugin APIs: https://plugins-doc.logseq.com
### Prerequisites
You need to have [node](https://nodejs.org/) and [npm(or yarn)](https://yarnpkg.com/getting-started/install) installed
on your system to run the examples. Then install the latest Logseq Desktop App
from [here](https://github.com/logseq/logseq/releases).#### Using `nvm` to install `node` and `npm`
For those who are not familiar with the installation of Node.js and NPM, a simple solution would be to install **Node
Version Manager (NVM)**[(link)](https://github.com/nvm-sh/nvm). The installation is straightforward: just download and
run the [installation bash script](https://github.com/nvm-sh/nvm/blob/v0.38.0/install.sh). You may need to give access
permissions to the script.After installing `nvm`, using the command `nvm install 22`(for current) or `nvm install 20`(for LTS), you'll be able to
install the current version of node and npm on your machine. Because `nvm` installs locally, there is no need
for the `sudo` command.For those familiar, `nvm` acts similarly to `anaconda`: the same way you can select your version of python with
anaconda, you can choose your version of node.js.### Usage
- `git clone https://github.com/logseq/logseq-plugin-samples`
- open Logseq Desktop client and turn on `Developer mode` in user settings panel
- open the toolbar dot menus and navigate to plugins page
- read the README file of the sample you want to load, then determine if it should be
rebuilt (`npm install && npm run build`)
- navigate to the plugins dashboard: tp
- click `Load unpacked plugin` button, then select the sample directory to load it> β οΈ To avoid loading plugin failures occasionally and for performance reasons,
> it is recommended to keep the plugin SDK [`@logseq/libs`](https://www.npmjs.com/package/@logseq/libs) as up-to-date as possible.### Getting Started
- π± [Slash command Sample](./logseq-slash-commands)
- π¨ [Custom Theme Sample](./logseq-bujo-themes)
- π [Journals Calendar Sample](./logseq-journals-calendar)
- π [Pomodoro Timer Sample](./logseq-pomodoro-timer)
- πΊπ³ [A Translator Sample](./logseq-a-translator)
- π [Custom Editor Fonts Sample](./logseq-awesome-fonts)
- π [Emoji Picker Sample](./logseq-emoji-picker)
- π° [Reddit Hot News Sample](./logseq-reddit-hot-news)### License
[MIT](./LICENSE)