Compare commits

..

12 commits

Author SHA1 Message Date
Markus Moser
773210edf9
1.2.0 2026-01-05 19:07:12 +01:00
Markus Moser
f6043d293e
Added troubleshooting section 2026-01-05 19:06:26 +01:00
Markus Moser
a6bdb69b88
Added settings for screenshare and blur links protection 2026-01-05 18:57:23 +01:00
Markus Moser
02b5de68a4
Fixed test vault not having all files included 2026-01-05 18:56:39 +01:00
Markus Moser
2cfcdf1473
Fixed links not being revealed correctly 2026-01-05 18:43:48 +01:00
Markus Moser
d6acc5909f
Added ability to disable link blurring
fixes #1
2026-01-05 18:25:56 +01:00
Markus Moser
54e1b642d5
Added a testvault to quickly test features 2026-01-05 18:24:26 +01:00
Markus Moser
32bfc29750
Added documentation for the "Enable in tab headers" setting that must be set
references #2
2026-01-05 17:47:17 +01:00
Markus Moser
f17b80b0a7
Fixed revealing callout on hover even when on-hover was off
fixes #3
2026-01-05 17:15:30 +01:00
Markus Moser
e64d0f440a
Updated install instructions in README.md 2025-06-04 07:15:08 +02:00
Markus Moser
356a29df46
1.1.8 2025-04-07 09:17:36 +02:00
Markus Moser
10a7999cb4
improved visibility when using keyboard only 2025-04-07 09:13:08 +02:00
29 changed files with 2696 additions and 51 deletions

5
.gitignore vendored
View file

@ -24,5 +24,8 @@ data.json
.DS_Store
# Exclude release
private-mode/
/private-mode/
private-mode.zip
!private-mode-testvault/**/main.js
!private-mode-testvault/**/data.json
!private-mode-testvault/**/styles.css

View file

@ -3,15 +3,16 @@ Simple #private mode for [Obsidian](https://obsidian.md/). All files, links and
**This plugin requires the obsidian plugin [Supercharged Links](https://github.com/mdelobelle/obsidian_supercharged_links) to work**
![docs/img.png](./docs/showcase_1.png)
![docs/showcase_1.png](docs/showcase_1.png)
![docs/img_1.png](./docs/showcase_2.png)
![docs/showcase_2.png](./docs/showcase_2.png)
# Features
* 3⃣ Three Modes
* Reveal all: to disable the blurring completely
* Reveal on hover: only show #private content on hover (default)
* Reveal never: only show #private content for the currently editing line
* 🔗 Blur also all links to #private files, or not, its your choice
* 💻 By default not visible when using screenshare! Keep your secrets :) (desktop-only)
* 📱 Supported on Obsidian Mobile
* 🎀 Commands to set visibility (also usable on mobile)
@ -30,14 +31,17 @@ Simple #private mode for [Obsidian](https://obsidian.md/). All files, links and
```
# Installing
The plugin is not available on the community page, as its mostly for me personally, so to install it:
1. Install [Supercharged Links](https://github.com/mdelobelle/obsidian_supercharged_links) via the Settings Panel "Community Plugins"
2. Go into your Obsidian Vaults plugin folder `.obsidian/plugins`
3. Copy the files from the latest release in there
4. (Optional) Adjust the `styles.scss`/`styles.css` to your liking
2. Install [Private Mode](https://obsidian.md/plugins?id=private-mode) via the Settings Panel "Community Plugins"
3. Enable both plugins in the Settings panel "Community Plugins"
4. Go into the Settings Panel for "Supercharged Links" and make sure the "Enable in tab headers" is turned on. Otherwise the plugin will not blur your #private files in the editor.
5. (Optional) Adjust the `styles.scss`/`styles.css` to your liking
* to compile the scss you can use sass `npm install -g sass` and `sass styles.scss styles.css`
5. Enable the plugin in your Obsidian in the Settings panel "Community Plugins"
6. Enable the two plugins in your Obsidian in the Settings panel "Community Plugins"
# Troubleshooting
* My file content is not hidden!
* Make sure you have the Supercharged Links setting "Enable in tab headers" turned on. Also try turning that off and on again if it was on already. Sometimes Supercharged Links doesnt correctly tag the tab headers.
# Credits
Huge thanks to [Privacy Glasses](https://github.com/jillalberts/privacy-glasses/tree/master) for the groundwork and being licensed under MIT. Use that plugin if you want a more in depth configuration. I personally didn't need or want that much customization and overhead in my plugin. Also i found the "flickering" when opening any file to be too distracting, so i created a simpler version for myself.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 72 KiB

64
main.ts
View file

@ -4,13 +4,7 @@
* Licensed under the MIT License (http://opensource.org/licenses/MIT)
*/
import {
addIcon,
Menu,
Platform,
Plugin,
setIcon,
} from "obsidian";
import {addIcon, Menu, Platform, Plugin, setIcon,} from "obsidian";
enum Level {
HidePrivate = "hide-private",
@ -21,16 +15,28 @@ enum Level {
enum CssClass {
RevealAll = "private-mode-reveal-all",
RevealOnHover = "private-mode-reveal-on-hover",
UnprotectedScreenshare = "private-mode-unprotected-screenshare"
UnprotectedScreenshare = "private-mode-unprotected-screenshare",
BlurLinksToo = "private-mode-blur-links-too"
}
interface PrivateModePluginSettings {
currentScreenshareProtection: boolean;
blurLinksToo: boolean;
}
const DEFAULT_SETTINGS: Partial<PrivateModePluginSettings> = {
currentScreenshareProtection: true,
blurLinksToo: true,
};
export default class PrivateModePlugin extends Plugin {
statusBar: HTMLElement;
statusBarSpan: HTMLSpanElement;
settings: PrivateModePluginSettings;
currentLevel: Level = Level.RevealOnHover;
currentScreenshareProtection: boolean = true;
async onload() {
this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData());
this.statusBar = this.addStatusBarItem();
this.statusBar.addClass("mod-clickable")
this.statusBar.ariaLabel = "Toggle private mode"
@ -69,14 +75,25 @@ export default class PrivateModePlugin extends Plugin {
})
);
menu.addSeparator()
menu.addItem((item) =>
item
.setTitle('Blur Links too')
.setIcon('ph--link')
.setChecked(this.settings.blurLinksToo)
.onClick(() => {
this.settings.blurLinksToo = !this.settings.blurLinksToo;
item.setChecked(!this.settings.blurLinksToo)
this.updateGlobalRevealStyle();
})
);
menu.addItem((item) =>
item
.setTitle('Visibility when screensharing')
.setIcon('ph--screencast')
.setChecked(!this.currentScreenshareProtection)
.setChecked(!this.settings.currentScreenshareProtection)
.onClick(() => {
this.currentScreenshareProtection = !this.currentScreenshareProtection;
item.setChecked(!this.currentScreenshareProtection)
this.settings.currentScreenshareProtection = !this.settings.currentScreenshareProtection;
item.setChecked(!this.settings.currentScreenshareProtection)
this.updateGlobalRevealStyle();
})
);
@ -84,7 +101,7 @@ export default class PrivateModePlugin extends Plugin {
} else {
// left click
if (event.altKey) {
this.currentScreenshareProtection = !this.currentScreenshareProtection;
this.settings.currentScreenshareProtection = !this.settings.currentScreenshareProtection;
this.updateGlobalRevealStyle();
} else {
this.cycleCurrentLevel();
@ -98,6 +115,7 @@ export default class PrivateModePlugin extends Plugin {
addIcon("ph--eye-hand", eyeHand);
addIcon("ph--eye-closed", eyeClosedIcon);
addIcon("ph--screencast", screencastIcon);
addIcon("ph--link", linkIcon);
this.addCommand({
id: "hide-private",
@ -139,7 +157,7 @@ export default class PrivateModePlugin extends Plugin {
id: "toggle-screenshare-protection",
name: "Toggle screenshare protection",
callback: () => {
this.currentScreenshareProtection = !this.currentScreenshareProtection
this.settings.currentScreenshareProtection = !this.settings.currentScreenshareProtection
this.updateGlobalRevealStyle();
},
})
@ -163,12 +181,17 @@ export default class PrivateModePlugin extends Plugin {
}
}
async saveSettings() {
await this.saveData(this.settings);
}
updateGlobalRevealStyle() {
this.saveSettings()
this.removeAllClasses();
this.setClassToDocumentBody();
if (Platform.isDesktopApp) {
window.require("electron").remote.getCurrentWindow().setContentProtection(this.currentScreenshareProtection)
window.require("electron").remote.getCurrentWindow().setContentProtection(this.settings.currentScreenshareProtection)
}
}
@ -176,14 +199,18 @@ export default class PrivateModePlugin extends Plugin {
document.body.removeClass(
CssClass.RevealAll,
CssClass.RevealOnHover,
CssClass.UnprotectedScreenshare
CssClass.UnprotectedScreenshare,
CssClass.BlurLinksToo
);
}
setClassToDocumentBody() {
if (!this.currentScreenshareProtection) {
if (!this.settings.currentScreenshareProtection) {
document.body.classList.add(CssClass.UnprotectedScreenshare)
}
if (this.settings.blurLinksToo) {
document.body.classList.add(CssClass.BlurLinksToo)
}
switch (this.currentLevel) {
case Level.HidePrivate:
setIcon(this.statusBarSpan, "ph--eye-closed")
@ -212,3 +239,6 @@ const eyeIcon = `<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xM
// https://icon-sets.iconify.design/ph/screencast/
const screencastIcon = `<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path fill="currentColor" d="M232 56v144a16 16 0 0 1-16 16h-72a8 8 0 0 1 0-16h72V56H40v40a8 8 0 0 1-16 0V56a16 16 0 0 1 16-16h176a16 16 0 0 1 16 16M32 184a8 8 0 0 0 0 16a8 8 0 0 1 8 8a8 8 0 0 0 16 0a24 24 0 0 0-24-24m0-32a8 8 0 0 0 0 16a40 40 0 0 1 40 40a8 8 0 0 0 16 0a56.06 56.06 0 0 0-56-56m0-32a8 8 0 0 0 0 16a72.08 72.08 0 0 1 72 72a8 8 0 0 0 16 0a88.1 88.1 0 0 0-88-88"/></svg>`;
// https://icon-sets.iconify.design/ph/link/
const linkIcon = `<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path fill="currentColor" d="M240 88.23a54.43 54.43 0 0 1-16 37L189.25 160a54.27 54.27 0 0 1-38.63 16h-.05A54.63 54.63 0 0 1 96 119.84a8 8 0 0 1 16 .45A38.62 38.62 0 0 0 150.58 160a38.4 38.4 0 0 0 27.31-11.31l34.75-34.75a38.63 38.63 0 0 0-54.63-54.63l-11 11A8 8 0 0 1 135.7 59l11-11a54.65 54.65 0 0 1 77.3 0a54.86 54.86 0 0 1 16 40.23m-131 97.43l-11 11A38.4 38.4 0 0 1 70.6 208a38.63 38.63 0 0 1-27.29-65.94L78 107.31a38.63 38.63 0 0 1 66 28.4a8 8 0 0 0 16 .45A54.86 54.86 0 0 0 144 96a54.65 54.65 0 0 0-77.27 0L32 130.75A54.62 54.62 0 0 0 70.56 224a54.28 54.28 0 0 0 38.64-16l11-11a8 8 0 0 0-11.2-11.34"/></svg>`;

