├── .gitignore ├── 000 - Global Index (Start Here!).md ├── 01 - Primary Categories ├── 01 - Administration.md ├── 01 - Development.md ├── 01 - Pentest.md └── 01 - Red Team.md ├── 02 - Secondary Categories └── 02 - Obsidian.md ├── 03 - Content ├── .md ├── Admonition.md ├── Linking Content.md ├── Obsidian - Custom CSS.md ├── Obsidian - Getting Started.md ├── Obsidian - Plugins.md ├── Obsidian Git.md ├── Templater.md └── files │ ├── Pasted image 20210907110604.png │ ├── Pasted image 20210907111121.png │ ├── Pasted image 20210907112215.png │ ├── Pasted image 20210907112642.png │ ├── Pasted image 20210907120723.png │ ├── Pasted image 20210907120756.png │ ├── Pasted image 20210907120838.png │ ├── Pasted image 20210907121102.png │ ├── Pasted image 20210907122512.png │ ├── Pasted image 20210907124937.png │ ├── Pasted image 20210907125248.png │ ├── Pasted image 20210907125653.png │ ├── Pasted image 20210907125817.png │ ├── highlight_currentline 1.gif │ ├── highlight_currentline.gif │ └── responsive_yt.gif ├── 04 - Templates ├── 04 - Structural Elements │ ├── 0401 - Struct_Gen_Header.md │ ├── 0402 - Struct_Gen_Resources.md │ ├── 0403 - Struct_TTP_Body.md │ ├── 0404 - Struct_Tool_Body.md │ ├── 0405 - Struct_Idea_Body.md │ ├── 0406 - Struct_Documentation_Body.md │ ├── 0407 - Struct_Personal_Body.md │ ├── 0408 - Struct_Secondary_Category_Header.md │ └── 0409 - Struct_Secondary_Category_Body.md └── 0400 - Gen_Note.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # to exclude Obsidian workspace settings (including plugin and hotkey configurations) 2 | .obsidian/* 3 | 4 | # OR only to exclude workspace cache 5 | .obsidian/workspace/* 6 | 7 | # Exclude plugins 8 | .obsidian/plugins/* 9 | 10 | # Exclude consultant specific files "personal" 11 | 05*-*Personal/ 12 | 13 | # Exclude Day Planner directory placed in vault root 14 | Day*Planners/* 15 | 16 | # This file is used to keep track of last auto backup/pull 17 | .obsidian-git-data 18 | 19 | # Exclude Untitled Notes 20 | Untitled* 21 | # Exclude "bad" names 22 | null* 23 | 24 | # Add below lines to exclude OS settings and caches 25 | .trash/ 26 | .DS_Store 27 | 28 | -------------------------------------------------------------------------------- /000 - Global Index (Start Here!).md: -------------------------------------------------------------------------------- 1 | tags: #🗺 2 | 3 | # [[000 - Global Index (Start Here!)]] 4 | 5 | *** 6 | 7 | CTRL + CLICK A TOPIC BELOW 8 | 9 | # Primary Categories 10 | 11 | [[01 - Administration]] 12 | [[01 - Development]] 13 | [[01 - Pentest]] 14 | [[01 - Red Team]] 15 | -------------------------------------------------------------------------------- /01 - Primary Categories/01 - Administration.md: -------------------------------------------------------------------------------- 1 | Links: [[000 - Global Index (Start Here!)]] 2 | Search Tag: #🗺 3 | 4 | # [[01 - Administration]] 5 | *** 6 | 7 | [[02 - Obsidian]] 8 | 9 | 10 | -------------------------------------------------------------------------------- /01 - Primary Categories/01 - Development.md: -------------------------------------------------------------------------------- 1 | Links: [[000 - Global Index (Start Here!)]] 2 | Search Tag: #🗺 3 | 4 | # [[01 - Development]] 5 | *** 6 | 7 | 8 | -------------------------------------------------------------------------------- /01 - Primary Categories/01 - Pentest.md: -------------------------------------------------------------------------------- 1 | Links: [[000 - Global Index (Start Here!)]] 2 | Search Tag: #🗺 3 | 4 | # [[01 - Pentest]] 5 | *** 6 | -------------------------------------------------------------------------------- /01 - Primary Categories/01 - Red Team.md: -------------------------------------------------------------------------------- 1 | Links: [[000 - Global Index (Start Here!)]] 2 | Search Tag: #🗺 3 | 4 | # [[01 - Red Team]] 5 | *** 6 | 7 | 8 | -------------------------------------------------------------------------------- /02 - Secondary Categories/02 - Obsidian.md: -------------------------------------------------------------------------------- 1 | Primary Categories: [[01 - Administration]] 2 | Search Tag: #🗺 3 | 4 | # [[02 - Obsidian]] 5 | 6 | ## Getting Started 7 | [[Obsidian - Getting Started]] 8 | 9 | ## Customization 10 | [[Obsidian - Plugins]] 11 | [[Obsidian - Custom CSS]] 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /03 - Content/.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | Links: 4 | Tags: 5 | Search Tag: #📕 6 | 7 | # [[]] 8 | 9 | ## Description: 10 | 11 | ___ 12 | 13 | ## Resources: 14 | 15 | | Title | URL | 16 | | ----- | ------ | 17 | | place | holder | 18 | 19 | Created: 2021-08-20 09:00 20 | Last Modified: Friday 20th August 2021 09:00:50 -------------------------------------------------------------------------------- /03 - Content/Admonition.md: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | creation date: September 7th 2021 4 | last modified date: September 7th 2021 5 | aliases: [] 6 | tags: #📖 7 | --- 8 | 9 | Primary Categories: [[01 - Administration]] 10 | Secondary Categories: [[02 - Obsidian]] - [[02 - Resources]] 11 | Links: [[Plugin]] - [[Style]] 12 | Search Tag: #📖 13 | 14 | # [[Admonition]]: 15 | 16 | ## Description: 17 | 18 | Adds admonition block-styled content to Obsidian.md, styled after [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) 19 | 20 | ![](https://raw.githubusercontent.com/valentine195/obsidian-admonition/master/images/all.gif) 21 | 22 | ## Installation: 23 | 24 | 1. Admonition is a registered Obsidian [[02 - Plugins#Community Plugins]] and can be installed directly from `Settings > Community Plugins > Browse` 25 | 26 | ## Configuration 27 | 1. Nothing required beyond installation for default admonition block element display 28 | 2. Would recommend enabling the 29 | 1. 'copy' button permitting the copying of content directly from the blocks 30 | 31 | ___ 32 | 33 | ## Resources: 34 | 35 | | Hyperlink | Info | 36 | | ----------------------------------------------------------------------------- | ---- | 37 | | [Admonition Github Repo](https://github.com/valentine195/obsidian-admonition) | | 38 | 39 | 40 | Created Date: September 7th 2021 (11:24 am) 41 | Last Modified Date: <%+tp.file.last_modified_date("MMMM Do YYYY (hh:ss a)")%> -------------------------------------------------------------------------------- /03 - Content/Linking Content.md: -------------------------------------------------------------------------------- 1 | --- 2 | creation date: September 7th 2021 3 | last modified date: September 7th 2021 4 | aliases: [] 5 | tags: #📖 6 | --- 7 | 8 | Primary Categories: [[01 - Administration]] 9 | Secondary Categories: [[02 - Obsidian]] - [[02 - Resources]] 10 | Links: [[Linking]] - [[Zettlekasten]] - [[Data Discovery]] 11 | Search Tag: #📖 12 | 13 | # [[Linking Content]] 14 | 15 | # Description 16 | 17 | 1. Within Obsidian, links are the means by which data is structured and relationships are drawn. 18 | 19 | 2. Obsidian allows the linking of content to a note at **3** levels ^0266aa 20 | 21 | | Result | Command | Example | 22 | | ------------------------------------------ | ------------------------------ | --------------------------- | 23 | | Link to an entire note | `[[name of the note]]` | [[Linking Content]] | 24 | | Link to a notes heading | `[[name of the note#heading]]` | [[Linking Content#Details]] | 25 | | Link to a block within a specified heading | `[[name of the note^blockname` | [[Linking Content#^0266aa]] | 26 | 27 | 3. At each stage of linking, the relevant content can instead be embedded by adding the *!* prefix ^0834a4 28 | 1. Example linking to the above: [[Linking Content#^0834a4]] 29 | 2. As you can see above, a reference *ID* is added to the target block of text 30 | 3. As you're linking, Obsidian will parse and present all possible headings/blocks for selection 31 | 32 | ![[Pasted image 20210907120723.png]] 33 | 34 | ## How To Link? 35 | 36 | 1. Within the TrustedSec Obsidian vault, *links* are used as a replacement for what would more traditionally be considered *tags*. 37 | 38 | 2. Example: 39 | 1. Over time a vault grows and several links are created to a recurring category that is not yet created. Links with no associated note can be readily identified: 40 | 1. from a note's preview pane as they'll be displayed with a faded text 41 | 42 | ![[Pasted image 20210907120756.png]] 43 | 3. from the graph's view, where unlinked notes/nodes will appear in a different color 44 | 45 | 46 | 47 | ```ad-important 48 | If you're using included CSS snippets nonexistant nodes become a bit more visable as they're colored dark red. 49 | ``` 50 | 51 | ### Before: 52 | ![[Pasted image 20210907120838.png]] 53 | 54 | ### After: 55 | ![[Pasted image 20210907121102.png]] 56 | 57 | 4. "Unlinked Mentions" as these unlinked notes are refered to, can then be created simply by clicking the identified unlinked *link* or *node* 58 | 59 | 5. If you're using templates when creating new notes, the hierarchical folder structure above your new note is automatically applied to the note a series of links. Unlike [[Tagging Content|Tags]], several *links* should be added to new notes with the idea that more meaningful links creates more relationships/opportunity for relationships between notes. This process should ultimately lead to a natural distillation of categorical knowledge and thus a new category and MOC. 60 | 61 | 62 | 63 | ## Resources: 64 | 65 | | Hyperlink | Info | 66 | | --------- | ---- | 67 | 68 | 69 | Created Date: September 7th 2021 (11:24 am) 70 | Last Modified Date: <%+tp.file.last_modified_date("MMMM Do YYYY (hh:ss a)")%> 71 | -------------------------------------------------------------------------------- /03 - Content/Obsidian - Custom CSS.md: -------------------------------------------------------------------------------- 1 | --- 2 | creation date: September 7th 2021 3 | last modified date: September 7th 2021 4 | aliases: [] 5 | tags: #📖 6 | --- 7 | 8 | Primary Categories: [[01 - Administration]] 9 | Secondary Categories: [[02 - Obsidian]] - [[02 - Resources]] 10 | Links: [[CSS]] - [[Styling]] - [[Customization]] 11 | Search Tag: #📖 12 | 13 | # [[Obsidian - Custom CSS]] 14 | 15 | ## Enabling Custom CSS Snippets: 16 | 17 | To enable custom styling within Obsidian, you'll need to: 18 | 1. Create the associated 'snippets' folder within the obsidian vault filestructure. This folder can be created by going to `Settings > Appearences` and clicking on the folder icon (far right) shown below. This folder will be created within the `$VAULTPATH/.obsidian/` directory. 19 | 20 | ![[Pasted image 20210907125248.png]] 21 | 22 | 2. Within the newly created `snippets` folder, create a single `.css` or several `.css` files with the descired snippets below. 23 | 24 | ![[Pasted image 20210907125653.png]] 25 | 26 | 27 | 4. After the files are present within the file structure, again path to `Settings > Appearences` and click the `refresh` icon next to the folder icon we chose previously. All individual `.css` files should now be listed as toggle-able style options. 28 | 29 | ![[Pasted image 20210907125817.png]] 30 | 31 | 32 | 33 | ## Snippet Library: 34 | 35 | ### 1. Colorized Graph Nodes 36 | 37 | #### Description 38 | Recolor `unresolved` or non-existent notes to show up in graph view as dark red (#CF4747). 39 | 40 | While Obsidian exposes the ability to colorize the graph view using groups, there doesnt seem to yet be a way to colorize unresolved notes. For this we'll use a CSS snippet. 41 | 42 | #### CSS Snippet 43 | ```ad-example 44 | title: Colorize Graph Nodes 45 | collapse: Yes 46 | icon: triforce 47 | 48 | .graph-view.color-fill-unresolved { 49 | color: #CF4747; !important 50 | } 51 | ``` 52 | 53 | #### Example 54 | ![[Linking Content#Before]] 55 | ![[Linking Content#After]] 56 | 57 | 58 | 59 | ### 2. Colorized Tag Pills 60 | 61 | #### Description 62 | Add colored 'pill' styling around search tags. 63 | 64 | #### CSS Snippet 65 | ```ad-example 66 | title: Colorize Graph Nodes 67 | collapse: Yes 68 | icon: triforce 69 | 70 | /* 71 | Pill-style colorized tags in preview AND editor panes 72 | */ 73 | 74 | a.tag, 75 | div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-hashtag-begin, 76 | div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-hashtag-end { 77 | background-color: var(--text-accent); 78 | border: none; 79 | color: white; 80 | font-size: 12px; 81 | padding: 1px 8px; 82 | text-align: center; 83 | text-decoration: none; 84 | display: inline-block; 85 | margin: 0px 0px; 86 | cursor: pointer; 87 | border-radius: 12px; 88 | } 89 | 90 | a.tag:hover { 91 | background-color: var(--text-accent-hover); 92 | color: white 93 | } 94 | 95 | div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-hashtag-begin { 96 | display: none; 97 | } 98 | 99 | div:not(.CodeMirror-activeline) > .CodeMirror-line span.cm-hashtag-end:before { 100 | content: '#'; 101 | } 102 | 103 | .tag[href^="#obsidian"] { 104 | background-color: #4d3ca6; 105 | } 106 | 107 | .tag[href^="#important"] { 108 | background-color: red; 109 | } 110 | 111 | .tag[href^="#complete"] { 112 | background-color: green; 113 | } 114 | 115 | .tag[href^="#inprogress"] { 116 | background-color: orange; 117 | } 118 | ``` 119 | 120 | #### Example 121 | ![[Pasted image 20210907122512.png]] 122 | 123 | 124 | ### 3. Current Line Focus 125 | 126 | #### Description 127 | Using the VIM community plugin, colors the current line in focus when in insert mode for improved readability 128 | 129 | #### CSS Snippet 130 | ```ad-example 131 | ~~~CSS 132 | /* Modified by Christian (Chhrriissyy#6548). Original by MooddooM */ 133 | /* This version sets the line focus for both edit and insert mode. */ 134 | /* If you want to make it edit mode only, add the `.cm-fat-cursor` CSS class selector to both light & dark mode. /* 135 | 136 | /* Cursor color in normal vim mode and opacity */ 137 | .cm-fat-cursor .CodeMirror-cursor, .cm-animate-fat-cursor { 138 | width: 0.5em; 139 | background: #d65d0e; 140 | opacity: 60% !important; 141 | } 142 | 143 | /* LIGHT MODE */ 144 | /*if you want the highlight to present in both normal and insert mode of vim*/ 145 | .theme-light /* .cm-fat-cursor */ .CodeMirror-activeline .CodeMirror-linebackground{ 146 | background-color: #2f2f2f; 147 | opacity: 10% 148 | } 149 | 150 | /* DARK MODE */ 151 | .theme-dark /* .cm-fat-cursor */ .CodeMirror-activeline .CodeMirror-linebackground { 152 | background-color: #f1f1f1; 153 | opacity: 30%; 154 | ``` 155 | 156 | #### Example 157 | ![[highlight_currentline.gif]] 158 | 159 | 160 | ### 4. Enlarge Image on Hover 161 | 162 | #### Description 163 | In preview mode, enlarges images/gifs when you hover over them. 164 | 165 | #### CSS Snippet 166 | ```ad-example 167 | ~~~CSS 168 | .markdown-preview-view img { 169 | display: block; 170 | margin-top: 20pt; 171 | margin-bottom: 20pt; 172 | margin-left: auto; 173 | margin-right: auto; 174 | width: 50%; /* experiment with values */ 175 | transition:transform 0.25s ease; 176 | } 177 | 178 | .markdown-preview-view img:hover { 179 | -webkit-transform:scale(1.8); /* experiment with values */ 180 | transform:scale(2); 181 | 182 | } 183 | 184 | ``` 185 | 186 | #### Example 187 | ![[highlight_currentline 1.gif]] 188 | 189 | 190 | ### 5. Embed Without a Scroll Bar 191 | #### Description 192 | Embedded windows or references to Obsidian locations will render expanded and not within a static div size + scrollbar. 193 | 194 | #### CSS Snippet 195 | ```ad-example 196 | ~~~CSS 197 | /* Remove scroll bar from transclusions */ 198 | .markdown-preview-view .markdown-embed-content { 199 | max-height: unset; 200 | } 201 | .markdown-preview-view .markdown-embed-content > .markdown-preview-view { 202 | max-height: unset; 203 | } 204 | 205 | ``` 206 | 207 | 208 | #### Example 209 | 210 | ![[Pasted image 20210907124937.png]] 211 | 212 | ### 6. External Resource Embed Styles 213 | 214 | #### Description 215 | Attempt to make externally embedded content more responsive 216 | 217 | #### CSS Snippet 218 | ```ad-example 219 | ~~~CSS 220 | /* responsive img/iframe defintion */ 221 | [style*="--aspect-ratio"] > :first-child { 222 | width: 100%; 223 | } 224 | 225 | [style*="--aspect-ratio"] > img { 226 | height: auto; 227 | } 228 | 229 | @supports (--custom:property) { 230 | [style*="--aspect-ratio"] { 231 | position: relative; 232 | } 233 | [style*="--aspect-ratio"]::before { 234 | content: ""; 235 | display: block; 236 | padding-bottom: calc(100% / (var(--aspect-ratio))); 237 | } 238 | [style*="--aspect-ratio"] > :first-child { 239 | position: absolute; 240 | top: 0; 241 | left: 0; 242 | height: 100%; 243 | } 244 | } 245 | 246 | ``` 247 | 248 | #### Example 249 | ![[responsive_yt.gif]] 250 | 251 | 252 | ___ 253 | 254 | ## Resources: 255 | 256 | | Hyperlink | Info | 257 | | ------------------------------------------------------------------------ | -------------------------------------------- | 258 | | [Obsidian Forums Showcase](https://forum.obsidian.md/c/share-showcase/9) | The source for several of the above snippets | 259 | 260 | 261 | Created Date: September 7th 2021 (12:02 pm) 262 | Last Modified Date: <%+tp.file.last_modified_date("MMMM Do YYYY (hh:ss a)")%> 263 | -------------------------------------------------------------------------------- /03 - Content/Obsidian - Getting Started.md: -------------------------------------------------------------------------------- 1 | --- 2 | creation date: September 7th 2021 3 | last modified date: September 7th 2021 4 | aliases: [] 5 | tags: #📖 6 | --- 7 | 8 | Primary Categories: [[01 - Administration]] 9 | Secondary Categories: [[02 - Obsidian]] - [[02 - Resources]] 10 | Links: [[Getting Started]] 11 | Search Tag: #📖 12 | 13 | # [[Obsidian - Getting Started]] 14 | 15 | ![[Pasted image 20210907111121.png]] 16 | 17 | ## Welcome to TrustedSec's Obsidian Vault! 18 | 19 | If you're just getting started, be sure to check out [the complete blog](https://www.trustedsec.com/blog/obsidian-taming-a-collective-consciousness/pertaining) pertaining to Obsidian on TrustedSec's website. In addition, dig into a few of the resources cited below which go into substantially more detail surrounding many of the **how-tos** of Obsidian and the benefits of maintaining a digitial [[Zettlekasten]]! 20 | 21 | ___ 22 | 23 | ## Resources: 24 | 25 | | Hyperlink | Info | 26 | | --------- | ---- | 27 | 28 | 29 | Created Date: September 7th 2021 (11:00 am) 30 | Last Modified Date: <%+tp.file.last_modified_date("MMMM Do YYYY (hh:ss a)")%> 31 | -------------------------------------------------------------------------------- /03 - Content/Obsidian - Plugins.md: -------------------------------------------------------------------------------- 1 | --- 2 | creation date: September 7th 2021 3 | last modified date: September 7th 2021 4 | aliases: [plugin, obsidian - plugin, plugins] 5 | tags: #📖 6 | --- 7 | 8 | Primary Categories: [[01 - Administration]] 9 | Secondary Categories: [[02 - Obsidian]] - [[02 - Resources]] 10 | Links: [[Plugins]] - [[Required]] - [[Configuration]] 11 | Search Tag: #📖 12 | 13 | # [[Obsidian - Plugins]] 14 | 15 | ## Required 16 | [[Obsidian Git]] 17 | [[Templater]] 18 | 19 | ## Additional 20 | [[Dataview]] 21 | [[Admonition]] 22 | 23 | ___ 24 | 25 | ## Resources: 26 | 27 | | Hyperlink | Info | 28 | | --------- | ---- | 29 | 30 | 31 | Created Date: September 7th 2021 (11:24 am) 32 | Last Modified Date: <%+tp.file.last_modified_date("MMMM Do YYYY (hh:ss a)")%> 33 | -------------------------------------------------------------------------------- /03 - Content/Obsidian Git.md: -------------------------------------------------------------------------------- 1 | --- 2 | creation date: September 7th 2021 3 | last modified date: September 7th 2021 4 | aliases: [] 5 | tags: #📖 6 | --- 7 | 8 | Primary Categories: [[01 - Administration]] 9 | Secondary Categories: [[02 - Obsidian]] - [[02 - Resources]] 10 | Links: [[Synchronization]] - [[Git]] - [[Plugins]] - [[Required]] 11 | Search Tag: #📖 12 | 13 | # [[Obsidian Git]] 14 | 15 | ## Description: 16 | 17 | Simple plugin that allows you to backup your [Obsidian.md](https://obsidian.md) vault to a remote git repository (e.g. private repo on GitHub). This plugin assumes you have existing git repository initialized locally and credentials are setup. This is the mechanism by which all your notes are sync'd to the Offpipe repository and shared between consultants. 18 | 19 | ## Installation: 20 | 21 | 1. Obsidian Git is a registered [[02 - Obsidian|Obsidian]] Community Plugin and can be installed directly from `Settings > Community Plugins > Browse` 22 | 23 | ## Configuration 24 | 25 | ```ad-info 26 | ### Not Seeing this stylized in *PREVIEW* mode? 27 | #### Try installing the community plugin, 'Admonition' 28 | 29 | # Obsidian Git Settings: 30 | 1. *Vault Backup Interval*: 60 31 | 2. *Auto Pull Interval*: 10 32 | 3. *Commit message*: FLast {{date}} 33 | 4. *Date placeholder*: MM-DD-YYYY HH:mm:ss 34 | 5. *Pull changes before push*: Enabled (default) 35 | ``` 36 | 37 | ## Commands 38 | 39 | All associated commands specific to Obsidian git can be reviewed from the Command Pallete (**CTRL + P** to open) 40 | 41 | ![[Pasted image 20210907112215.png]] 42 | 43 | These commands can be added to hotkey combinations which greatly simply the addons use. 44 | 45 | ![[Pasted image 20210907112642.png]] 46 | 47 | ___ 48 | 49 | ## Resources: 50 | 51 | | Hyperlink | Info | 52 | | --------------------------------------------------------------------- | ---- | 53 | | [Obsidian Git Github Repo](https://github.com/denolehov/obsidian-git) | | 54 | 55 | Created Date: September 7th 2021 (11:24 am) 56 | Last Modified Date: <%+tp.file.last_modified_date("MMMM Do YYYY (hh:ss a)")%> -------------------------------------------------------------------------------- /03 - Content/Templater.md: -------------------------------------------------------------------------------- 1 | --- 2 | creation date: September 7th 2021 3 | last modified date: September 7th 2021 4 | aliases: [] 5 | tags: #📖 6 | --- 7 | 8 | Primary Categories: [[01 - Administration]] 9 | Secondary Categories: [[02 - Obsidian]] - [[02 - Resources]] 10 | Links: [[Automation]] - [[Templates]] - [[Github]] 11 | Search Tag: #📖 12 | 13 | # [[Templater]] 14 | 15 | ## Description: 16 | 17 | [Templater](https://github.com/SilentVoid13/Templater) is a template language that lets you insert **variables** and **functions** results into your [Obsidian](https://obsidian.md/) notes. 18 | 19 | ![templater_demo](https://raw.githubusercontent.com/SilentVoid13/Templater/master/imgs/templater_demo.gif) 20 | 21 | ## How we'll use Templater 22 | - Prompt for the Search tag on note creation 23 | - Prompt for title on note creation 24 | - Add date *created* automatically 25 | - Update *last updated* automatically 26 | - Move the note to the appropriate location 27 | - 02 - Secondary Categories 28 | - 03 - Content 29 | - 05 - Personal 30 | 31 | ## Installation: 32 | 33 | 1. Templater is a registered Obsidian [[02 - Plugins#Community Plugins]] and can be installed directly from `Settings > Community Plugins > Browse` 34 | 35 | ## Configuration 36 | 37 | ```ad-info 38 | ### Not Seeing this stylized in *PREVIEW* mode? 39 | #### Try installing the community plugin, 'Admonition' 40 | 41 | 1. *Template Folder Location*: 04 - Templates 42 | 2. *Trigger Templater on New File Creation*: True 43 | 3. *Empty File Template*: 04 - Templates/0400 - Gen_Note 44 | ``` 45 | 46 | To help manage **incomplete**, **NULL**, or **'Untitled'** notes, it can be helpful to assign `Settings > Files & Links > Folder to Create New Notes in` to `.trash`. Since our **0400 - Gen_Note** template handles moving successfully created notes to their appropriate folders, the categories listed above will automatically end up in trash. 47 | 48 | ___ 49 | 50 | # Resources: 51 | 52 | | Hyperlink | Info | 53 | | ------------------------------------------------------------------------- | ---- | 54 | | [Templater Github Repo](https://github.com/SilentVoid13/Templater) | | 55 | | [Templater Documentation](https://silentvoid13.github.io/Templater/docs/) | | 56 | 57 | Created Date: September 7th 2021 (11:24 am) 58 | Last Modified Date: <%+tp.file.last_modified_date("MMMM Do YYYY (hh:ss a)")%> -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907110604.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907110604.png -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907111121.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907111121.png -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907112215.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907112215.png -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907112642.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907112642.png -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907120723.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907120723.png -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907120756.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907120756.png -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907120838.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907120838.png -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907121102.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907121102.png -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907122512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907122512.png -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907124937.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907124937.png -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907125248.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907125248.png -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907125653.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907125653.png -------------------------------------------------------------------------------- /03 - Content/files/Pasted image 20210907125817.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/Pasted image 20210907125817.png -------------------------------------------------------------------------------- /03 - Content/files/highlight_currentline 1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/highlight_currentline 1.gif -------------------------------------------------------------------------------- /03 - Content/files/highlight_currentline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/highlight_currentline.gif -------------------------------------------------------------------------------- /03 - Content/files/responsive_yt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/trustedsec/Obsidian-Vault-Structure/c408d4914a7bd98f1a5628e0067c84ab4b3a0a1a/03 - Content/files/responsive_yt.gif -------------------------------------------------------------------------------- /04 - Templates/04 - Structural Elements/0401 - Struct_Gen_Header.md: -------------------------------------------------------------------------------- 1 | Primary Categories: { Add link(s) [[]] back to related PRIMARY categories } 2 | Secondary Categories: { Add link(s) [[]] back to related SECONDARY categories } 3 | Links: {Add link(s) [[]] to related terms} -------------------------------------------------------------------------------- /04 - Templates/04 - Structural Elements/0402 - Struct_Gen_Resources.md: -------------------------------------------------------------------------------- 1 | ___ 2 | 3 | ## Resources: 4 | 5 | | Hyperlink | Info | 6 | | --------- | ---- | 7 | -------------------------------------------------------------------------------- /04 - Templates/04 - Structural Elements/0403 - Struct_TTP_Body.md: -------------------------------------------------------------------------------- 1 | ___ 2 | 3 | ## Description: 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /04 - Templates/04 - Structural Elements/0404 - Struct_Tool_Body.md: -------------------------------------------------------------------------------- 1 | ___ 2 | 3 | ## Description: 4 | 5 | 6 | ## Installation 7 | 8 | 9 | ## Commands 10 | 11 | 12 | -------------------------------------------------------------------------------- /04 - Templates/04 - Structural Elements/0405 - Struct_Idea_Body.md: -------------------------------------------------------------------------------- 1 | ___ 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /04 - Templates/04 - Structural Elements/0406 - Struct_Documentation_Body.md: -------------------------------------------------------------------------------- 1 | { document content boilerplate } 2 | 3 | 4 | -------------------------------------------------------------------------------- /04 - Templates/04 - Structural Elements/0407 - Struct_Personal_Body.md: -------------------------------------------------------------------------------- 1 | { Links to personal content } 2 | 3 | -------------------------------------------------------------------------------- /04 - Templates/04 - Structural Elements/0408 - Struct_Secondary_Category_Header.md: -------------------------------------------------------------------------------- 1 | Primary Categories: { Add link(s) [[]] back to related PRIMARY categories } -------------------------------------------------------------------------------- /04 - Templates/04 - Structural Elements/0409 - Struct_Secondary_Category_Body.md: -------------------------------------------------------------------------------- 1 | { Links to content pages } 2 | 3 | -------------------------------------------------------------------------------- /04 - Templates/0400 - Gen_Note.md: -------------------------------------------------------------------------------- 1 | <%* 2 | var note; 3 | var body; 4 | var struct; 5 | var dest; 6 | var metadata; 7 | var timestamps; 8 | 9 | let validTitle = false; 10 | let title = tp.file.title; 11 | 12 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Functions ///////////////////////////////////// 13 | ////////////////////////////////////////////////////////////////////////////////// 14 | 15 | // Name: getTitle 16 | // Description: Ensure a valid title is supplied, or prompt user for title. 17 | // Rename the created file from "Untitled" to what they've supplied. 18 | // Supports both creating notes from "new note" or "ctrl + click" 19 | async function setTitle() { 20 | 21 | if (await validateTitle(title)) 22 | { 23 | console.log(`Title: "${title}" is valid`) 24 | await tp.file.rename(title); 25 | } 26 | else 27 | { 28 | console.log("The supplied title was invalid.") 29 | title = await tp.system.prompt("Title of New Note"); 30 | setTitle(); 31 | } 32 | } 33 | 34 | // Name: validateTitle 35 | // Description: Checks supplied string (title) against 'undefined' type , null 36 | // value, empty value and when the type is a string - we validate if it follows 37 | // the default naming scheme of 'Untitled #' - rejects assignment of any of these 38 | // cases 39 | // Return: Boolean 40 | async function validateTitle(noteTitle) { 41 | // if nothing was supplied, try again 42 | if (typeof noteTitle === 'undefined' || (typeof noteTitle === 'string' && noteTitle.includes('Untitled')) || noteTitle === null || noteTitle === "") 43 | { 44 | console.log(noteTitle.includes('Untitled')) 45 | return false; 46 | } 47 | else 48 | { 49 | return true; 50 | } 51 | } 52 | 53 | // Name: getNoteStruct 54 | // Description: Accepts the Search Tag (emoji) selected by the user 55 | // and returns the appropriate note name which defines the categories 56 | // body structure 57 | // Return: String 58 | async function getNoteStruct(noteTag) { 59 | var structName; 60 | console.log("Getting Struct MD for tag: " + noteTag); 61 | 62 | if (tag.startsWith('📕')) { 63 | structName = "[[0403 - Struct_TTP_Body]]"; 64 | dest = "03 - Content"; 65 | prefix = ""; 66 | } else if (tag.startsWith('🧰')) { 67 | structName = "[[0404 - Struct_Tool_Body]]"; 68 | dest = "03 - Content"; 69 | prefix = ""; 70 | } else if (tag.startsWith('💡')) { 71 | structName = "[[0405 - Struct_Idea_Body]]"; 72 | dest = "03 - Content"; 73 | prefix = ""; 74 | } else if (tag.startsWith('📖')) { 75 | structName = "[[0406 - Struct_Documentation_Body]]"; 76 | dest = "03 - Content"; 77 | prefix = ""; 78 | } else if (tag.startsWith('🗺')) { 79 | structName = "[[0409 - Struct_Secondary_Category_Body]]"; 80 | dest = "02 - Secondary Categories"; 81 | prefix = "02 - "; 82 | } else if (tag.startsWith('㊙️')) { 83 | structName = "[[0407 - Struct_Personal_Body]]"; 84 | dest = "05 - Personal"; 85 | prefix = ""; 86 | } else { 87 | console.log("You selected an option outside what was expected."); 88 | console.log("Try again."); 89 | } 90 | return structName; 91 | } 92 | 93 | // Name: buildNote 94 | // Description: Performs the actual concatenation of our discrete header, body and 95 | // footer note elements then handles the creation of the note itself. 96 | async function buildNote(title,struct) { 97 | 98 | // Primary Note Elements\ 99 | var metadata = await setMetadata(tag) + "\n"; 100 | var header = await tp.file.include("[[0401 - Struct_Gen_Header]]") + "\n"; 101 | var catHeader = await tp.file.include("[[0408 - Struct_Secondary_Category_Header]]") + "\n"; 102 | var searchTag = "Search Tag: #" + tag + " \n\n"; 103 | var pageTitle = "# [[" + title + "]] \n"; 104 | var body = await tp.file.include(struct) + "\n" 105 | var resources = await tp.file.include("[[0402 - Struct_Gen_Resources]]") + "\n"; 106 | var timestamps = await setTimestamps(); 107 | 108 | console.log("Is the passed struct a complete template?"); 109 | //TODO: 110 | // Include logic to facilitate kickoff template etc 111 | // move resulting note to 05 - Personal 112 | if (!(await isCategory(struct))) { 113 | console.log("Should we link to the struct that was passed?"); 114 | if (await ShouldLink(struct)) { 115 | console.log("linking it"); 116 | // include header if the note should be linked 117 | note = metadata + header + searchTag + pageTitle + body + resources + timestamps 118 | } else { 119 | console.log("not linking it for reasons"); 120 | // do not include header 121 | note = metadata + searchTag + pageTitle + body + resources + timestamps 122 | } 123 | } else { 124 | console.log("the struct is a template"); 125 | // if template, include only its contents 126 | note = catHeader + searchTag + pageTitle + body 127 | } 128 | } 129 | 130 | // Name: setMetdata 131 | // Description: References templater file fields to build and assign the metdata 132 | // element which will prefix all content files and permit dataview quering 133 | // Returns: String 134 | async function setMetadata(inTag) { 135 | var metadata = "---\ncreation date: " + tp.file.creation_date('MMMM Do YYYY') + "\nlast modified date: " + tp.file.last_modified_date('MMMM Do YYYY') + "\naliases: []\ntags: #" + inTag + "\n---\n"; 136 | 137 | return metadata; 138 | } 139 | 140 | // Name: setTimestamps 141 | // Description: Builds the timestamps element appended to note pages as they're built. Includes the definition of the Modified Date dynamic element which is updated when the page is edited and shown at the time of the page being rendered in preview mode. 142 | async function setTimestamps() { 143 | var timestamps = "\nCreated Date: " + tp.file.creation_date('MMMM Do YYYY (hh:ss a)') + " \nLast Modified Date: <%+tp.file.last_modified_date(\"MMMM Do YYYY (hh:ss a)\")%>"; 144 | 145 | return timestamps; 146 | } 147 | 148 | // Name: isCategory 149 | // Description: Determines whether or not the struct is related to a category 150 | // by its name containing "category" 151 | // Returns: Boolean 152 | async function isCategory(struct) { 153 | // dont build out template elements, just reference 154 | if (struct.toLowerCase().includes('category')) { 155 | console.log("yes"); 156 | return true; 157 | } 158 | console.log("no"); 159 | return false; 160 | } 161 | 162 | // Name: shouldLink 163 | // Description: Determines whether or not the Struct_Gen_Header should be included 164 | // on a new note based on a blacklist of struct names kept here. 165 | // Returns: Boolean 166 | async function ShouldLink(struct) { 167 | 168 | var dontLink = false; 169 | var dontLinkTerms = ["personal"] 170 | 171 | for (const structRoot of dontLinkTerms) { 172 | console.log("Is " + structRoot + " in " + struct.toLowerCase() + "?"); 173 | if (struct.toLowerCase().includes(structRoot.toLowerCase())) { 174 | console.log(structRoot.toLowerCase() + " was found in " + struct.toLowerCase()); 175 | var dontLink = true; 176 | } 177 | } 178 | 179 | if(dontLink) { 180 | return false; 181 | } else { 182 | return true; 183 | } 184 | } 185 | 186 | ////////////////////////////////////////////////////////////////////////////////// 187 | ////////////////////////////////////// Main ////////////////////////////////////// 188 | ////////////////////////////////////////////////////////////////////////////////// 189 | 190 | // Present selection of Search Tags to user 191 | let tag = await tp.system.suggester(["📕 (TTP)", "🧰 (Tool)", "💡 (Idea)", "📖 (Documentation)", "㊙️ (Personal)", "🗺 (Secondary Category)"], ["📕", "🧰", "💡", "📖", "㊙️", "🗺"], true) 192 | 193 | // Ensure the user isnt supplying an undefined or untitled note name 194 | await setTitle(title); 195 | 196 | // Get the Struct associated with the Search Tag selected 197 | struct = await getNoteStruct(tag); 198 | 199 | // move file to appropriate corresponding folder 200 | await tp.file.move(dest + "/" + prefix + title); 201 | 202 | //build the note 203 | await buildNote(title,struct); 204 | %><%* tR += `${note}` %> 205 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Obsidian-Vault-Structure 2 | 3 | ## Welcome to TrustedSec's Obsidian Vault! 4 | 5 | This project was developed as part of TrustedSec's investigation into using Obsidian (https://obsidian.md/) as a collaborative knowledge management solution. The repository is a designed to be act as a complimentary resource to TrustedSec's original blog post (https://www.trustedsec.com/blog/obsidian-taming-a-collective-consciousness/) describing the vaults composition and use. 6 | 7 | Hopefully this repository's vault structure and automation templates help you and your team shortcut the process of spinning up and evaluating Obsidian! 8 | 9 | @L1nkd34d 10 | --------------------------------------------------------------------------------