I Do Not Want Empty Diaries to Occur

Hello. Some days I don’t open Logseq because I don’t need to take notes. However, when I want to take notes on another day, I open Logseq and logs are created for the days when I do not log in or take notes. Even if I open Logseq, I don’t want the log to be created and the blank page to be displayed when I don’t write anything in the log.

How can I do this?

4 Likes

I have the same problem. I end up with a lot of empty days. The file should only be created when you start writing to it.

1 Like

A re-index removes them under my setup. But I agree that it is a little annoying that they even appear.

7 Likes

A workaround: Go to the folder housing your diaries in the file system, and delete all documents with a size of 0 bytes (or less than a few bytes, taking empty lines into consideration).

1 Like

or first created, and then deleted when left empty and referring to past dates

I have a test graph that I only open on some days and in the journal I have no empty days.

I had a ghost page just now. It was a page for yesterday, but I had removed the file yesterday, as I was trying to see what was up for this topic.

So it seems it was lingering in the cache.
I went to All pages and selecting the three dots and then the options Remove orphaned pages? to get rid of it.
Initially it didn’t work, but on my second attempt I allowed some time for Logseq to update its cache (opened some random other pages) and then it was actually gone.

So I don’t know if you open Logseq on the days that you have empty pages or not, but that could be the cause.

It’s great to know that a re-index removes them automatically! I can get rid of the quick and dirty script I wrote to remove them.

I was about to post about this too, it is the only annoyance I find in Logseq.

3 Likes

So, I think it is indeed a matter of opening, but not using Logseq.
Here’s currently the files in my journal folder for my test graph:
image

And here’s what Logseq looks like for my test graph:

So the 13th shows up, but the 14th doesn’t.
I had Logseq open on the 13th, but didn’t do anything in this graph. On the 14th I didn’t open Logseq and so also no page is shown.

I think that is where the issue may come from.
Anyone can confirm this is their experience?

This has consistently been my experience during all the months (and Logseq’s versions) of my usage. Apparently Logseq tries decreasing the number of clicks for some workflows, inadvertently increasing them for others.

All pages → Top right 3-dot menu → Remove orphan pages

Done.

1 Like

Won’t this also delete any unlinked pages that aren’t Journals?

Only when the page is empty and not referenced anywhere.

Although it is not a solution, I will post the code to hide it with CSS just in case.

body[data-page=home] div#journals div.journal-item:not(:has(div.blocks-container div.ls-block+div.ls-block)) {
	display:none;
}

If there is a journal that has only the first line in Journals other than single pages, it will be hidden. Due to side effects, it must be opened from a single page.