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


Requirements
- Install nodejs and yarn
- Knowledge of command line
- Understanding VSCode
Use
- Navigate to the relevant directory at the command line
- Add dependencies
yarn add -D joplin-blog
.
- add a configuration file
.joplin-blog.json
(see configuration for details)
- add an npm script file
"gen": "joplin-blog blog"
(if you want to generate a wiki then "gen": "joplin-blog wiki"
)
- Run the command
yarn gen
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

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.

5 Likes
@thwaller @ser May be interested
2 Likes
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
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
3 Likes
Release 0.8.1
The main change is to update the joplin-api dependency to support the use of the joplin clipper api running remotely, and also to reduce the bundle size by replacing the dependency
- refactor: replace luxon => dayjs
- refactor: update joplin-api sdk
- feat: update to use latest joplin-api sdk, update port => baseUrl
2 Likes