logseq/templates/config.edn

300 lines
11 KiB
Plaintext
Raw Normal View History

{:meta/version 1
;; Currently, we support either "Markdown" or "Org".
2021-05-14 12:01:33 +00:00
;; This can overwrite your global preference so that
;; maybe your personal preferred format is Org but you'd
;; need to use Markdown for some projects.
;; :preferred-format ""
;; Preferred workflow style.
;; Value is either ":now" for NOW/LATER style,
;; or ":todo" for TODO/DOING style.
:preferred-workflow :now
;; The app will ignore those directories or files.
2022-07-28 06:01:57 +00:00
;; E.g. :hidden ["/archived" "/test.md" "../assets/archived"]
2021-05-14 12:29:21 +00:00
:hidden []
2021-05-14 12:01:33 +00:00
;; When creating the new journal page, the app will use your template if there is one.
;; You only need to input your template name here.
2021-05-14 12:01:33 +00:00
:default-templates
{:journals ""}
;; Whether to enable hover on tooltip preview feature
;; Default is true, you can also toggle this via setting page
:ui/enable-tooltip? true
;; Enable Block timestamp
2021-07-13 07:24:20 +00:00
:feature/enable-block-timestamps? false
;; Enable remove accents when searching.
;; After toggle this option, please remember to rebuild your search index by press (cmd+c cmd+s).
:feature/enable-search-remove-accents? true
;; Disable Built-in Scheduled and deadline Query
;; :feature/disable-scheduled-and-deadline-query? true
2022-04-17 14:26:36 +00:00
;; Specify the date on which the week starts.
;; Goes from 0 to 6 (Monday to Sunday), default to 6
:start-of-week 6
2021-06-10 13:53:59 +00:00
;; Specify a custom CSS import
;; This option take precedence over your local `logseq/custom.css` file
2021-06-10 13:56:36 +00:00
;; You may find a list of awesome logseq themes here:
2021-06-10 13:53:59 +00:00
;; https://github.com/logseq/awesome-logseq#css-themes
;; Example:
;; :custom-css-url "@import url('https://cdn.jsdelivr.net/gh/dracula/logseq@master/custom.css');"
;; Set Bullet indentation when exporting
;; default option: tab
;; Possible options are for `:sidebar` are
;; 1. `:eight-spaces` as eight spaces
;; 2. `:four-spaces` as four spaces
;; 3. `:two-spaces` as two spaces
;; :export/bullet-indentation :tab
2021-06-10 13:53:59 +00:00
;; When :all-pages-public? true, export repo would export all pages within that repo.
;; Regardless of whether you've set any page to public or not.
;; Example:
;; :publishing/all-pages-public? true
2021-06-10 13:53:59 +00:00
;; Specify default home page and sidebar status for Logseq
;; If not specified, Logseq default opens journals page on startup
;; value for `:page` is name of page
;; Possible options for `:sidebar` are
;; 1. `"Contents"` to open up `Contents` in sidebar by default
2021-06-10 13:53:59 +00:00
;; 2. `page name` to open up some page in sidebar
;; 3. Or multiple pages in an array ["Contents" "Page A" "Page B"]
;; If `:sidebar` is not set, sidebar will be hidden
;; Example:
;; 1. Setup page "Changelog" as home page and "Contents" in sidebar
2021-06-10 13:53:59 +00:00
;; :default-home {:page "Changelog", :sidebar "Contents"}
;; 2. Setup page "Jun 3rd, 2021" as home page without sidebar
;; :default-home {:page "Jun 3rd, 2021"}
;; 3. Setup page "home" as home page with multiple pages in sidebar
;; :default-home {:page "home" :sidebar ["page a" "page b"]}
;; Tell logseq to use a specific folder in the repo as a default location for notes
;; if not specified, notes are stored in `pages` directory
;; :pages-directory "your-directory"
;; Tell logseq to use a specific folder in the repo as a default location for journals
;; if not specified, journals are stored in `journals` directory
;; :journals-directory "your-directory"
;; Set this to true will convert
;; `[[Grant Ideas]]` to `[[file:./grant_ideas.org][Grant Ideas]]` for org-mode
;; For more, see https://github.com/logseq/logseq/issues/672
;; :org-mode/insert-file-link? true
;; Setup custom shortcuts under `:shortcuts` key
;; Syntax:
;; 1. `+` means keys pressing simultaneously. eg: `ctrl+shift+a`
;; 2. ` ` empty space between keys represents key chords. eg: `t s` means press `s` follow by `t`
;; 3. `mod` means `Ctrl` for Windows/Linux and `Command` for Mac
;; 4. use `false` to disable particular shortcut
;; 4. you can define multiple bindings for one action, eg `["ctrl+j" "down"]`
;; full list of configurable shortcuts are available below:
;; https://github.com/logseq/logseq/blob/master/src/main/frontend/modules/shortcut/config.cljs
;; Example:
;; :shortcuts
;; {:editor/new-block "enter"
;; :editor/new-line "shift+enter"
;; :editor/insert-link "mod+shift+k"
;; :editor/hightlight false
;; :ui/toggle-settings "t s"
;; :editor/up ["ctrl+k" "up"]
;; :editor/down ["ctrl+j" "down"]
;; :editor/left ["ctrl+h" "left"]
;; :editor/right ["ctrl+l" "right"]}
:shortcuts {}
2021-09-23 12:36:00 +00:00
;; By default, pressing `Enter` in the document mode will create a new line.
;; Set this to `true` so that it's the same behaviour as the usual outliner mode.
:shortcut/doc-mode-enter-for-new-block? false
2022-08-31 15:09:35 +00:00
;; Block content larger than `block/content-max-length` will not be searchable
;; or editable for performance.
2022-09-30 03:55:18 +00:00
:block/content-max-length 10000
2021-06-07 16:28:01 +00:00
;; Whether to show command doc on hover
:ui/show-command-doc? true
2021-06-10 13:53:59 +00:00
;; Whether to show empty bullets for non-document mode (the default mode)
:ui/show-empty-bullets? false
;; Pre-defined :view function to use with advanced queries
:query/views
{:pprint
(fn [r] [:pre.code (pprint r)])}
;; Pre-defined :result-transform function for use with advanced queries
:query/result-transforms
{:sort-by-priority
(fn [result] (sort-by (fn [h] (get h :block/priority "Z")) result))}
2021-05-14 12:01:33 +00:00
;; The app will show those queries in today's journal page,
;; the "NOW" query asks the tasks which need to be finished "now",
;; the "NEXT" query asks the future tasks.
:default-queries
{:journals
[{:title "🔨 NOW"
2022-08-25 13:24:22 +00:00
:query [:find (pull ?h [*])
:in $ ?start ?today
:where
2022-08-25 13:24:22 +00:00
[?h :block/marker ?marker]
[(contains? #{"NOW" "DOING"} ?marker)]
2022-08-25 13:24:22 +00:00
[?h :block/page ?p]
[?p :block/journal? true]
[?p :block/journal-day ?d]
[(>= ?d ?start)]
[(<= ?d ?today)]]
:inputs [:14d :today]
2021-05-14 12:01:33 +00:00
:result-transform (fn [result]
(sort-by (fn [h]
(get h :block/priority "Z")) result))
:collapsed? false}
{:title "📅 NEXT"
2022-08-25 13:24:22 +00:00
:query [:find (pull ?h [*])
:in $ ?start ?next
:where
2022-08-25 13:24:22 +00:00
[?h :block/marker ?marker]
[(contains? #{"NOW" "LATER" "TODO"} ?marker)]
2022-08-25 13:24:22 +00:00
[?h :block/page ?p]
[?p :block/journal? true]
[?p :block/journal-day ?d]
[(> ?d ?start)]
[(< ?d ?next)]]
:inputs [:today :7d-after]
2021-05-14 12:01:33 +00:00
:collapsed? false}]}
2022-07-28 06:01:57 +00:00
;; Add your own commands to slash menu to speedup.
;; E.g.
;; :commands
;; [
;; ["js" "Javascript"]
;; ["md" "Markdown"]
;; ]
2021-05-14 12:01:33 +00:00
:commands
[]
;; By default, a block can only be collapsed if it has some children.
;; `:outliner/block-title-collapse-enabled? true` enables a block with a title
;; (multiple lines) can be collapsed too. For example:
;; - block title
;; block content
:outliner/block-title-collapse-enabled? false
2021-05-14 12:01:33 +00:00
;; Macros replace texts and will make you more productive.
;; For example:
;; Change the :macros value below to:
2021-05-14 12:01:33 +00:00
;; {"poem" "Rose is $1, violet's $2. Life's ordered: Org assists you."}
;; input "{{poem red,blue}}"
2021-05-14 12:01:33 +00:00
;; becomes
;; Rose is red, violet's blue. Life's ordered: Org assists you.
:macros {}
;; The default level to be opened for the linked references.
;; For example, if we have some example blocks like this:
;; - a [[page]] (level 1)
;; - b (level 2)
;; - c (level 3)
;; - d (level 4)
;;
;; With the default value of level 2, `b` will be collapsed.
;; If we set the level's value to 3, `b` will be opened and `c` will be collapsed.
:ref/default-open-blocks-level 2
2021-09-16 05:59:08 +00:00
:ref/linked-references-collapsed-threshold 50
:favorites []
;; any number between 0 and 1 (the greater it is the faster the changes of the next-interval of card reviews) (default 0.5)
;; :srs/learning-fraction 0.5
;; the initial interval after the first successful review of a card (default 4)
;; :srs/initial-interval 4
2021-08-05 23:49:17 +00:00
;; hide specific properties for blocks
2022-07-28 06:01:57 +00:00
;; E.g. :block-hidden-properties #{:created-at :updated-at}
2021-08-05 23:49:17 +00:00
;; :block-hidden-properties #{}
;; Enable all your properties to have corresponding pages
:property-pages/enabled? true
;; Properties to exclude from having property pages
2022-07-28 06:01:57 +00:00
;; E.g.:property-pages/excludelist #{:duration :author}
;; :property-pages/excludelist
;; By default, property value separated by commas will not be treated as
;; page references. You can add properties to enable it.
;; E.g. :property/separated-by-commas #{:alias :tags}
2022-09-09 07:36:55 +00:00
;; :property/separated-by-commas #{}
;; logbook setup
;; :logbook/settings
;; {:with-second-support? false ;limit logbook to minutes, seconds will be eliminated
;; :enabled-in-all-blocks true ;display logbook in all blocks after timetracking
;; :enabled-in-timestamped-blocks false ;don't display logbook at all
;; }
;; Mobile photo uploading setup
;; :mobile/photo
;; {:allow-editing? true}
;; Mobile features options
;; Gestures
;; :mobile
;; {:gestures/disabled-in-block-with-tags ["kanban"]}
;; Extra CodeMirror options
;; :editor/extra-codemirror-options {:keyMap "emacs" :lineWrapping true}
;; ignore #+keyword: for parsing page references in orgmode
;; :ignored-page-references-keywords #{"author" "startup"}
;; Quick capture templates on mobile for recieving contents from other apps.
;; Each template contains three elements {time}, {text} and {url}, which can be auto-expanded
;; by received contents from other apps. Note: the {} cannot be omitted.
;; - {time}: capture time
;; - {text}: text that users selected before sharing.
;; - {url}: url or assets path for media files stored in Logseq.
;; You can also reorder them, or even only use one or two of them in the template.
;; You can also insert or format any text in the template as shown in the following examples.
;; :quick-capture-templates
;; {:text "[[quick capture]] **{time}**: {text} from {url}"
;; :media "[[quick capture]] **{time}**: {url}"}
2022-08-25 17:37:00 +00:00
;; File sync options
;; Ignore these files when syncing, regexp is supported.
2022-09-03 11:31:17 +00:00
;; :file-sync/ignore-files []
2022-08-25 17:37:00 +00:00
;; dwim (do what I mean) for Enter key when editing.
;; Context-awareness of Enter key makes editing more easily
; :dwim/settings {
; :admonition&src? true
; :markup? false
; :block-ref? true
; :page-ref? true
; :properties? true
; :list? true
; }
Feat: new file name escaping rules (#6134) * feat: new file name escaping for namespace feat: new file name decoding back to page name * test: file name sanitization feat: use _0x to encode % feat: don't create title property test: extra URL encoding for escaped file names fix: fit pdf prefix into new file name rules fix: encoding rules on some characters fix: handle the buggy file names imported by users fix: pdf block ref failed to jump fix: #6167 * fix: enhance backward compatibility chore: title validation test: fix namespace queries test chore: use index version stored in config.edn instead of search.versions * feat: convert old version graph mechanism ui: file conversion UI feat: rename files for conversion feat: don't trigger conversion when title property is manually edited fix: file conflict notification while renaming files on some OS feat: re-index on update version feat: clicking NO in the re-index dialog would update the index-ver flag to suppress the dialog feat: use html entities for reserved char escaping dev: remove unresolved vars & minor refactor chore: move file name sanity from gp-util to fs-util, as it's for encoding only but not parsing test: update file name tests to html entities rule test: convert files from dir ver 3 for repo_tests feat: convert Windows reserved file names fix: save index version into idb instead of file fix: decode uri of path while parsing files on mobile fix: couple dir version and index version to ensure only re-index on converted dirs feat: go back to url-encode for special chars * chore: fix lint chore: improve codebase to address Gabriel's comments fix: remove file remnants on add conflict fix: remove file remnants on rename conflict chore: add test ns to nbb runner Also fix typoed fn and remove unused code * fix: issues of rebase PR6134 to master after file-sync merged * feat: switchable filename format * fix: use go block to replace promesa for rename all with blocking * feat: re-index after apply rename all * ui: file conversion enhancement * fix: merging filename format PR with master * fix: filename format lint & CI * ui: filename format flow * fix: error handling on the rare internal file path confliction case * chore: shorten component code for files-breaking-changed * chore: fix CI * Minor fixes per latest code review - Remove unused page-name-order - Update catch usage to be consistent with what's on master - Place state fn in right place - Wording fixes: - select and apply -> manual. There are no checkboxes for the user - Update -> Edit. We use edit for all other settings button - Alternatives to starting sentences with May. Not a common way to start a sentence - update outdated template comment * ux: rename instruction update * ux: rename instruction update (2) * Tweak wording of conversion modal Simplifed first paragraph and explained the page to the user in first sentence, may isn't a common way to start sentences and updated outdated wording * Fix large-var warning by splitting out a piece of component * fix: right slash on Windows; legacy format file sanitization * fix: triple lowbar renaming fns Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2022-10-08 07:47:45 +00:00
;; Decide the way to escape the special characters in the page title.
;; Warning:
;; This is a dangerous operation. If you want to change the setting,
;; should access the setting `Filename format` and follow the instructions.
;; Or you have to rename all the affected files manually then re-index on all
;; clients after the files are synced. Wrong handling may cause page titles
;; containing special characters to be messy.
;; Available values:
;; :file/name-format :triple-lowbar
;; ;use triple underscore `___` for slash `/` in page title
;; ;use Percent-encoding for other invalid characters
;; :file/name-format :legacy
;; ;use Percent-encoding for slash and other invalid characters
;; ;parse `.` in file name as slash `/` in page title
:file/name-format :triple-lowbar
}