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 npm(installed by default)
- Knowledge of command line
- Understanding VSCode
Use
- Navigate to the relevant directory at the command line
- Add dependencies
npm i -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
npm run gen
- Then you can see that the relevant directory already contains the notes and attached resources
Please add two files .joplin-blog.json and .joplin-cache.json to the .gitignore ignore file, the former contains sensitive information token
, the latter is automatically generated.
examples
The supported frameworks have examples in the examples directory, which you can clone locally to see.
Configuration
public
Configuration | Type | Required | Description |
---|
type | hexo/vuepress/docsify | yes | type of integrated blog |
rootPath | string | no | hexo/vuepress directory, default is . |
token | string | yes | token for joplin web clipper |
baseUrl | string | no | base path of joplin web clipper, default is http://localhost:41184 |
tag | string | yes | 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
Why did the note id of the exported blog, wiki change?
Some possible reasons are
nodejs 18 is not fully compatible
Currently, some ArchLinux users report that they cannot use joplin-blog, but after troubleshooting, they found that replacing nodejs 16 lts works, please use nodejs 16 lts first.
Related issue: https://github.com/rxliuli/joplin-utils/issues/45