Skip to content

Commit

Permalink
add various fixes, change .gitignore to persist .hotreload file, add …
Browse files Browse the repository at this point in the history
…some filechanges resulting from obsidian update
  • Loading branch information
Richardsl committed Jun 4, 2024
1 parent 8f28069 commit 1de7833
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 210 deletions.
18 changes: 14 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
# npm
node_modules

# ignore .obsidian folder in root directory of repo. it sometimes gets created by mistake.
.obsidian
!EXAMPLE_VAULT/.obsidian

# Don't include the compiled main.js file in the repo.
# They should be uploaded to GitHub releases instead.
/main.js
Expand All @@ -21,10 +25,16 @@ data.json
# Exclude macOS Finder (System Explorer) View States
.DS_Store

# example vault files
EXAMPLE_VAULT/.obsidian/plugins/*
# exclude workspace.json, as it clutters up the git log as its contents change frequently
EXAMPLE_VAULT/.obsidian/workspace.json

# exclude plugin contents
EXAMPLE_VAULT/.obsidian/plugins/*
!EXAMPLE_VAULT/.obsidian/plugins/hot-reload
# include heatmap-calendar plugin folder, but ignore contents except for .hotreload file
!EXAMPLE_VAULT/.obsidian/plugins/heatmap-calendar
EXAMPLE_VAULT/.obsidian/plugins/heatmap-calendar/*
!EXAMPLE_VAULT/.obsidian/plugins/heatmap-calendar/.hotreload



# exclude workspace.json
EXAMPLE_VAULT/.obsidian/workspace.json
1 change: 0 additions & 1 deletion .obsidian/app.json

This file was deleted.

3 changes: 0 additions & 3 deletions .obsidian/appearance.json

This file was deleted.

29 changes: 0 additions & 29 deletions .obsidian/core-plugins-migration.json

This file was deleted.

20 changes: 0 additions & 20 deletions .obsidian/core-plugins.json

This file was deleted.

1 change: 0 additions & 1 deletion .obsidian/hotkeys.json

This file was deleted.

143 changes: 0 additions & 143 deletions .obsidian/workspace.json

This file was deleted.

4 changes: 3 additions & 1 deletion EXAMPLE_VAULT/.obsidian/appearance.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
"theme": "system",
"translucency": false,
"accentColor": "",
"enabledCssSnippets": []
"enabledCssSnippets": [
"heatmap_styleAlternatingMonths"
]
}
4 changes: 3 additions & 1 deletion EXAMPLE_VAULT/.obsidian/core-plugins-migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@
"file-recovery": false,
"publish": false,
"sync": false,
"canvas": true
"canvas": true,
"properties": false,
"bookmarks": true
}
2 changes: 1 addition & 1 deletion EXAMPLE_VAULT/.obsidian/core-plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"daily-notes",
"command-palette",
"editor-status",
"starred",
"bookmarks",
"workspaces"
]
Empty file.
2 changes: 1 addition & 1 deletion EXAMPLE_VAULT/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- Enable **Settings** -> **Dataview** -> **Enable Javascript Queries**

**Hover Preview**
- Enable **Settings** -> **Core Plugins** -> **Page Preview** for hover preview to work.
- Enable **Settings** -**> **Core Plugins** -> **Page Preview** for hover preview to work.
- install **Community plugins** -> **Metatable** in order to preview frontmatter aswell.

see [github repo](https://github.com/Richardsl/heatmap-calendar-obsidian#readme) for more info
Expand Down
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ You can customize the colors of the heatmap by supplying a color array to **cale
 

<details>
<summary>More</summary>
<summary>More color options</summary>

&nbsp;

Expand Down Expand Up @@ -189,8 +189,19 @@ Dataview's time variables are supported without any conversion, as they return m
&nbsp;

## Development (Windows):
```npm run dev``` - will start TS to JS transpiler and automatically copy the JS/CSS/manifest files to the example vault whenever they are modified.
Installing https://github.com/pjeby/hot-reload is recommended to avoid restarting obsidian after every change, but remember to add a **.hot-reload** file to EXAMPLE_VAULT/.obsidian/plugins/heatmap-calendar/

```npm run dev``` - will start an automatic TS to JS transpiler and automatically copy the generated JS/CSS/manifest files to the example vault when modified (Remember to run ```npm install``` first).

After the files have been transpiled, the **hot-reload plugin** (https://github.com/pjeby/hot-reload) then reloads Obsidian automatically.
Hot-reload is installed in the example vault by default. its used to avoid restarting obsidian after every change to code.
*(remember to add an empty *.hotreload* file to "EXAMPLE_VAULT/.obsidian/plugins/heatmap-calendar/" if not already present, as this tells hot-reload to watch for changes)*


```npm run build``` generates the files ready for distribution.

&nbsp;

Tip: ```ctrl-shift-i``` opens the devtools inside Obsidian.

&nbsp;

Expand Down
Binary file removed colors_cssSnippetsBeforeAfterEmptyDays.png
Binary file not shown.
Binary file modified github-images/colors_cssSnippetsBeforeAfterEmptyDays.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1de7833

Please sign in to comment.