How to query all tags and display them

How to query all tags and display them or design a tab function to display all tabs.

you can get all tags like this:

Query example:  "All page tags"
#+BEGIN_QUERY
{:title "All page tags"
:query [:find ?tag-name
      :where
      [?tag :page/name ?tag-name]]
:view (fn [tags]
      [:div
       (for [tag (flatten tags)]
         [:a.tag.mr-1 {:href (str "/page/" tag)}
          (str "#" tag)])])}
#+END_QUERY

More tips from logseq official document: Advanced Queries

2 Likes

Thanks, but this query looks up everything with # as a tag