[Help Needed] TiddlyWiki on Nodejs to GitHub pages

79 views
Skip to first unread message

Prestige

unread,
Oct 7, 2020, 4:20:05 PM10/7/20
to TiddlyWiki

Hello all,

I wanted to use TW5 with a markdown note taking system Obsidian. For that I followed saqimtaz's post on Reddit.

Everything worked fine except for a peculiar problem. I have my markdown files inside a  folder "A" in "tiddlers" folder and I have provided a "tiddlywiki.files" to read from folder "A" for all markdown files. But whenever I have a folder (say "B"), I get an error.

My " tiddlywiki.files" contains this code for now.

{
    "directories": [
        {
            "path": "A",
            "isTiddlerFile": true,
            "fields": {
                "title": {"source": "basename"},
                "created": {"source": "created"},
                "modified": {"source": "modified"},
        "tags": [".tiddler"],
                "type": "text/x-markdown"
       
            }
        }
    ]
}

How can I change it to include all folders inside the directory "A"?
Do I have to manually add a directory code everytime I add a new folder inside "A"?

Regards,
Prestige

Saq Imtiaz

unread,
Oct 7, 2020, 4:35:48 PM10/7/20
to TiddlyWiki
At first glance two things I would try.

Use a relative path for the folder like ./A

Add a files regexp for dir A

"filesRegExp": "^.*\\.md$",

Saq Imtiaz

unread,
Oct 7, 2020, 4:38:24 PM10/7/20
to TiddlyWiki
In the absence of a files regexp node is trying to read the directory you add as if it were a file.

Prestige

unread,
Oct 7, 2020, 4:48:05 PM10/7/20
to TiddlyWiki
Okay. Thanks.
It fixes the error.

A few more question if I may:
  • What can I do to include the md files inside the folder B as tiddlers?
  • Also, I am using TiddlyResearch on top of TW5 (I think you are aware of it), and it has a need to specify tags (.tiddler, .folder etc). What can I do to retain the folder structure as is in my folder on TR itself? Currently, I am providing the tag .tiddler.

Prestige

unread,
Oct 7, 2020, 4:53:28 PM10/7/20
to TiddlyWiki
What exactly does the Files regexp does? and where can I learn about these things?

Saq Imtiaz

unread,
Oct 7, 2020, 4:54:25 PM10/7/20
to TiddlyWiki
Files inside directories inside A should be recursively loaded as long as they match the regexp.

No idea about TiddlyResearch. Suggest you address that question to the author. There is a thread for TR in this group.

Prestige

unread,
Oct 7, 2020, 5:13:11 PM10/7/20
to TiddlyWiki
>>  Files inside directories inside A should be recursively loaded as long as they match the regexp.

It's not loading. I had to add that directory explicitly to make the md inside to load.
Reply all
Reply to author
Forward
0 new messages