Javascript-MyLogseqBlog: A cross-platform Node app that publishes a LogSeq journal as a blog via Drummer


A cross-platform Node app that publishes a LogSeq journal as a blog via Drummer

How to install

  1. Download the app from the repo. It's a .zip file. When you uncompress you should see a folder named myLogseqBlog-main.

  2. Open the folder in the Terminal app. On a Mac you can do this by dragging the folder onto the Terminal app icon.

  3. Type npm install at the command prompt. A bunch of messages will scroll by.

  4. Edit config.json following the instructions below.

Setting up config.json

There are a bunch of values you have to set up in config.json to configure your blog. I've provided an example config.json file with those values specified, you just have to change them.

  1. twScreenName -- your Twitter screen name.

  2. logSeqJournalFolder -- the path to your LogSeq journals folder that we will build your blog from.

  3. opmlJournalFile -- optional, a path to the OPML file that myLogseqBlog generates. You don't need this file to publish your blog.

  4. blogTitle -- the title of your blog, this is displayed at the top of every page and in your RSS feed.

  5. blogDescription -- describes your blog, could be a slogan, whatever you like, it's displayed in smaller type under the title, and in your feed.

  6. blogWhenCreated -- the date and time when your blog started. It should probably be the date and time when you installed this software.

  7. blogTimeZoneOffset -- your blog will appear to be in this timezone. It's the offset from GMT of that timezone. If you're in New York, it would be -5. In England it would be 0. In Beijing it would be +8.

  8. blogCopyright -- a copyright notice. You can leave this empty if you don't have one.

  9. blogUrlHeaderImage -- the URL of a wide rectangular image to be displayed at the top of every page. There is a default image if you don't provide one.

  10. oauth_token, oauth_token_secret -- myLogseqBlog uses these values and the next one to identify you to the Drummer system, so it knows which account to store your outline under. It is not saved in the OPML file it generates. The next section explains how to get these values.

Drummer setup

Drummer uses Twitter for identity, so you will need a Twitter account to associate with your blog.

If your Twitter username is lisasimpson, your blog will be at this URL:

To establish this connection, go to the Drummer website and log in with your Twitter account. Twitter will warn you that Drummer can do a lot of things that it won't do unless you ask it to do them.

When Drummer opens, if this is your first time using it, a file named Notes will open automatically.

You can use this outline to get the values that are needed in config.json. If you've used Drummer before you can use any file for this purpose.

In the top headline enter: localStorage and press Cmd-/ (on Mac, Control-/ on Windows and Linux).

Double-click on the headline that appears to reveal a bunch of values. The ones you want are:

  1. twOauthToken

  2. twOauthTokenSecret

Copy these values into oauth_token and oauth_token_secret in your config.json file, as described above.

How to use

First a caveat -- I am a LogSeq newbie, so my instructions will be rudimentary and possibly incomplete. But this worked for me, and hopefully will work for you. ?

First, the journals folder you specify in config.json will be public. Be sure not to add any private information to those files -- they will become public when you publish your blog. I understand it's possible to have more than one journals folder, if so you might want to set up a new one just for your blog.

Write whatever you want into your journal and when you're ready to publish, go to the myLogseqBlog folder and run the app by typing this into your Terminal app.

node mylogseqblog.js

You should see a bunch of messages scroll by, hopefully no errors. It should take no more than a couple of seconds. When it's done, try opening your blog in a browser.

Add something new to the journal, run the app again.


v0.4.1, 1/13/22 by DW

When myLogseqBlog uploads the file, it takes care of making it public, so the manual step specified in the docs is no longer needed.

The nodes we create are of type markdown, so that the blog processor knows to render the text through a Markdown processor.

Questions, comments?

Post an issue here.


  • Please test myLogSeqBlog
    Please test myLogSeqBlog

    Jan 13, 2022

    Follow the instructions in the readme, and report success or problems here. Thanks! :-)

  • blog.opml is private
    blog.opml is private

    Jan 13, 2022

    Followed the instructions in and when I ran node mylogseqblog.js I got the following response (sanitizing tokens):

    config == {
        "twScreenName": "andrewshell",
        "logSeqJournalFolder": "/Users/",
        "opmlJournalFile": "/Users/",
        "blogTitle": "Andrew's LogSeq Blog",
        "blogDescription": "Connecting LogSeq for writing with Drummer for publishing.",
        "blogWhenCreated": "Wed, 13 Jan 2022 17:36:18 GMT",
        "blogTimeZoneOffset": -6,
        "blogCopyright": "Copyright 2022, Andrew Shell.",
        "blogUrlHeaderImage": "",
        "blogUseCache": false,
        "urlTwitterServer": "",
        "oauth_token": "xxx",
        "oauth_token_secret": "xxx"
    addJournalFileToOutline: fname ==, mdtext.length == 201
    logseqpublish: opmltext.length == 1535
    drummerCms: err.message == Can't read the file because there was an error. Code == 500.
    • The local file journal.opml was generated correctly
    • The file blog.opml is present in drummer
    • Going to in a browser returns the following error:
        "message": "Can't build the blog for \"andrewshell\" because blog.opml doesn't exist in Drummer, or is private."
    • Looks like blog.opml is private
  • Markdown links and images aren't rendered
    Markdown links and images aren't rendered

    Jan 13, 2022

    I had expected that I could use Markdown links, but neither text links nor images render:

    CleanShot 2022-01-14 at 00 22 30@2x