View file

@ -1,7 +1,7 @@
{
"id": "private-mode",
"name": "Private Mode",
"version": "1.1.7",
"version": "1.2.0",
"minAppVersion": "1.6.0",
"description": "Simple #private mode",
"author": "markusmo3",

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "obsidian-private-mode",
"version": "1.1.7",
"version": "1.2.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "obsidian-private-mode",
"version": "1.1.7",
"version": "1.2.0",
"license": "MIT",
"devDependencies": {
"@types/node": "^16.11.6",

View file

@ -1,12 +1,12 @@
{
"name": "obsidian-private-mode",
"version": "1.1.7",
"version": "1.2.0",
"description": "Simple #private mode for Obsidian (https://obsidian.md)",
"main": "main.js",
"scripts": {
"dev": "node esbuild.config.mjs",
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production && sass styles.scss styles.css",
"make-release": "npm run build && bash ./.github/make_release.sh private-mode",
"preview": "npm run make-release && bash -c \"cp -r private-mode/. private-mode-testvault/.obsidian/plugins/private-mode/\" && start \"\" \"obsidian://open?vault=private-mode-testvault\"",
"version": "node version-bump.mjs && git add manifest.json versions.json",
"lint": "eslint --cache --fix"
},

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,3 @@
{
"theme": "obsidian"
}

View file

@ -0,0 +1,4 @@
[
"supercharged-links-obsidian",
"private-mode"
]

View file

@ -0,0 +1,33 @@
{
"file-explorer": true,
"global-search": true,
"switcher": true,
"graph": true,
"backlink": true,
"canvas": true,
"outgoing-link": true,
"tag-pane": true,
"footnotes": false,
"properties": true,
"page-preview": true,
"daily-notes": true,
"templates": true,
"note-composer": true,
"command-palette": true,
"slash-command": false,
"editor-status": true,
"bookmarks": true,
"markdown-importer": false,
"zk-prefixer": false,
"random-note": false,
"outline": true,
"word-count": true,
"slides": false,
"audio-recorder": false,
"workspaces": false,
"file-recovery": true,
"publish": false,
"sync": true,
"bases": true,
"webviewer": false
}

View file

@ -0,0 +1,22 @@
{
"collapse-filter": true,
"search": "",
"showTags": false,
"showAttachments": false,
"hideUnresolved": false,
"showOrphans": true,
"collapse-color-groups": true,
"colorGroups": [],
"collapse-display": true,
"showArrow": false,
"textFadeMultiplier": 0,
"nodeSizeMultiplier": 1,
"lineSizeMultiplier": 1,
"collapse-forces": true,
"centerStrength": 0.518713248970312,
"repelStrength": 10,
"linkStrength": 1,
"linkDistance": 250,
"scale": 1,
"close": true
}

View file

@ -0,0 +1,4 @@
{
"currentScreenshareProtection": true,
"blurLinksToo": false
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
{
"id": "private-mode",
"name": "Private Mode",
"version": "1.1.8",
"minAppVersion": "1.6.0",
"description": "Simple #private mode",
"author": "markusmo3",
"authorUrl": "https://github.com/markusmo3",
"isDesktopOnly": false
}

View file

@ -0,0 +1,413 @@
/*
* Original Source: community plugin privacy glasses
* Modified by markusmo3
* Last updated: 2024-10-29
*/
:root {
--blur-level: 0.5rem;
}
body.private-mode-blur-links-too .data-link-text[data-link-tags*="#private"]:not(.tree-item-inner, .suggestion-title) {
filter: blur(calc(var(--blur-level) * 1));
}
body.private-mode-blur-links-too .dataview tr:has(a[data-link-tags*="#private"]) {
filter: blur(calc(var(--blur-level) * 1));
}
body.private-mode-blur-links-too .suggestion-item:has([data-link-tags*="#private"]) {
filter: blur(calc(var(--blur-level) * 1));
}
body.private-mode-blur-links-too .nav-file-title:has([data-link-tags*="#private"]) {
filter: blur(calc(var(--blur-level) * 1));
}
body.private-mode-blur-links-too .search-result:has([data-link-tags*="#private"]) {
filter: blur(calc(var(--blur-level) * 1));
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .inline-title {
filter: blur(calc(var(--blur-level) * 1));
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-line {
filter: blur(calc(var(--blur-level) * 1));
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(.metadata-property) {
filter: blur(calc(var(--blur-level) * 1));
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(img, video, svg, canvas) {
filter: blur(calc(var(--blur-level) * 4));
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .markdown-preview-view :is(li, p, h1, h2, h3, h4, h5) {
filter: blur(calc(var(--blur-level) * 1));
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-embed-block {
filter: blur(calc(var(--blur-level) * 1));
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .internal-embed {
filter: blur(calc(var(--blur-level) * 1));
}
body.private-mode-blur-links-too .data-link-text[data-link-tags*="#private"]:not(.tree-item-inner, .suggestion-title).inline-title:focus-within {
filter: unset !important;
}
body.private-mode-blur-links-too .data-link-text[data-link-tags*="#private"]:not(.tree-item-inner, .suggestion-title).cm-active {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .data-link-text[data-link-tags*="#private"]:not(.tree-item-inner, .suggestion-title).is-selected {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .data-link-text[data-link-tags*="#private"]:not(.tree-item-inner, .suggestion-title).has-focus {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .data-link-text[data-link-tags*="#private"]:not(.tree-item-inner, .suggestion-title):has(.has-focus) {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .data-link-text[data-link-tags*="#private"]:not(.tree-item-inner, .suggestion-title):hover {
filter: unset !important;
}
body.private-mode-reveal-all.private-mode-blur-links-too .data-link-text[data-link-tags*="#private"]:not(.tree-item-inner, .suggestion-title) {
filter: unset !important;
}
body.private-mode-blur-links-too .dataview tr:has(a[data-link-tags*="#private"]).inline-title:focus-within {
filter: unset !important;
}
body.private-mode-blur-links-too .dataview tr:has(a[data-link-tags*="#private"]).cm-active {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .dataview tr:has(a[data-link-tags*="#private"]).is-selected {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .dataview tr:has(a[data-link-tags*="#private"]).has-focus {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .dataview tr:has(a[data-link-tags*="#private"]):has(.has-focus) {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .dataview tr:has(a[data-link-tags*="#private"]):hover {
filter: unset !important;
}
body.private-mode-reveal-all.private-mode-blur-links-too .dataview tr:has(a[data-link-tags*="#private"]) {
filter: unset !important;
}
body.private-mode-blur-links-too .suggestion-item:has([data-link-tags*="#private"]).inline-title:focus-within {
filter: unset !important;
}
body.private-mode-blur-links-too .suggestion-item:has([data-link-tags*="#private"]).cm-active {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .suggestion-item:has([data-link-tags*="#private"]).is-selected {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .suggestion-item:has([data-link-tags*="#private"]).has-focus {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .suggestion-item:has([data-link-tags*="#private"]):has(.has-focus) {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .suggestion-item:has([data-link-tags*="#private"]):hover {
filter: unset !important;
}
body.private-mode-reveal-all.private-mode-blur-links-too .suggestion-item:has([data-link-tags*="#private"]) {
filter: unset !important;
}
body.private-mode-blur-links-too .nav-file-title:has([data-link-tags*="#private"]).inline-title:focus-within {
filter: unset !important;
}
body.private-mode-blur-links-too .nav-file-title:has([data-link-tags*="#private"]).cm-active {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .nav-file-title:has([data-link-tags*="#private"]).is-selected {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .nav-file-title:has([data-link-tags*="#private"]).has-focus {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .nav-file-title:has([data-link-tags*="#private"]):has(.has-focus) {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .nav-file-title:has([data-link-tags*="#private"]):hover {
filter: unset !important;
}
body.private-mode-reveal-all.private-mode-blur-links-too .nav-file-title:has([data-link-tags*="#private"]) {
filter: unset !important;
}
body.private-mode-blur-links-too .search-result:has([data-link-tags*="#private"]).inline-title:focus-within {
filter: unset !important;
}
body.private-mode-blur-links-too .search-result:has([data-link-tags*="#private"]).cm-active {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .search-result:has([data-link-tags*="#private"]).is-selected {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .search-result:has([data-link-tags*="#private"]).has-focus {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .search-result:has([data-link-tags*="#private"]):has(.has-focus) {
filter: unset !important;
}
body.private-mode-reveal-on-hover.private-mode-blur-links-too .search-result:has([data-link-tags*="#private"]):hover {
filter: unset !important;
}
body.private-mode-reveal-all.private-mode-blur-links-too .search-result:has([data-link-tags*="#private"]) {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .inline-title.inline-title:focus-within {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .inline-title.cm-active {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .inline-title.is-selected {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .inline-title.has-focus {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .inline-title:has(.has-focus) {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .inline-title:hover {
filter: unset !important;
}
body.private-mode-reveal-all .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .inline-title {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-line.inline-title:focus-within {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-line.cm-active {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-line.is-selected {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-line.has-focus {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-line:has(.has-focus) {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-line:hover {
filter: unset !important;
}
body.private-mode-reveal-all .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-line {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(.metadata-property).inline-title:focus-within {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(.metadata-property).cm-active {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(.metadata-property).is-selected {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(.metadata-property).has-focus {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(.metadata-property):has(.has-focus) {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(.metadata-property):hover {
filter: unset !important;
}
body.private-mode-reveal-all .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(.metadata-property) {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(img, video, svg, canvas).inline-title:focus-within {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(img, video, svg, canvas).cm-active {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(img, video, svg, canvas).is-selected {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(img, video, svg, canvas).has-focus {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(img, video, svg, canvas):has(.has-focus) {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(img, video, svg, canvas):hover {
filter: unset !important;
}
body.private-mode-reveal-all .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .view-content :is(img, video, svg, canvas) {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .markdown-preview-view :is(li, p, h1, h2, h3, h4, h5).inline-title:focus-within {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .markdown-preview-view :is(li, p, h1, h2, h3, h4, h5).cm-active {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .markdown-preview-view :is(li, p, h1, h2, h3, h4, h5).is-selected {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .markdown-preview-view :is(li, p, h1, h2, h3, h4, h5).has-focus {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .markdown-preview-view :is(li, p, h1, h2, h3, h4, h5):has(.has-focus) {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .markdown-preview-view :is(li, p, h1, h2, h3, h4, h5):hover {
filter: unset !important;
}
body.private-mode-reveal-all .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .markdown-preview-view :is(li, p, h1, h2, h3, h4, h5) {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-embed-block.inline-title:focus-within {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-embed-block.cm-active {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-embed-block.is-selected {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-embed-block.has-focus {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-embed-block:has(.has-focus) {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-embed-block:hover {
filter: unset !important;
}
body.private-mode-reveal-all .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .cm-embed-block {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .internal-embed.inline-title:focus-within {
filter: unset !important;
}
body .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .internal-embed.cm-active {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .internal-embed.is-selected {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .internal-embed.has-focus {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .internal-embed:has(.has-focus) {
filter: unset !important;
}
body.private-mode-reveal-on-hover .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .internal-embed:hover {
filter: unset !important;
}
body.private-mode-reveal-all .workspace-tabs:has(.is-active [data-link-tags*="#private"]) .internal-embed {
filter: unset !important;
}
/* add a private callout */
.callout[data-callout=private] {
--callout-color: 158, 158, 158;
--callout-icon: lucide-lock;
}
body:not(.private-mode-reveal-all) .callout[data-callout=private]:not(.is-collapsed) > .callout-content {
filter: blur(0.5rem);
}
body.private-mode-reveal-on-hover .callout[data-callout=private]:not(.is-collapsed) > .callout-content:hover {
filter: none;
}
/* screenshare protection */
body.private-mode-unprotected-screenshare .status-bar-item.plugin-private-mode {
color: var(--text-error);
}
/*# sourceMappingURL=styles.css.map */

View file

@ -0,0 +1,66 @@
/*
* Original Source: community plugin privacy glasses
* Modified by markusmo3
* Last updated: 2024-10-29
*/
:root {
--blur-level: 0.5rem;
}
$element-selectors: (
".private-mode-blur-links-too" ".data-link-text[data-link-tags*='#private']:not(.tree-item-inner,.suggestion-title)" 1, // Link items
".private-mode-blur-links-too" ".dataview tr:has(a[data-link-tags*='#private'])" 1, // dataview tables
".private-mode-blur-links-too" ".suggestion-item:has([data-link-tags*='#private'])" 1, // Search results
".private-mode-blur-links-too" ".nav-file-title:has([data-link-tags*='#private'])" 1, // "Files" tree
".private-mode-blur-links-too" ".search-result:has([data-link-tags*='#private'])" 1, // Sidebar search
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .inline-title" 1,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .cm-line" 1,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .view-content :is(.metadata-property)" 1,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .view-content :is(img, video, svg, canvas)" 4,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .markdown-preview-view :is(li, p, h1, h2, h3, h4, h5)" 1,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .cm-embed-block" 1,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .internal-embed" 1,
);
@each $bodySelector, $selector, $m in $element-selectors {
body#{$bodySelector} #{$selector} {
filter: blur(calc(var(--blur-level) * #{$m}));
}
}
$reveal-templates: (
"" ".inline-title:focus-within",
"" ".cm-active",
".private-mode-reveal-on-hover" ".is-selected",
".private-mode-reveal-on-hover" ".has-focus",
".private-mode-reveal-on-hover" ":has(.has-focus)",
".private-mode-reveal-on-hover" ":hover",
".private-mode-reveal-all"
);
@each $bodySelector, $selector, $m in $element-selectors {
@each $bodyPrefix, $suffix in $reveal-templates {
body#{$bodyPrefix}#{$bodySelector} #{$selector}#{$suffix} {
filter: unset !important;
}
}
}
/* add a private callout */
.callout[data-callout="private"] {
--callout-color: 158, 158, 158;
--callout-icon: lucide-lock;
}
body:not(.private-mode-reveal-all) .callout[data-callout="private"]:not(.is-collapsed) > .callout-content {
filter: blur(0.5rem);
}
body.private-mode-reveal-on-hover .callout[data-callout="private"]:not(.is-collapsed) > .callout-content:hover {
filter: none;
}
/* screenshare protection */
body.private-mode-unprotected-screenshare .status-bar-item.plugin-private-mode {
color: var(--text-error);
}

View file

@ -0,0 +1,15 @@
{
"targetAttributes": [
"tags"
],
"targetTags": true,
"getFromInlineField": true,
"enableTabHeader": true,
"activateSnippet": true,
"enableEditor": true,
"enableFileList": true,
"enableBacklinks": true,
"enableQuickSwitcher": true,
"enableSuggestor": true,
"selectors": []
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,10 @@
{
"id": "supercharged-links-obsidian",
"name": "Supercharged Links",
"version": "0.9.0",
"minAppVersion": "0.16.0",
"description": "Add properties and menu options to links and style them!",
"author": "mdelobelle & Emile",
"authorUrl": "https://github.com/mdelobelle/mdelobelle/tree/main",
"isDesktopOnly": false
}

View file

@ -0,0 +1,11 @@
.css-boilerplate-result {
width: 30em
}
div.supercharged-modal {
height: 70vh;
}
div.supercharged-modal h4 {
margin: 0;
}

View file

@ -0,0 +1,10 @@
/* WARNING: This file will be overwritten by the plugin.
Do not edit this file directly! First copy this file and rename it if you want to edit things. */
:root {
}
/* @settings
name: Supercharged Links
id: supercharged-links
settings:
*/

View file

@ -0,0 +1,190 @@
{
"main": {
"id": "934369b7bb0e6693",
"type": "split",
"children": [
{
"id": "a1210924100c1d0a",
"type": "tabs",
"children": [
{
"id": "036da7cab00b65bb",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Atomic Habits by James Clear.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "Atomic Habits by James Clear"
}
}
]
}
],
"direction": "vertical"
},
"left": {
"id": "ee29d7167cdd43cc",
"type": "split",
"children": [
{
"id": "eaf9b520b27e288a",
"type": "tabs",
"children": [
{
"id": "fc195ec163f96993",
"type": "leaf",
"state": {
"type": "file-explorer",
"state": {
"sortOrder": "alphabetical",
"autoReveal": false
},
"icon": "lucide-folder-closed",
"title": "Files"
}
},
{
"id": "d244866190468ea8",
"type": "leaf",
"state": {
"type": "search",
"state": {
"query": "",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical"
},
"icon": "lucide-search",
"title": "Search"
}
},
{
"id": "e8ba431860b6ab8f",
"type": "leaf",
"state": {
"type": "bookmarks",
"state": {},
"icon": "lucide-bookmark",
"title": "Bookmarks"
}
}
]
}
],
"direction": "horizontal",
"width": 300
},
"right": {
"id": "c682a0cf0d9b3bd1",
"type": "split",
"children": [
{
"id": "b2eb1cc649591181",
"type": "tabs",
"children": [
{
"id": "cf46bb676db3895c",
"type": "leaf",
"state": {
"type": "backlink",
"state": {
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
"showSearch": false,
"searchQuery": "",
"backlinkCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-coming-in",
"title": "Backlinks"
}
},
{
"id": "9bd1a99e62412a48",
"type": "leaf",
"state": {
"type": "outgoing-link",
"state": {
"linksCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-going-out",
"title": "Outgoing links"
}
},
{
"id": "a6752f34cf38f30a",
"type": "leaf",
"state": {
"type": "tag",
"state": {
"sortOrder": "frequency",
"useHierarchy": true,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-tags",
"title": "Tags"
}
},
{
"id": "4cdad6da4fd49ad9",
"type": "leaf",
"state": {
"type": "all-properties",
"state": {
"sortOrder": "frequency",
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-archive",
"title": "All properties"
}
},
{
"id": "25cdce5abd4df1a8",
"type": "leaf",
"state": {
"type": "outline",
"state": {
"followCursor": false,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-list",
"title": "Outline"
}
}
]
}
],
"direction": "horizontal",
"width": 300,
"collapsed": true
},
"left-ribbon": {
"hiddenItems": {
"switcher:Open quick switcher": false,
"graph:Open graph view": false,
"canvas:Create new canvas": false,
"daily-notes:Open today's daily note": false,
"templates:Insert template": false,
"command-palette:Open command palette": false,
"bases:Create new base": false
}
},
"active": "036da7cab00b65bb",
"lastOpenFiles": [
"Welcome.md",
"Some private Note.md",
"Basic Writing and Formatting Syntax with GitHub Markdown.md",
"Atomic Habits by James Clear.md"
]
}

View file

@ -0,0 +1,35 @@
---
ai-generated: "true"
---
## 📚 Summary
> [!private]
> *Atomic Habits* explores how small, consistent improvements lead to significant long-term results. Clear presents a framework for building good habits and breaking bad ones through identity shifts, environment design, and habit stacking.
## 🔑 Key Takeaways
### 1⃣ The Power of Tiny Gains
- 1% improvements daily lead to exponential growth over time.
- Focus on getting *slightly* better, not on perfection.
### 2⃣ Identity-Based Habits
- Instead of setting goals like "I want to run a marathon," adopt an identity: "I am a runner."
- Identity shifts make habits more sustainable.
### 3⃣ The Four Laws of Behavior Change
1. **Make it Obvious** Design your environment to support habits.
2. **Make it Attractive** Pair habits with rewards.
3. **Make it Easy** Reduce friction to starting.
4. **Make it Satisfying** Reinforce positive behavior.
## ✍️ Favorite Quotes
> "You do not rise to the level of your goals. You fall to the level of your systems."
> "Every action is a vote for the type of person you wish to become."
## 🛠️ Actionable Steps
- Implement habit stacking: *After I make my morning coffee, I will write for 5 minutes.*
- Reduce friction for good habits: Keep a book on the bedside table to read before bed.
- Increase friction for bad habits: Put your phone in another room to avoid doomscrolling.
## 🔗 Related Notes
- [[The Power of Habit - Charles Duhigg]]
- [[Morning Routines]]
- [[Behavior Change Strategies]]

View file

@ -0,0 +1,475 @@
---
title: Basic writing and formatting syntax
intro: Create sophisticated formatting for your prose and code on GitHub with simple syntax.
product: "{% data reusables.gated-features.markdown-ui %}"
redirect_from:
- /articles/basic-writing-and-formatting-syntax
- /github/writing-on-github/basic-writing-and-formatting-syntax
- /github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
versions:
fpt: "*"
ghes: "*"
ghec: "*"
shortTitle: Basic formatting syntax
tags:
- private
---
## Headings
To create a heading, add one to six <kbd>#</kbd> symbols before your heading text. The number of <kbd>#</kbd> you use will determine the hierarchy level and typeface size of the heading.
```markdown
# A first-level heading
## A second-level heading
### A third-level heading
```
![Screenshot of rendered GitHub Markdown showing sample h1, h2, and h3 headers, which descend in type size and visual weight to show hierarchy level.](/assets/images/help/writing/headings-rendered.png)
When you use two or more headings, GitHub automatically generates a table of contents that you can access by clicking {% octicon "list-unordered" aria-label="The unordered list icon" %} within the file header. Each heading title is listed in the table of contents and you can click a title to navigate to the selected section.
![Screenshot of a README file with the drop-down menu for the table of contents exposed. The table of contents icon is outlined in dark orange.](/assets/images/help/repository/headings-toc.png)
## Styling text
You can indicate emphasis with bold, italic, strikethrough, subscript, or superscript text in comment fields and `.md` files.
| Style | Syntax | Keyboard shortcut | Example | Output |
| --- | --- | --- | --- | --- |
| Bold | `** **` or `__ __`| <kbd>Command</kbd>+<kbd>B</kbd> (Mac) or <kbd>Ctrl</kbd>+<kbd>B</kbd> (Windows/Linux) | `**This is bold text**` | **This is bold text** |
| Italic | `* *` or `_ _` | <kbd>Command</kbd>+<kbd>I</kbd> (Mac) or <kbd>Ctrl</kbd>+<kbd>I</kbd> (Windows/Linux) | `_This text is italicized_` | _This text is italicized_ |
| Strikethrough | `~~ ~~` | None | `~~This was mistaken text~~` | ~~This was mistaken text~~ |
| Bold and nested italic | `** **` and `_ _` | None | `**This text is _extremely_ important**` | **This text is _extremely_ important** |
| All bold and italic | `*** ***` | None | `***All this text is important***` | ***All this text is important*** | <!-- markdownlint-disable-line emphasis-style -->
| Subscript | `<sub> </sub>` | None | `This is a <sub>subscript</sub> text` | This is a <sub>subscript</sub> text |
| Superscript | `<sup> </sup>` | None | `This is a <sup>superscript</sup> text` | This is a <sup>superscript</sup> text |
| Underline | `<ins> </ins>` | None | `This is an <ins>underlined</ins> text` | This is an <ins>underlined</ins> text |
## Quoting text
You can quote text with a <kbd>></kbd>.
```markdown
Text that is not a quote
> Text that is a quote
```
Quoted text is indented with a vertical line on the left and displayed using gray type.
![Screenshot of rendered GitHub Markdown showing the difference between normal and quoted text.](/assets/images/help/writing/quoted-text-rendered.png)
> [!NOTE]
> When viewing a conversation, you can automatically quote text in a comment by highlighting the text, then typing <kbd>R</kbd>. You can quote an entire comment by clicking {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}, then **Quote reply**. For more information about keyboard shortcuts, see [AUTOTITLE](/get-started/accessibility/keyboard-shortcuts).
## Quoting code
You can call out code or a command within a sentence with single backticks. The text within the backticks will not be formatted. You can also press the <kbd>Command</kbd>+<kbd>E</kbd> (Mac) or <kbd>Ctrl</kbd>+<kbd>E</kbd> (Windows/Linux) keyboard shortcut to insert the backticks for a code block within a line of Markdown.
```markdown
Use `git status` to list all new or modified files that haven't yet been committed.
```
![Screenshot of rendered GitHub Markdown showing that characters surrounded by backticks are shown in a fixed-width typeface, highlighted in light gray.](/assets/images/help/writing/inline-code-rendered.png)
To format code or text into its own distinct block, use triple backticks.
````markdown
Some basic Git commands are:
```
git status
git add
git commit
```
````
![Screenshot of rendered GitHub Markdown showing a simple code block without syntax highlighting.](/assets/images/help/writing/code-block-rendered.png)
For more information, see [AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks).
{% data reusables.user-settings.enabling-fixed-width-fonts %}
## Supported color models
In issues, pull requests, and discussions, you can call out colors within a sentence by using backticks. A supported color model within backticks will display a visualization of the color.
```markdown
The background color is `#ffffff` for light mode and `#000000` for dark mode.
```
![Screenshot of rendered GitHub Markdown showing how HEX values within backticks create small circles of color, here white and then black.](/assets/images/help/writing/supported-color-models-rendered.png)
Here are the currently supported color models.
| Color | Syntax | Example | Output |
| --- | --- | --- | --- |
| HEX | <code>\`#RRGGBB\`</code> | <code>\`#0969DA\`</code> | ![Screenshot of rendered GitHub Markdown showing how HEX value #0969DA appears with a blue circle.](/assets/images/help/writing/supported-color-models-hex-rendered.png) |
| RGB | <code>\`rgb(R,G,B)\`</code> | <code>\`rgb(9, 105, 218)\`</code> | ![Screenshot of rendered GitHub Markdown showing how RGB value 9, 105, 218 appears with a blue circle.](/assets/images/help/writing/supported-color-models-rgb-rendered.png) |
| HSL | <code>\`hsl(H,S,L)\`</code> | <code>\`hsl(212, 92%, 45%)\`</code> | ![Screenshot of rendered GitHub Markdown showing how HSL value 212, 92%, 45% appears with a blue circle.](/assets/images/help/writing/supported-color-models-hsl-rendered.png) |
> [!NOTE]
> * A supported color model cannot have any leading or trailing spaces within the backticks.
> * The visualization of the color is only supported in issues, pull requests, and discussions.
## Links
You can create an inline link by wrapping link text in brackets `[ ]`, and then wrapping the URL in parentheses `( )`. You can also use the keyboard shortcut <kbd>Command</kbd>+<kbd>K</kbd> to create a link. When you have text selected, you can paste a URL from your clipboard to automatically create a link from the selection.
You can also create a Markdown hyperlink by highlighting the text and using the keyboard shortcut <kbd>Command</kbd>+<kbd>V</kbd>. If you'd like to replace the text with the link, use the keyboard shortcut <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd>.
`This site was built using [GitHub Pages](https://pages.github.com/).`
![Screenshot of rendered GitHub Markdown showing how text within brackets, "GitHub Pages," appears as a blue hyperlink.](/assets/images/help/writing/link-rendered.png)
> [!NOTE]
> {% data variables.product.github %} automatically creates links when valid URLs are written in a comment. For more information, see [AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls).
## Section links
{% data reusables.repositories.section-links %}
If you need to determine the anchor for a heading in a file you are editing, you can use the following basic rules:
* Letters are converted to lower-case.
* Spaces are replaced by hyphens (`-`). Any other whitespace or punctuation characters are removed.
* Leading and trailing whitespace are removed.
* Markup formatting is removed, leaving only the contents (for example, `_italics_` becomes `italics`).
* If the automatically generated anchor for a heading is identical to an earlier anchor in the same document, a unique identifier is generated by appending a hyphen and an auto-incrementing integer.
For more detailed information on the requirements of URI fragments, see [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax, Section 3.5](https://www.rfc-editor.org/rfc/rfc3986#section-3.5).
The code block below demonstrates the basic rules used to generate anchors from headings in rendered content.
```markdown
# Example headings
## Sample Section
## This'll be a _Helpful_ Section About the Greek Letter Θ!
A heading containing characters not allowed in fragments, UTF-8 characters, two consecutive spaces between the first and second words, and formatting.
## This heading is not unique in the file
TEXT 1
## This heading is not unique in the file
TEXT 2
# Links to the example headings above
Link to the sample section: [Link Text](#sample-section).
Link to the helpful section: [Link Text](#thisll-be-a-helpful-section-about-the-greek-letter-Θ).
Link to the first non-unique section: [Link Text](#this-heading-is-not-unique-in-the-file).
Link to the second non-unique section: [Link Text](#this-heading-is-not-unique-in-the-file-1).
```
> [!NOTE]
> If you edit a heading, or if you change the order of headings with "identical" anchors, you will also need to update any links to those headings as the anchors will change.
## Relative links
{% data reusables.repositories.relative-links %}
## Custom anchors
You can use standard HTML anchor tags (`<a name="unique-anchor-name"></a>`) to create navigation anchor points for any location in the document. To avoid ambiguous references, use a unique naming scheme for anchor tags, such as adding a prefix to the `name` attribute value.
> [!NOTE]
> Custom anchors will not be included in the document outline/Table of Contents.
You can link to a custom anchor using the value of the `name` attribute you gave the anchor. The syntax is exactly the same as when you link to an anchor that is automatically generated for a heading.
For example:
```markdown
# Section Heading
Some body text of this section.
<a name="my-custom-anchor-point"></a>
Some text I want to provide a direct link to, but which doesn't have its own heading.
(… more content…)
[A link to that custom anchor](#my-custom-anchor-point)
```
> [!TIP]
> Custom anchors are not considered by the automatic naming and numbering behavior of automatic heading links.
## Line breaks
If you're writing in issues, pull requests, or discussions in a repository, {% data variables.product.github %} will render a line break automatically:
```markdown
This example
Will span two lines
```
However, if you are writing in an .md file, the example above would render on one line without a line break. To create a line break in an .md file, you will need to include one of the following:
* Include two spaces at the end of the first line.
<pre>
This example&nbsp;&nbsp;
Will span two lines
</pre>
* Include a backslash at the end of the first line.
```markdown
This example\
Will span two lines
```
* Include an HTML single line break tag at the end of the first line.
```markdown
This example<br/>
Will span two lines
```
If you leave a blank line between two lines, both .md files and Markdown in issues, pull requests, and discussions will render the two lines separated by the blank line:
```markdown
This example
Will have a blank line separating both lines
```
## Images
You can display an image by adding <kbd>!</kbd> and wrapping the alt text in `[ ]`. Alt text is a short text equivalent of the information in the image. Then, wrap the link for the image in parentheses `()`.
`![Screenshot of a comment on a GitHub issue showing an image, added in the Markdown, of an Octocat smiling and raising a tentacle.](https://myoctocat.com/assets/images/base-octocat.svg)`
![Screenshot of a comment on a GitHub issue showing an image, added in the Markdown, of an Octocat smiling and raising a tentacle.](/assets/images/help/writing/image-rendered.png)
{% data variables.product.github %} supports embedding images into your issues, pull requests{% ifversion fpt or ghec %}, discussions{% endif %}, comments and `.md` files. You can display an image from your repository, add a link to an online image, or upload an image. For more information, see [Uploading assets](#uploading-assets).
> [!NOTE]
> When you want to display an image that is in your repository, use relative links instead of absolute links.
Here are some examples for using relative links to display an image.
| Context | Relative Link |
| ------ | -------- |
| In a `.md` file on the same branch | `/assets/images/electrocat.png` |
| In a `.md` file on another branch | `/../main/assets/images/electrocat.png` |
| In issues, pull requests and comments of the repository | `../blob/main/assets/images/electrocat.png?raw=true` |
| In a `.md` file in another repository | `/../../../../github/docs/blob/main/assets/images/electrocat.png` |
| In issues, pull requests and comments of another repository | `../../../github/docs/blob/main/assets/images/electrocat.png?raw=true` |
> [!NOTE]
> The last two relative links in the table above will work for images in a private repository only if the viewer has at least read access to the private repository that contains these images.
For more information, see [Relative Links](#relative-links).
### The Picture element
The `<picture>` HTML element is supported.
## Lists
You can make an unordered list by preceding one or more lines of text with <kbd>-</kbd>, <kbd>*</kbd>, or <kbd>+</kbd>.
```markdown
- George Washington
* John Adams
+ Thomas Jefferson
```
![Screenshot of rendered GitHub Markdown showing a bulleted list of the names of the first three American presidents.](/assets/images/help/writing/unordered-list-rendered.png)
To order your list, precede each line with a number.
```markdown
1. James Madison
2. James Monroe
3. John Quincy Adams
```
![Screenshot of rendered GitHub Markdown showing a numbered list of the names of the fourth, fifth, and sixth American presidents.](/assets/images/help/writing/ordered-list-rendered.png)
### Nested Lists
You can create a nested list by indenting one or more list items below another item.
To create a nested list using the web editor on {% data variables.product.github %} or a text editor that uses a monospaced font, like [{% data variables.product.prodname_vscode %}](https://code.visualstudio.com/), you can align your list visually. Type space characters in front of your nested list item until the list marker character (<kbd>-</kbd> or <kbd>*</kbd>) lies directly below the first character of the text in the item above it.
```markdown
1. First list item
- First nested list item
- Second nested list item
```
> [!NOTE]
> In the web-based editor, you can indent or dedent one or more lines of text by first highlighting the desired lines and then using <kbd>Tab</kbd> or <kbd>Shift</kbd>+<kbd>Tab</kbd> respectively.
![Screenshot of Markdown in {% data variables.product.prodname_vscode %} showing indentation of nested numbered lines and bullets.](/assets/images/help/writing/nested-list-alignment.png)
![Screenshot of rendered GitHub Markdown showing a numbered item followed by nested bullets at two different levels of nesting.](/assets/images/help/writing/nested-list-example-1.png)
To create a nested list in the comment editor on {% data variables.product.github %}, which doesn't use a monospaced font, you can look at the list item immediately above the nested list and count the number of characters that appear before the content of the item. Then type that number of space characters in front of the nested list item.
In this example, you could add a nested list item under the list item `100. First list item` by indenting the nested list item a minimum of five spaces, since there are five characters (`100. `) before `First list item`.
```markdown
100. First list item
- First nested list item
```
![Screenshot of rendered GitHub Markdown showing a numbered item prefaced by the number 100 followed by a bulleted item nested one level.](/assets/images/help/writing/nested-list-example-3.png)
You can create multiple levels of nested lists using the same method. For example, because the first nested list item has seven characters (`␣␣␣␣␣-␣`) before the nested list content `First nested list item`, you would need to indent the second nested list item by at least two more characters (nine spaces minimum).
```markdown
100. First list item
- First nested list item
- Second nested list item
```
![Screenshot of rendered GitHub Markdown showing a numbered item prefaced by the number 100 followed by bullets at two different levels of nesting.](/assets/images/help/writing/nested-list-example-2.png)
For more examples, see the [GitHub Flavored Markdown Spec](https://github.github.com/gfm/#example-265).
## Task lists
{% data reusables.repositories.task-list-markdown %}
If a task list item description begins with a parenthesis, you'll need to escape it with <kbd>\\</kbd>:
`- [ ] \(Optional) Open a followup issue`
For more information, see [AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists).
## Mentioning people and teams
You can mention a person or [team](/organizations/organizing-members-into-teams) on {% data variables.product.github %} by typing <kbd>@</kbd> plus their username or team name. This will trigger a notification and bring their attention to the conversation. People will also receive a notification if you edit a comment to mention their username or team name. For more information about notifications, see [AUTOTITLE](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications).
> [!NOTE]
> A person will only be notified about a mention if the person has read access to the repository and, if the repository is owned by an organization, the person is a member of the organization.
`@github/support What do you think about these updates?`
![Screenshot of rendered GitHub Markdown showing how the team mention "@github/support" renders as bold, clickable text.](/assets/images/help/writing/mention-rendered.png)
When you mention a parent team, members of its child teams also receive notifications, simplifying communication with multiple groups of people. For more information, see [AUTOTITLE](/organizations/organizing-members-into-teams/about-teams).
Typing an <kbd>@</kbd> symbol will bring up a list of people or teams on a project. The list filters as you type, so once you find the name of the person or team you are looking for, you can use the arrow keys to select it and press either tab or enter to complete the name. For teams, enter the @organization/team-name and all members of that team will get subscribed to the conversation.
The autocomplete results are restricted to repository collaborators and any other participants on the thread.
## Referencing issues and pull requests
You can bring up a list of suggested issues and pull requests within the repository by typing <kbd>#</kbd>. Type the issue or pull request number or title to filter the list, and then press either tab or enter to complete the highlighted result.
For more information, see [AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls).
## Referencing external resources
{% data reusables.repositories.autolink-references %}
## Uploading assets
You can upload assets like images by dragging and dropping, selecting from a file browser, or pasting. You can upload assets to issues, pull requests, comments, and `.md` files in your repository.
## Using emojis
You can add emoji to your writing by typing `:EMOJICODE:`, a colon followed by the name of the emoji.
`@octocat :+1: This PR looks great - it's ready to merge! :shipit:`
![Screenshot of rendered GitHub Markdown showing how emoji codes for +1 and shipit render visually as emoji.](/assets/images/help/writing/emoji-rendered.png)
Typing <kbd>:</kbd> will bring up a list of suggested emoji. The list will filter as you type, so once you find the emoji you're looking for, press **Tab** or **Enter** to complete the highlighted result.
For a full list of available emoji and codes, see [the Emoji-Cheat-Sheet](https://github.com/ikatyang/emoji-cheat-sheet/blob/master/README.md).
## Paragraphs
You can create a new paragraph by leaving a blank line between lines of text.
## Footnotes
You can add footnotes to your content by using this bracket syntax:
```text
Here is a simple footnote[^1].
A footnote can also have multiple lines[^2].
[^1]: My reference.
[^2]: To add line breaks within a footnote, prefix new lines with 2 spaces.
This is a second line.
```
The footnote will render like this:
![Screenshot of rendered Markdown showing superscript numbers used to indicate footnotes, along with optional line breaks inside a note.](/assets/images/help/writing/footnote-rendered.png)
> [!NOTE]
> The position of a footnote in your Markdown does not influence where the footnote will be rendered. You can write a footnote right after your reference to the footnote, and the footnote will still render at the bottom of the Markdown. Footnotes are not supported in wikis.
## Alerts
Alerts are a Markdown extension based on the blockquote syntax that you can use to emphasize critical information. On {% data variables.product.github %}, they are displayed with distinctive colors and icons to indicate the significance of the content.
Use alerts only when they are crucial for user success and limit them to one or two per article to prevent overloading the reader. Additionally, you should avoid placing alerts consecutively. Alerts cannot be nested within other elements.
To add an alert, use a special blockquote line specifying the alert type, followed by the alert information in a standard blockquote. Five types of alerts are available:
```markdown
> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
```
Here are the rendered alerts:
![Screenshot of rendered Markdown alerts showing how Note, Tip, Important, Warning, and Caution render with different colored text and icons.](/assets/images/help/writing/alerts-rendered.png)
## Hiding content with comments
You can tell {% data variables.product.github %} to hide content from the rendered Markdown by placing the content in an HTML comment.
```text
<!-- This content will not appear in the rendered Markdown -->
```
## Ignoring Markdown formatting
You can tell {% data variables.product.github %} to ignore (or escape) Markdown formatting by using <kbd>\\</kbd> before the Markdown character.
`Let's rename \*our-new-project\* to \*our-old-project\*.`
![Screenshot of rendered GitHub Markdown showing how backslashes prevent the conversion of asterisks to italics.](/assets/images/help/writing/escaped-character-rendered.png)
For more information on backslashes, see Daring Fireball's [Markdown Syntax](https://daringfireball.net/projects/markdown/syntax#backslash).
> [!NOTE]
> The Markdown formatting will not be ignored in the title of an issue or a pull request.
## Disabling Markdown rendering
{% data reusables.repositories.disabling-markdown-rendering %}
## Further reading
* [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/)
* [AUTOTITLE](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/about-writing-and-formatting-on-github)
* [AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting)
* [AUTOTITLE](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github)

View file

@ -0,0 +1,6 @@
---
tags:
- "#private"
aliases:
- this is really important
---

View file

@ -0,0 +1,9 @@
This is your new *vault*.
Make a note of something, [[create a link]], or try [the Importer](https://help.obsidian.md/Plugins/Importer)!
When you're ready, delete this note and make the vault your own.
[[Test]]
[[Me]]

View file

@ -9,22 +9,23 @@
}
$element-selectors: (
".data-link-text[data-link-tags*='#private']": 1, // Link items
".dataview tr:has(a[data-link-tags*='#private'])": 1, // dataview tables
".suggestion-item:has([data-link-tags*='#private'])": 1, // Search results
".tree-item:has([data-link-tags*='#private']) .search-result-file-match": 1,
".private-mode-blur-links-too" ".data-link-text[data-link-tags*='#private']:not(.tree-item-inner,.suggestion-title)" 1, // Link items
".private-mode-blur-links-too" ".dataview tr:has(a[data-link-tags*='#private'])" 1, // dataview tables
".private-mode-blur-links-too" ".suggestion-item:has([data-link-tags*='#private'])" 1, // Search results
".private-mode-blur-links-too" ".nav-file-title:has([data-link-tags*='#private'])" 1, // "Files" tree
".private-mode-blur-links-too" ".search-result:has([data-link-tags*='#private'])" 1, // Sidebar search
".workspace-tabs:has(.is-active [data-link-tags*='#private']) .inline-title": 1,
".workspace-tabs:has(.is-active [data-link-tags*='#private']) .cm-line": 1,
".workspace-tabs:has(.is-active [data-link-tags*='#private']) .view-content :is(.metadata-property)": 1,
".workspace-tabs:has(.is-active [data-link-tags*='#private']) .view-content :is(img, video, svg, canvas)": 4,
".workspace-tabs:has(.is-active [data-link-tags*='#private']) .markdown-preview-view :is(li, p, h1, h2, h3, h4, h5)": 1,
".workspace-tabs:has(.is-active [data-link-tags*='#private']) .cm-embed-block": 1,
".workspace-tabs:has(.is-active [data-link-tags*='#private']) .internal-embed": 1,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .inline-title" 1,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .cm-line" 1,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .view-content :is(.metadata-property)" 1,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .view-content :is(img, video, svg, canvas)" 4,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .markdown-preview-view :is(li, p, h1, h2, h3, h4, h5)" 1,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .cm-embed-block" 1,
"" ".workspace-tabs:has(.is-active [data-link-tags*='#private']) .internal-embed" 1,
);
@each $selector, $m in $element-selectors {
#{$selector} {
@each $bodySelector, $selector, $m in $element-selectors {
body#{$bodySelector} #{$selector} {
filter: blur(calc(var(--blur-level) * #{$m}));
}
}
@ -32,13 +33,16 @@ $element-selectors: (
$reveal-templates: (
"" ".inline-title:focus-within",
"" ".cm-active",
"body.private-mode-reveal-on-hover " ":hover",
"body.private-mode-reveal-all "
".private-mode-reveal-on-hover" ".is-selected",
".private-mode-reveal-on-hover" ".has-focus",
".private-mode-reveal-on-hover" ":has(.has-focus)",
".private-mode-reveal-on-hover" ":hover",
".private-mode-reveal-all"
);
@each $selector, $m in $element-selectors {
@each $prefix, $suffix in $reveal-templates {
#{$prefix}#{$selector}#{$suffix} {
@each $bodySelector, $selector, $m in $element-selectors {
@each $bodyPrefix, $suffix in $reveal-templates {
body#{$bodyPrefix}#{$bodySelector} #{$selector}#{$suffix} {
filter: unset !important;
}
}
@ -52,10 +56,11 @@ $reveal-templates: (
body:not(.private-mode-reveal-all) .callout[data-callout="private"]:not(.is-collapsed) > .callout-content {
filter: blur(0.5rem);
}
body:not(.private-mode-reveal-all) .callout[data-callout="private"]:not(.is-collapsed) > .callout-content:hover {
body.private-mode-reveal-on-hover .callout[data-callout="private"]:not(.is-collapsed) > .callout-content:hover {
filter: none;
}
/* screenshare protection */
body.private-mode-unprotected-screenshare .status-bar-item.plugin-private-mode {
color: var(--text-error);
}

View file

@ -10,5 +10,7 @@
"1.1.4": "1.6.0",
"1.1.5": "1.6.0",
"1.1.6": "1.6.0",
"1.1.7": "1.6.0"
"1.1.7": "1.6.0",
"1.1.8": "1.6.0",
"1.2.0": "1.6.0"
}