# Logseq Second Brain Template A battle-tested [Logseq](https://logseq.com) knowledge base template built around the **PARA method** (Projects, Areas, Resources, Archive). Designed for daily journaling, task management, and long-term knowledge organisation — all in plain text, synced via git. --- ## What's inside ``` logseq-second-brain-template/ ├── journals/ # Daily journal entries (auto-created by Logseq) │ ├── 2024_01_15.md # Demo: system overview & first tasks │ ├── 2024_01_16.md # Demo: task management workflow │ └── 2024_01_17.md # Demo: reflection, resources, and project tips ├── pages/ │ ├── Overview.md # Dashboard — queries all your projects & areas │ ├── Projects.md # PARA root: lists all projects (active & archived) │ ├── Areas.md # PARA root: lists all areas of responsibility │ ├── Resources.md # PARA root: lists all reference topics │ └── Templates.md # Reusable query templates for new pages ├── assets/ # Images, PDFs, and other attachments ├── logseq/ │ ├── config.edn # Main Logseq configuration │ └── custom.css # CSS overrides (empty — ready for your theme) ├── .gitignore # Ignores macOS/Logseq cache files └── README.md # This file ``` --- ## Quick start **1. Clone the repo** ```bash git clone https://github.com/YOUR_USERNAME/logseq-second-brain-template.git ``` **2. Open the folder in Logseq** - Download [Logseq Desktop](https://logseq.com/#downloads) if you haven't already - Click **Add a graph** → select this folder - Logseq will index the files and you'll land on today's journal page **3. Explore the demo entries** - Open the journal entries in `journals/2024_01_15.md` through `2024_01_17.md` - They walk through the full workflow with annotated examples **4. Customise for yourself** - Edit `pages/Overview.md` — replace the example projects and areas with your own - Create your first project page: search for `Projects/MyProjectName` and press Enter - Delete the three demo journal entries once you're comfortable --- ## The PARA method PARA was coined by Tiago Forte in [*Building a Second Brain*](https://www.buildingasecondbrain.com). It organises everything by **actionability** rather than topic: | Category | What goes here | Has a deadline? | |---|---|---| | **Projects** | Specific outcomes you're working toward | Yes | | **Areas** | Ongoing responsibilities to maintain | No | | **Resources** | Reference material on topics you care about | No | | **Archive** | Completed projects, inactive areas | — | The power of this template is that you never need to "file" things manually. You write in your daily journal, tag entries with `category:: #Projects/MyProject`, and the queries on each page surface everything automatically. --- ## Daily workflow ### 1. Open today's journal Logseq opens on today's journal by default. Start writing here. Think of it as your inbox. ### 2. Tag your entries **Important rule:** every `TODO`/`DOING` task needs its own `category::` property directly on the task block. Logseq's queries match on the task block itself — properties are **not** inherited from parent blocks. Write tasks as their own top-level blocks (or give them an explicit property), not just as children of a note block. ```markdown - [[Morning Reflection]] category:: #Areas/Health - Went for a run, feeling energised - TODO [#B] Book physio appointment category:: #Areas/Health - [[Project Planning Session]] category:: #Projects/MyWebsite - Outlined the three main milestones - TODO [#A] Write homepage copy (due Friday) category:: #Projects/MyWebsite - DOING [#B] Set up hosting category:: #Projects/MyWebsite - DONE [#C] Buy domain name category:: #Projects/MyWebsite ``` ### 3. Check your dashboard Open **Overview** from the sidebar. It shows all active TODO and DOING tasks grouped by project and area, updated in real time. ### 4. Review the bottom of your journal Two default queries appear at the bottom of every journal page: - **🔨 NOW** — any tasks currently DOING from the past 14 days (so nothing gets lost) - **📅 NEXT** — any TODO tasks due in the next 7 days --- ## Task states and priorities **Workflow:** `TODO` → `DOING` → `DONE` or `CANCELLED` Activate the next state by clicking the task marker, or type the keyword directly. **Priorities:** - `[#A]` — High priority (appear first in Overview) - `[#B]` — Medium priority - `[#C]` — Low priority / nice to have ```markdown - TODO [#A] Submit tax return by April 30 category:: #Areas/Finance - DOING [#B] Read chapter 3 of the book category:: #Areas/Learning - DONE [#C] Clean out inbox category:: #Areas/Career ``` --- ## Creating a new project 1. In any page or journal, type `[[Projects/MyProjectName]]` and press Enter to navigate there 2. Logseq saves the file as `pages/Projects___MyProjectName.md` 3. Add these properties at the top: ```markdown - status:: active - #+BEGIN_QUERY {:title "Notes:" ...} #+END_QUERY ``` Or use the `CategorySubpage` template (type `/template` while editing a block) 4. Add a section for it in `Overview.md` — copy an existing `## [[Projects/...]]` block and update the page reference 5. Tag all related journal tasks with `category:: #Projects/MyProjectName` **When a project is done:** change `status:: active` to `status:: archived` on the project page. It disappears from the Active Projects query but remains accessible. --- ## Creating a new area Same process as projects, under the `Areas/` namespace: 1. Create `[[Areas/MyArea]]` 2. Add `status:: active` 3. Add a section to `Overview.md` 4. Tag tasks with `category:: #Areas/MyArea` Areas don't have deadlines and rarely get archived — only if you genuinely no longer care about that aspect of your life. --- ## File naming convention Logseq uses triple underscores (`___`) to represent `/` in page titles, because `/` is not valid in filenames on all operating systems. | Page title in Logseq | Filename on disk | |---|---| | `Projects/MyWebsite` | `Projects___MyWebsite.md` | | `Areas/Health` | `Areas___Health.md` | | `Resources/Books` | `Resources___Books.md` | This is handled automatically — just type `[[Projects/MyProject]]` in Logseq and the right file is created. --- ## Git sync This template is designed to be synced via git. All data is plain text, so git works perfectly as version history and sync mechanism. ### Recommended plugin: logseq-plugin-git Install [logseq-plugin-git](https://github.com/haydenull/logseq-plugin-git) from the Logseq Marketplace: 1. In Logseq: click the three dots (top right) → **Plugins** → search for "git" 2. Install **logseq-plugin-git** 3. Configure it to auto-commit every few minutes 4. Set up your GitHub remote and it will push automatically ### Manual git setup ```bash cd logseq-second-brain-template git init git remote add origin git@github.com:YOUR_USERNAME/YOUR_REPO.git git add . git commit -m "Initial second brain setup" git push -u origin main ``` ### iOS sync with a-Shell To sync from iPhone/iPad using [a-Shell](https://holzschu.github.io/a-Shell_iOS/): 1. Clone the repo: `lg2 clone git@github.com:YOUR_USERNAME/YOUR_REPO.git` 2. Open the cloned folder in Logseq iOS 3. Run this script to auto-commit after editing: ```bash #!/bin/bash # Note: a-Shell uses lg2 (libgit2) instead of standard git if [ -n "$(lg2 status --porcelain)" ]; then lg2 add . lg2 commit -m "iOS sync" lg2 push fi ``` --- ## Advanced: Datalog queries The power of this template comes from Logseq's built-in Datalog query language. Some patterns to build on: **Show all TODO tasks for a specific area:** ```clojure #+BEGIN_QUERY {:title "Health todos:" :query [:find (pull ?b [*]) :where [?b :block/marker "TODO"] [?b :block/refs ?r] [?r :block/name "areas/health"]] :breadcrumb-show? false} #+END_QUERY ``` **Show all notes tagged with a page (non-tasks only), sorted by date:** ```clojure #+BEGIN_QUERY {:title "Notes:" :query [:find (pull ?b [*]) :in $ ?pagename :where [?ref :block/name ?pagename] [?b :block/refs ?ref] (not [?b :block/marker ?m] [(contains? #{"TODO" "DOING" "DONE"} ?m)]) [?b :block/page ?p] [?p :block/journal-day ?day]] :inputs [:current-page] :result-transform (fn [result] (sort-by (fn [b] (get-in b [:block/page :block/journal-day] 0)) > result)) :query-properties [:block :page] :table-view? true} #+END_QUERY ``` **Sort by priority** (defined in `config.edn` as a named transform): ```clojure :result-transform :sort-by-priority ``` --- ## Customisation tips **Apply a theme** — edit `logseq/custom.css`: ```css /* Dracula dark theme */ @import url('https://cdn.jsdelivr.net/gh/dracula/logseq@master/custom.css'); ``` **Change start-of-week** — edit `:start-of-week` in `config.edn` (0 = Monday, 6 = Sunday) **Enable flashcards** — change `:feature/enable-flashcards? false` to `true` in `config.edn` --- ## Writing conventions - Use **tabs** for block indentation (not spaces) - Properties sit directly below their block: `category:: #Projects/Name` - Use `**bold**` for section headings within a note block — never use `##` headings inside journal entries - Use `->` for sub-actions or steps within a block - Keep entries concise and outline-driven - For AI-generated notes or research, add `source:: [[AI]]` as a property --- ## Recommended plugins | Plugin | Purpose | |---|---| | **logseq-plugin-git** | Auto-commit and push to git on every save | | **Readwise Official** | Import highlights from books and articles | | **Logseq Kanban** | Kanban board view for project pages | | **journals-calendar** | Calendar sidebar for navigating journal entries | All available in the Logseq Marketplace (three dots → Plugins → Marketplace). --- ## Licence MIT — use this however you like. --- *Built with [Logseq](https://logseq.com) · Based on the [PARA method](https://www.buildingasecondbrain.com) by Tiago Forte*