Open flyinggrizzly opened 1 year ago
As a follow up, I'm happy to open a PR and do the work make this change if someone can point me in the right direction in terms of querying graph settings with the JS client. Their API docs are a little sparse and I'm not flush with time.
Unfortunately, I don't think this is exposed to the settings API. What I can do is add an option in plugin settings to make all pages public. On 5 Nov 2022 at 8:27 PM +0400, flyinggrizzly @.***>, wrote:
As a follow up, I'm happy to open a PR and do the work make this change if someone can point me in the right direction in terms of querying graph settings with the JS client. Their API docs are a little sparse and I'm not flush with time. β Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Yea, that would work too π
Would you like me to take a stab at it, or would you prefer to handle it?
really busy at the moment. If you can, a pr would be great! On 5 Nov 2022 at 9:45 PM +0400, flyinggrizzly @.***>, wrote:
Yea, that would work too π Would you like me to take a stab at it, or would you prefer to handle it? β Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Quick update: I'm trying to get the following behavior to work, and I'm stuck on the query:
settings.defaultPagesToPublic
is ON, then all pages except those with public::false
will be publishedsettings.defaultPagesToPublic
is OFF, then only pages with public:: true
will be published (current behavior)I'm getting stuck on a query that will return all pages except those with public:: false
set. I'm not a Clojure person, so this could just be a dumb thing (same for Datalog). What I have, and I think should work but it's not is:
#+BEGIN_QUERY
{
:title [:b "non-private pages"]
:query [
:find (pull ?page [*])
:where
[?page :block/name ?name]
[?page :block/properties ?props]
[(get ?props :public) ?publicness]
[(not= false ?publicness)]
]
}
#+END_QUERY
Any thoughts? It would be easy to take the naive approach of "if the setting is on, allow no exceptions per-page", but that feels short-sighted...
I've also tried this
#+BEGIN_QUERY
{
:title [:b "non-private pages"]
:query [
:find (pull ?page [*])
:where
[?page :block/name ?name]
[?page :block/properties ?props]
[(get ?props :public) ?publicness]
or([(= true ?publicness)] [(= nil ?publicness)])
]
}
#+END_QUERY
This could
Try it using logseq.db.q("(not (page-property public true))")
Careful donβt test it in the database. It will freeze logseq. If you run through the console it is very fast
logseq.api.q("(not (page-property public true))") On 8 Nov 2022, 11:02 PM +0400, flyinggrizzly @.***>, wrote:
Quick update: I'm trying to get the following behavior to work, and I'm stuck on the query:
β’ if settings.defaultPagesToPublic is ON, then all pages except those with public::false will be published β’ if settings.defaultPagesToPublic is OFF, then only pages with public:: true will be published (current behavior)
I'm getting stuck on a query that will return all pages except those with public:: false set. I'm not a Clojure person, so this could just be a dumb thing (same for Datalog). What I have, and I think should work but it's not is:
+BEGIN_QUERY
{ :title [:b "non-private pages"] :query [ :find (pull ?page [*]) :where [?page :block/name ?name] [?page :block/properties ?props] [(get ?props :public) ?publicness] [(= nil ?publicness)] ] }
+END_QUERY
Any thoughts? It would be easy to take the naive approach of "if the setting is on, allow no exceptions per-page", but that feels short-sighted... β Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
@flyinggrizzly trying for the same thing and hit the same wall. @sawhney17 any plans for further work on this?
I've been trying to get this set up, and every time I try to export the pages to Hugo nothing was happening.
I have the
:publishing/all-pages-public? true
setting configured in Logseq.I tried setting one single page to
public:: true
, and then export, and finally got the destination dialog.In my case, all pages in Logseq should be presumed public unless explicitly specified
public:: false
, since I'm using it as a topic-specific blogging tool, and I'd prefer not to have to remember to set all pages topublic:: true
, especially since I hierarchically nest pages in some cases, using the upper nodes of the hierarchy just as aggregation points. Eg:[[Mr Color/GX 3 Red]]
[[Mr Color/Surfacer/500]]
[[Mr Color/Surfacer/1000 Mahogany]]
In these cases,
[[Mr Color]]
and[[Mr Color/Surfacer]]
don't need full pages of their own--they're useful primarily as catalogs of their child pages. I do this a lot (also for dates), so having to go through and edit each of these upper nodes would be tedious.