Homepage    |    GitHub    |    API    |    FAQ

Joplin note sharing tool

joplin-blog

Introduction

CLI tool to publish Joplin notes as a static website, currently supports both blog/wiki forms, framework supports hexo/vuepress/docsify.

blog demo
wiki demo

Requirements

  • Install nodejs and yarn
  • Knowledge of command line
  • Understanding VSCode

Use

  1. Navigate to the relevant directory at the command line
  2. Add dependencies yarn add -D joplin-blog.
  3. add a configuration file .joplin-blog.json (see configuration for details)
  4. add an npm script file "gen": "joplin-blog blog" (if you want to generate a wiki then "gen": "joplin-blog wiki")
  5. Run the command yarn gen 6.
  6. Then you can see that the relevant directory already contains the notes and attached resources

examples

The supported frameworks have examples in the examples directory, which you can clone locally to see.

Configuration

public

configuration type description
type hexo/vuepress/docsify type of integrated blog
rootPath string hexo/vuepress directory, which should normally be .
joplinProfilePath string joplin personal folder
token string joplin web clipper's token
port number the port of the joplin web clipper, usually 41184
tag string joplin's blog tag

hexo

configuration type description
stickyTopIdList string[] Topped note id (only valid under fluid topic)

I've shared over 190 notes with this tool, blog address (Chinese)

FAQ

What does token/port refer to and where can I find it?

You can usually see it in Tools > Options > Web Clipper

joplin web clipper

Where is the joplin personal folder?

Generally speaking, if you are using a portable program, it should be in the program directory in the . /JoplinProfile
directory, and you should see the resources, templates, tmp directory in there.

joplinProfilePath

4 Likes

@thwaller @ser May be interested

2 Likes

CHANGELOG

v0.1.6

v0.1.5

  • Fix README update being overwritten error

v0.1.4

v0.1.3

v0.1.2

  • Fixed passing tag from config instead of hard-coded to blog

v0.1.1

  • Fix the problem that the \r in the title is not cleared when exporting hexo blog

v0.1.1

  • Basic export function realization, currently supports hexovuepress
1 Like

Currently cli has been completely refactored, and v0.2.0 has been released, with major changes

  • Completely refactor the code
  • Realize the internationalization of output information
  • Implement a more friendly cli

recent goals

  • [ ] Achieve a blog project associated with joplin from scratch
  • [ ] Allow users to complete export, packaging, and deployment operations without touching the underlying dependency
    framework
  • [ ] Implement a wiki generator
  • [ ] Support docsify
  • [ ] Support vuepress
  • [ ] Integrated into the joplin plugin to provide a certain degree of visual interface
2 Likes

Release 0.3.0, support generating a wiki website with sidebar structure from Joplin, the general effect is as follows

Example project: joplin-blog/package.json at joplin-blog@0.3.0 · rxliuli/joplin-blog · GitHub

There are still some internationalization and details that have not been completed. I will fill up later, but I will not continue to develop the GUI version of joplin-blog (the previously developed parts, including generation, command packaging, and deployment have all been deleted), This is really troublesome, especially when I develop this tool but don't use it.

3 Likes

Changes since 0.3.0 => 0.4.0

  • feat(joplin-blog): Use worker_threads to parse and convert markdown to avoid blocking the main thread
  • fix(joplin-blog): Fix the error that asyncLimit will print numbers when running commands
  • refactor(joplin-blog): Expose more functions in src/index to facilitate third-party calls
  • fix (joplin-blog): fix missing international files
  • fix (joplin-blog): unified modification example generation command imp => gen
  • fix (joplin-blog): Fix the redundant space in the docsify sidebar configuration generated by Joplin
  • fix (blog-hexo-example): fix the bug that hexo cannot be deployed to the site subdirectory
1 Like

Publish 0.5.1

This is an important upgrade. The use of the cache function has increased the generation speed, and when there is no modification, it has been reduced from 20+s to 2+s. Optimization is based on two premises

  • The number of modified notes should be much smaller than the unmodified ones
  • Attachment resources will not be modified basically

npm link: joplin-blog - npm

Specific change information

  • feat(joplin-blog): add internationalization configuration of cache command
  • feat(joplin-blog): implement resource caching, add cached commands
  • refactor(joplin-blog): refactor the key of the internationalization string to use a more meaningful naming scheme
  • feat(joplin-blog): implements caching functionality
  • refactor(joplin-blog): refactor the functions previously written to notes and resources into fixed directories for easy calculation of cache locations
  • fix(joplin-blog): fix warning that comlink/dist/umd/node-adapter is not used as an external dependency when packaging
  • fix(joplin-blog): fix bug with i18next-util reference
  • docs(joplin-blog): update the deployment location of joplin-blog, and update the documentation
  • docs(joplin-blog): add json schema for configuration files
  • refactor(joplin-blog): utility @liuli-util/i18next-util in the joplin-blog project
  • chore(root): update the version of joplin-blog in the example module
  • chore(joplin-blog): update rollup-plugin-worker-threads
1 Like

Publish 0.6.0

  • feat(joplin-blog): Add a subcommand clean under the blog/wiki command to delete cached configuration files, notes and attachment resource directories
1 Like

Release 0.7.0

The main update is to support generating files for jeykll blog. The example project is at https://github.com/rxliuli/joplin-utils/tree/master/examples/blog-jeykll-example, the online example you can view: <https: //joplin-utils.rxliuli.com/blog/jeykll/>

changelog

  • fix: Fix an issue where the integration object created when the generated blog type is jekyll is incorrect
  • fix: add missing development dependency builtin-modules
  • feat: integrate jekyll into cli commands
  • feat: support jekyll framework
  • chore: update liuli-cli to improve packaging performance (48s => 23s)
  • chore: add yarn plugin interactive-tools, upgrade liuli-cli
  • chore(root): merge conflicts
  • fix(joplin-blog): use diff only once to get deleted, modified and added notes and resources
  • chore(root): replace lerna with yarn 2

The original demand comes from: https://discourse.joplinapp.org/t/plugin-generate-static-blog-website-and-publish-to-github-pages/20630/11?u=rxliuli

1 Like