Skip to content

Commit

Permalink
fix: adjust readme and screencast
Browse files Browse the repository at this point in the history
  • Loading branch information
vipzhicheng committed Nov 3, 2021
1 parent 48be4e1 commit 86e630f
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 20 deletions.
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,35 @@

A Logseq plugin help you copy any page blocks ref to today's journal page, very useful for task management case.

![screencast](./screencast.gif)

## How to use it.

### Manually

1. Clone
1. Git clone this repo
2. Run `npm install`
3. Run `npm run build`
4. In logseq, click `Plugins` which is in right top dropdown menu
5. Click `Load unpacked plugin` button and select the this plugin directory, *not dist directory by the way*
5. Click `Load unpacked plugin` button and select the dist directory of this plugin directory
6. If plugin not work, you can try to disable and enable the plugin by clicking the switch button on Plugins page.

### Marketplace

Better choice.

## Inspiration and Thanks

The inspiration of this plugin comes from our community.

> Possible new feature - while on any page, right click a block and send the block ref to today's journal. This can be useful for todo created in pages -- danzu on 2021/10/26
At the same time, I have similar thinking about this, but I want to copy ref to any page, Then I found Logseq command API can not receive parameters for now, So I realize that It's better to implment "copying to today's journal" first.

My code borrowed greatly from two other open source projects as followed, thank you guys.

* [logseq-extract-plugin](https://github.com/sidharth-panwar/logseq-extract-plugin)
* [logseq-plugin-block-to-page](https://github.com/hyrijk/logseq-plugin-block-to-page)

## Licence
MIT
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "logseq-plugin-copy-ref-to-journal",
"version": "0.0.1",
"license": "MIT",
"main": "dist/index.html",
"main": "index.html",
"logseq": {
"icon": "./icon.png",
"id": "_btkyl73sb"
Expand Down
Binary file added screencast.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
8 changes: 0 additions & 8 deletions src/style.scss

This file was deleted.

16 changes: 8 additions & 8 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
// const CopyWebpackPlugin = require('copy-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const EslintWebpackPlugin = require('eslint-webpack-plugin');

module.exports = {
entry: {
main: './src/main.ts',
style: './src/style.scss',
},
output: {
path: path.resolve(__dirname, 'dist'),
Expand Down Expand Up @@ -55,14 +54,15 @@ module.exports = {
}),
new HtmlWebpackPlugin({
template: './src/index.html',
chunks: ['style', 'main'],
chunks: ['main'],
chunksSortMode: 'manual',
}),
// new CopyWebpackPlugin({
// patterns: [
// { from: './src/assets', to: 'assets' },
// ],
// }),
new CopyWebpackPlugin({
patterns: [
{ from: './src/icon.png', to: 'icon.png' },
{ from: './package.json', to: 'package.json' },
],
}),
new MiniCssExtractPlugin({
filename: '[name].css'
}),
Expand Down

0 comments on commit 86e630f

Please sign in to comment.