Compare commits

...

768 Commits

Author SHA1 Message Date
Riccardo Ferretti
f1b15eceed v0.22.2 2023-04-20 18:25:37 -07:00
Riccardo Ferretti
96f410a453 Prepare for next release 2023-04-20 18:25:06 -07:00
Riccardo Ferretti
95a14d5dd6 Create blocks markdown parser only once 2023-04-20 18:25:00 -07:00
Riccardo
10905fd703 Various improvements in tree view panels (#1201)
* Show note block in panels on hover preview
* Show tag references within tag explorer
* Improved structure of view related commands
* Refactored grouped resources tree data provider and added support for placeholders filter
  - Consolidated the naming of the accessory commands
  - Consolidated the management of the state/context related to grouping
  - Removed group-by config, simply restore the last used setting
  - Added filter to only show the placeholders related to the open file
* Refreshing placeholders when changing editor and filtering by active document
2023-04-21 03:20:22 +02:00
Riccardo Ferretti
f4eaf5c5ff v0.22.1 2023-04-15 13:39:00 -07:00
Riccardo Ferretti
b4830eaf30 Prepare for next release 2023-04-15 13:38:28 -07:00
Jim Graham
0cda6aed50 Allow for # alone to trigger tag completion (#1192)
* Allow for `#` alone to trigger tag completion

In #1183, I reused [HASHTAG_REGEX](83a90177b9/packages/foam-vscode/src/core/utils/hashtags.ts (L2-L3))
to validate the tag line when the `CompletionProvider` was triggered.

I wanted to prevent this:

```markdown
 # This is a Markdown header
```

but using the `HASHTAG_REGEX` had the side effect of requiring an
_additional_ character to trigger the completion provider.

```markdown

1. #p <-- triggers completion
2. #  <-- does not trigger
3. #_ (space) <-- does not trigger
```
both 1. and 2. should have triggered.

To fix, I use a slightly different regex that uses a negative lookahead
to ensure that the `#` is not followed by a space. I also added spec
cases to cover this situation.

* Update regex for more robust detection of tags

Update the regex used for more robust detection of tags. Replace the
negative lookahead assertion `\s` with `[ \t]` (allow for `\n`), and
add `#` to the class so that `##` is ignored.

Attempted to add the negation `^[0-9p{L}p{Emoji}p{N}-/]` to the
negative look ahead. This was to exclude items like `#$`, `#&` that
can't be tags. However my regex-fu was insufficient.

Instead, if the regex match is to a single `#`, ensure it is the
character to the left of the cursor. Example

  `this is text #%|`

where the `|` represents the cursor. The `TAG_REGEX`
will match the `#` at index 13. However since the cursor is at 15, the
Completion provider will not run.

Update the tests to cover these situations and add them all to a sub-
`describe` block labeled by the bug issue number #1189

* Use regex groups to determine match position

For the case like `here is #my-tag and now # |`, where `|` is the cursor
position after a trailing space, the match on `#my-tag` would allow tag
completion at the cursor position.

Ensure that the last regexp match group covers up to the the cursor
position. This also handles the case of `#$` because the match will only
be `#`.
2023-04-15 22:34:55 +02:00
Riccardo Ferretti
89c9bb5a7f v0.22.0 2023-04-15 10:47:20 -07:00
Riccardo Ferretti
941e870a65 Prepare for 0.22.0 2023-04-15 10:47:06 -07:00
Riccardo
c6655c33ff Fixed #1193 and added tests (#1197) 2023-04-15 19:31:48 +02:00
Riccardo
c94fb18f8a Resource tree items improvements (#1196)
* Consolidated common tree view code and migrated placeholder panel
* Migrated backlink panel to new pattern
* Tweaked code and fixed tests
2023-04-15 19:21:24 +02:00
Riccardo
cbd55bac74 Fix #1134 - added support for deep tag hierarchy (#1194) 2023-04-15 02:22:12 +02:00
Riccardo Ferretti
83a90177b9 v0.21.4 2023-04-14 10:39:05 -07:00
Riccardo Ferretti
37aec28af6 Prepare for next release 2023-04-14 10:38:46 -07:00
Riccardo Ferretti
447f7fc068 Fix for #1188 and #1190 - escape backslash in YAML property of generated daily note template 2023-04-14 10:37:37 -07:00
Riccardo Ferretti
ad1243665a Removed unnecessary log message 2023-04-13 17:23:38 -07:00
Riccardo Ferretti
f07de73bc4 v0.21.3 2023-04-12 17:05:49 -07:00
Riccardo Ferretti
c431ccfb62 Preparation for next release 2023-04-12 17:05:25 -07:00
Riccardo Ferretti
f31ef897cc Fix #1188 - Fixed path relative to workspace root 2023-04-12 17:04:23 -07:00
Riccardo Ferretti
7a5f45c0ce v0.21.2 2023-04-11 13:51:30 -06:00
Riccardo Ferretti
df32d9e708 Preparation for next release 2023-04-11 13:51:13 -06:00
Riccardo Ferretti
b3d4691bfa Fix #1170 newNotePath not always working
This commit fixes an issue in the note creation flow where a template is used. Before the fix, when a template is present, Foam would force an absolute path resolution instead of delegating that step to the note creation. After the fix this step is removed and the resolution is left to the note creation code
2023-04-11 13:45:14 -06:00
allcontributors[bot]
f5260f7d3f add jimgraham as a contributor for code (#1185)
* update docs/index.md [skip ci]

* update readme.md [skip ci]

* update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-04-09 03:36:21 +02:00
Jim Graham
9b4b7ec84d Use the HASHTAG_REGEX to identify tags (#1183)
Instead of a generic `TAG_REGEX`, use the more specific `HASHTAG_REGEX` to identify a tag when launching tab completion.

Also add a new test case with the issue number in the test case description
2023-04-09 03:35:48 +02:00
Riccardo Ferretti
52b7f86a9f Updated TOC in FAQ docs 2023-03-22 10:56:11 -06:00
Joe Taber
2db7060124 Add GH Action workflow to sync user docs to template repo on change (#1180)
Also strips wikilinks during docs sync
fixes #1177
2023-03-22 17:47:22 +01:00
Riccardo
a4f04b3b6b Fixed temporary template generated (#1175) 2023-02-26 23:44:09 +01:00
Riccardo
b5a8a5d7c7 Chore - improved Text Edit API (#1174) 2023-02-26 23:37:50 +01:00
Riccardo
f5a29e431c Fix 1168 - relative path in embed (#1173)
* added isEmbed flag to ResourceLink
* Added tests for new embed support
2023-02-26 23:02:16 +01:00
Riccardo Ferretti
5a7a1ba89f v0.21.1 2023-02-24 17:32:15 -06:00
Riccardo Ferretti
b054bafc78 Preparation for next release 2023-02-24 17:31:55 -06:00
Riccardo
8acb60253a fix #1171 - add extension to notes created from placeholders (#1172) 2023-02-24 23:45:44 +01:00
allcontributors[bot]
3c69508dcb add Skakerman as a contributor for code (#1166)
* update docs/index.md [skip ci]

* update readme.md [skip ci]

* update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-02-16 21:32:28 +01:00
Scott Akerman
a368be9b47 Fix Previews of Embedded Sections (#1162) 2023-02-16 21:31:48 +01:00
Riccardo Ferretti
b1f76bb653 v0.21.0 2023-02-16 14:20:49 -06:00
Riccardo Ferretti
d4bc16b9bd Preparation for next release 2023-02-16 14:20:35 -06:00
Riccardo
882b0b6012 Use filter in open-resource command (#1161)
* Added title param in create-note command

* Added utility functions for commands

* Use create-note command when dealing with placeholders

* Updated open-resource command to new pattern

* Pass workspace.isTrusted to createFilter

* Fixed bug when finding absolute paths in workspace without providing basedir

* open-resource command can also receive `uri` param to skip filtering step

* added tests

* added docs
2023-02-15 22:53:32 +01:00
Riccardo Ferretti
048623d910 v0.20.8 2023-02-10 17:10:38 -06:00
Riccardo Ferretti
f2fbe927ae Preparation for next release 2023-02-10 17:10:22 -06:00
Riccardo
d0ee71be1b Updated a bunch of dependencies (#1160)
* Updated typescript and vscode engine version to support workspace trust

* updates tsdx to dts, and updated a other deps too

* updated eslint configuration

* Updated node version

* Update lerna

* Updated github action configuration

* removed glob library
2023-02-11 00:08:23 +01:00
Riccardo
2a14dc0c57 Added resource filters (#1158)
* Added note filter and a few tests

* Added expression for filters and trusted workspace support

* Consolidate `include` and `exclude` into `path` parameter

* Added documentation
2023-02-10 12:17:42 +01:00
Riccardo Ferretti
745acbabd3 Fixed VS Code installs badge 2023-02-01 13:33:33 +01:00
Riccardo Ferretti
c226cddcd8 v0.20.7 2023-02-01 13:23:06 +01:00
Riccardo Ferretti
1b0d3239b5 Preparation for next release 2023-02-01 13:22:48 +01:00
Riccardo Ferretti
cddf3bc769 Removed unnecessary activation events 2023-01-31 21:50:00 +01:00
Riccardo Ferretti
bd158e9b8e Partial fix to #1143 - Inform the user that links are not updated on directory rename 2023-01-31 21:49:24 +01:00
Riccardo Ferretti
5e648ca9c6 v0.20.6 2023-01-21 14:53:16 +01:00
Riccardo Ferretti
cc53f995f0 Preparation for next release 2023-01-21 14:53:01 +01:00
Riccardo
44fea21bc7 Support for creating new note in current dir or root dir (#1142)
* Added support for creating new note in current dir or root dir
* Added tests
2023-01-14 23:30:55 +01:00
Liu YongLiang
2b70e49e95 Update contribution-guide.md with node version and fix broken link (#1136)
* Update contribution-guide.md
2023-01-13 10:23:11 +01:00
Daniel Wang
f5c4cba799 Fix #920: Links in Markdown Preview not jumping to sections (#1135)
Fixed wikilink section linking
2023-01-13 10:22:11 +01:00
Riccardo
e06f46e393 Update engines: node to 16 and vscode to 1.70.0 (#1140) 2023-01-11 20:02:49 +01:00
Liu YongLiang
4ce51673cc Update build-vs-assemble.md (#1137) 2023-01-11 19:22:21 +01:00
allcontributors[bot]
4db9409679 add tlylt as a contributor for doc (#1139)
* update docs/index.md [skip ci]

* update readme.md [skip ci]

* update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-01-11 19:21:57 +01:00
Liu YongLiang
0e6b9f8c83 Add markup-converter recipe (#1138) 2023-01-11 19:21:17 +01:00
Riccardo Ferretti
7b4a56fe69 v0.20.5 2023-01-04 13:27:48 +01:00
Riccardo Ferretti
aa734e9b9b Prepare for next release 2023-01-04 13:27:32 +01:00
Riccardo Ferretti
3f7d235b9f Fixed extension badge link 2023-01-04 13:25:04 +01:00
Daniel Wang
0b879c0714 Adjusted orphan, placeholder, tags-explorer panel title logic (#1131) 2023-01-04 13:23:45 +01:00
Riccardo Ferretti
8b7400c20f v0.20.4 2023-01-04 13:07:17 +01:00
Riccardo Ferretti
d2feee8c75 Preparation for next release 2023-01-04 13:07:02 +01:00
allcontributors[bot]
2113705fb6 add badsketch as a contributor for code (#1130)
* update docs/index.md [skip ci]

* update readme.md [skip ci]

* update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-01-03 11:16:46 +01:00
Daniel Wang
4758923188 Feat #903: Added support for emoji tags (#1125)
* Added support for emoji tags
2023-01-03 11:13:12 +01:00
Riccardo Ferretti
275028ffa5 v0.20.3 2022-12-19 19:59:31 +01:00
Riccardo Ferretti
8b425ff420 Preparation for next release 2022-12-19 19:59:04 +01:00
Numan Zaheer Ahmed
64638868c0 Fix minor typo in frequently-asked-questions.md (#1121) 2022-12-11 16:32:30 +01:00
Riccardo Ferretti
7a2756eb1d Adding number of entries in title for orphan, placeholder, tag treeviews 2022-12-04 18:14:01 +01:00
Riccardo Ferretti
540371bf96 Setting prettier as default formatter for typescript 2022-12-04 18:12:03 +01:00
allcontributors[bot]
42b32103f5 add jonathanpberger as a contributor for doc (#1114)
* update docs/index.md [skip ci]

* update readme.md [skip ci]

* update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-11-28 17:55:37 +01:00
jonathan berger
1d264dcb22 Add mention of FOAM_DATE_WEEK to documentation. (#1113)
Because it was added in code, but hard to search.

Co-authored-by: JPB <jonathan@ltmp.co>
2022-11-28 17:54:08 +01:00
allcontributors[bot]
7f8c58084b add sn3akiwhizper as a contributor for doc (#1109)
* update docs/index.md [skip ci]

* update readme.md [skip ci]

* update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-11-22 22:09:42 +01:00
sn3akiwhizper
6b2dda4a71 Documentation updates and cleaning (#1108)
* fixing some unmatched links, daily-note path note, start graphviz/tags/properties clarification

fixed links that didn't actually link to their target, add discussion about creating daily-notes in path based off date, then clarifying notes about styling graph viz and tags while enhancing the note properties descriptions by describing how properties are described and which properties are custom, which are foam-specific, and which are foam-template-specific

* add filter view, default variables to graphviz, and viewing tags in graphviz

graphviz: discuss filter view, add all changeable variables to graph style example, tags: describe viewing tags in the graphviz

* add small note about learning yaml

* last push fixing up some todos

* making recommended changes from PR request
2022-11-22 22:09:04 +01:00
Riccardo
a6cb50f3d6 Fix #907: use definition provider for resource links, link provider for placeholder links (#1106) 2022-11-14 00:34:52 +01:00
Riccardo Ferretti
09c2198928 fixed readme and docs 2022-11-12 17:19:00 +01:00
Riccardo Ferretti
431da1b385 docs: add Lloyd-Jackman-UKPL as a contributor for doc 2022-11-12 17:10:36 +01:00
Lloyd Jackman
57e0621c24 Added open source doc (#1102)
* Added open source doc
2022-11-11 15:22:05 +01:00
Riccardo Ferretti
ebd1008215 v0.20.2 2022-10-26 22:59:12 +02:00
Riccardo Ferretti
0df958c3a4 Preparation for next release 2022-10-26 22:58:31 +02:00
Riccardo Ferretti
14709313ae fix #1094: use default template when none is provided 2022-10-26 22:55:12 +02:00
Riccardo Ferretti
ff2dd23918 Refactored grouped resource tree data provider to use new matcher 2022-10-26 19:18:13 +02:00
Riccardo Ferretti
66e74966ee removed unused asset 2022-10-25 22:06:29 +02:00
Riccardo Ferretti
9b022d0c61 renamed Create Note command 2022-10-25 21:59:12 +02:00
Riccardo Ferretti
e1b301814e removed unused deps 2022-10-25 21:58:31 +02:00
Riccardo Ferretti
2010d8d51e removed unused document 2022-10-25 21:52:47 +02:00
Riccardo Ferretti
22fa977c9b removing unnecessary files from extension bundle 2022-10-25 21:51:46 +02:00
allcontributors[bot]
285293ec23 add elgirafo as a contributor for doc (#1093)
* update docs/index.md [skip ci]

* update readme.md [skip ci]

* update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-10-25 09:09:54 +02:00
luca
6497f527ca Updated FAQ (#1092)
Added an additional answer regarding publishing foam notes with graph view.
2022-10-25 09:09:17 +02:00
Riccardo
689c167384 Bootstrap improvements and glob dependency removal (#1084)
* refactored relationship between workspace and providers, plus using VS Code for globbing
* glob dependency is now only for testing
2022-10-19 23:30:50 +02:00
Riccardo Ferretti
18a2d76139 v0.20.1 2022-10-13 18:56:04 +02:00
Riccardo Ferretti
722bef4257 Preparation for next release 2022-10-13 18:53:16 +02:00
Riccardo
8fe869223d Improved support for globs in multiroot workspace (#1083)
* Added path util to resolve absolute path from multiple base directories
* Better support for multiple roots in include/ignore globs
* URI.asAbsolutePath to use path utils
* Lint
2022-10-13 18:49:07 +02:00
allcontributors[bot]
1a961aac70 add Dominic-DallOsto as a contributor for code (#1082)
* update docs/index.md [skip ci]

* update readme.md [skip ci]

* update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-10-12 17:36:27 +02:00
Dominic D
81dacef2fe Clicking the placeholder tooltip asks for template for new note (#1061)
* Add a hover tooltip to placeholder links offering to create a new note from template
* Clicking the placeholder tooltip asks for template for new note
* Create new note from template using `CREATE_NOTE` command
* Update tests
2022-10-12 17:35:34 +02:00
Carlo Bonamico
92932cd004 Update recommended-extensions.md (#1079)
Referenced Excalidraw support
2022-10-10 15:28:09 +02:00
Riccardo Ferretti
1f6f8fd720 fix #1073 - improved support for daily note folder in multiroot workspaces 2022-09-30 22:00:36 +02:00
Riccardo Ferretti
507699924f v0.20.0 2022-09-30 19:49:56 +02:00
Riccardo Ferretti
5d1fb2593b Preparation for next release 2022-09-30 19:49:31 +02:00
Riccardo Ferretti
6012cc1b64 Updated docs for creating new notes 2022-09-30 19:43:56 +02:00
Riccardo Ferretti
36f1b8af9e Code lint 2022-09-30 19:32:05 +02:00
Riccardo
6ac9f6d229 Added "create note" command (#1076)
* Added create-note command and refactored some template code

* Added tests

* Added uri resolution logic across multiple folders

* Deprecating create-note-from-default-template command, it is now replaced by the new and more flexible create-note command (which still has the same defaults)
2022-09-30 19:14:24 +02:00
Riccardo Ferretti
3ce4529232 Removed '+' as date snippet trigger 2022-09-27 11:47:18 +02:00
Riccardo Ferretti
d3b8e66b78 Improved attachment support (fixes #915)
- can now configure list of extensions to be treated as attachments
- improved extension matching
2022-09-26 19:11:22 +02:00
Riccardo Ferretti
836623257c Fixed issue when starting Foam without open workspace (fixes #908) 2022-09-26 18:45:50 +02:00
Riccardo Ferretti
27f2bc4050 Support for opening non-text files via link (fixes #915) 2022-09-26 18:45:02 +02:00
Riccardo Ferretti
5a5f3b1ef0 dataviz: simple clicking open target note 2022-09-15 18:08:08 +02:00
Riccardo Ferretti
d374c51e93 fix #1070: also open images/attachments from graph 2022-09-15 18:07:47 +02:00
Riccardo Ferretti
f3a242251b Updated spell checking documentation (#1068) 2022-09-13 12:18:35 +02:00
Riccardo Ferretti
3d6f98351f v0.19.5 2022-09-01 13:11:11 +02:00
Riccardo Ferretti
970c30f08c Preparation for next release 2022-09-01 13:10:41 +02:00
Riccardo Ferretti
8556982b17 #1056: by default don't show images and attachments in graph view 2022-09-01 13:06:20 +02:00
Matthias Thym
1ab9520c5c Fix link to tag explorer in readme (#1060) 2022-09-01 12:34:38 +02:00
Riccardo
2a72bde111 Use note title in link completion (#1059)
* added setting for completion label

* added alias support

* Disable extra commit characters when automatically adding an alias

* added tests
2022-08-20 00:29:08 +02:00
Riccardo Ferretti
2385bd75b5 Keep extension for attachments when generating references 2022-08-19 16:43:49 +02:00
Riccardo
53d2e7aaed refactor: moved panel modules in own directory (#1055) 2022-08-18 17:18:03 +02:00
allcontributors[bot]
48c13ef400 docs: add dmurph as a contributor for code (#1054)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-08-17 23:47:32 +02:00
Riccardo
3ab30547eb Add FOAM_DATE_WEEK variable (#1053)
* Update variable-resolver.ts to include week number
* Added tests

Co-authored-by: Daniel Murphy <danielmurphy161@gmail.com>
2022-08-17 23:46:14 +02:00
Riccardo Ferretti
48c4dbf4c4 v0.19.4 2022-08-07 18:50:35 +02:00
Riccardo Ferretti
4715bbc2f5 Prepare for next release 2022-08-07 18:50:03 +02:00
Riccardo Ferretti
1bedbf2191 fix #1052 - solved issue with note embed in preview 2022-08-07 18:49:14 +02:00
allcontributors[bot]
9145d5a476 docs: add readingsnail as a contributor for doc (#1051)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-08-06 10:51:15 +02:00
allcontributors[bot]
fa6b5aae00 docs: add infogulch as a contributor for doc (#1050)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-08-06 10:50:04 +02:00
Riccardo Ferretti
753d4a9a67 fixed changelog 2022-08-04 16:02:55 +02:00
Riccardo Ferretti
66200e8e4b v0.19.3 2022-08-04 16:00:19 +02:00
Riccardo Ferretti
d45e0cba4b minor tweak to release workflow 2022-08-04 15:59:51 +02:00
Riccardo Ferretti
c977c7eecd fix #1036 embed images anywhere in the workspace 2022-08-04 15:47:48 +02:00
Riccardo Ferretti
b829f14fd7 v0.19.2 2022-08-04 15:39:28 +02:00
Riccardo Ferretti
d93d89cb88 Prepare for release 2022-08-04 15:35:28 +02:00
Riccardo Ferretti
f8540b888e fixed links to documentation 2022-08-04 15:30:18 +02:00
Riccardo Ferretti
59205c29da reorganized preview code 2022-07-29 17:55:41 +02:00
Riccardo Ferretti
a22914d983 fix #1042 - filter out invalid chars from file name when creating new file from template 2022-07-28 18:21:43 +02:00
Joe Taber
72694ad201 Reorganize docs folder; isolate dev docs and user docs; integrate foam-template docs (#1031)
* Reorganize docs folder; isolate dev docs and user docs; integrate foam-template docs

* Rename how-to to getting-started

* Fixup all references

* Fix contribution-guide.md

* Fix asset references

* Fix user/index.md

* Spelling is good.

Thanks @DrakeWhu

* Add note about how to wite docs for foam
2022-07-26 17:09:07 +02:00
Riccardo
16269c4c4d Added support for angle links (#1044)
fixes #1039
2022-07-26 14:25:48 +02:00
Riccardo Ferretti
7cff13e056 v0.19.1 2022-07-11 16:28:13 +02:00
Riccardo Ferretti
53c1a79ddd Preparation for next release 2022-07-11 16:27:35 +02:00
Riccardo
a840853666 Added cache for markdown parser (#1030)
* Added cache for the markdown parser
* Using lru-cache package to manage cache
* Passing parser around explicitely in provider and bootstrap
2022-07-11 16:25:53 +02:00
Riccardo Ferretti
47842cb618 Changed Logger.info to Logger.debug 2022-07-10 23:45:16 +02:00
Riccardo
455124513c Remove Resource.source property (#1029)
Removed resource.source property:
* removed usage of resource.source.text
* removed usage of resource.source.eol
* removed usage of resource.source.contentStart
* removed usage of resource.source.end
* removed resource.source

Small change in provider set up:
* added IWatcher interface
* changed fs watcher set up
2022-07-09 19:36:32 +02:00
Riccardo
1e00bbe8bd Moved commands in own directory (#1028)
Commands refactoring:
* moved commands in own directory
* split one command per file 
* added "update graph" command
* renamed date-snippet file (before it included a combination of commands and snippet completion)

Also some test cleanup:
* made tests about note renaming/sync more reliable
* improved clean up between tests
* improved reporting in test runs
* fixed exit on failure behavior to surface exit code to CI
2022-07-09 11:16:51 +02:00
Riccardo Ferretti
dda14ba9e7 fixed publish script 2022-07-07 17:07:10 +02:00
Riccardo Ferretti
129482a43e v0.19.0 2022-07-07 17:03:03 +02:00
Riccardo Ferretti
0c1c4da154 Preparation for next release 2022-07-07 17:02:38 +02:00
Riccardo
7f4b700b21 Support for attachments (#1027)
* Added attachment provider

* distinguish attachment and image types

* Added support for embeding images/attachments

* Added setting to decide whether to show notes in container in preview panel
2022-07-07 16:59:56 +02:00
Riccardo Ferretti
686e05ed25 Added icons for view panels (#1024) 2022-07-07 11:00:50 +02:00
Riccardo
b2c7ecbb3d Support for opening daily note for other days (#1026)
Co-authored-by: Alper Çugun <github@alper.nl>
2022-07-07 10:59:59 +02:00
Riccardo Ferretti
2c643e0c63 v0.18.5 2022-06-29 19:32:25 +02:00
Riccardo Ferretti
3b33d3d696 Preparation for next release 2022-06-29 19:31:56 +02:00
allcontributors[bot]
87633e68b1 docs: add lingyv-li as a contributor for code (#1022)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-06-28 14:40:00 +02:00
Larry Li
6c7b558f36 Support alias yaml property (#1014) 2022-06-28 14:38:33 +02:00
Larry Li
12037704d7 Add request timeout on CI jobs (#1018) 2022-06-21 09:29:47 +02:00
Larry Li
e549fb8c21 Bundle js release with esbuild (#1015) 2022-06-21 09:29:16 +02:00
Riccardo Ferretti
ac7d3243c4 #711 removed reference to non existing file 2022-06-19 22:42:25 +02:00
bunschot
748df5e352 Update readme.md (#1011)
In order to be able to use the foam template you need to be logged in on GitHub, else the generate page  yields a 404
2022-06-13 12:45:10 +02:00
allcontributors[bot]
dcd46f1378 docs: add phelma as a contributor for doc (#1010)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-06-09 08:58:32 +02:00
Phil Helm
f9f751a27a Add GitDoc instruction for auto git syncing (#1009) 2022-06-09 08:57:54 +02:00
allcontributors[bot]
0764da0dd6 docs: add joshdover as a contributor for code (#1008)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-06-08 14:12:40 +02:00
Josh Dover
f747d7445a Replace usages of fs with vscode.workspace.fs (#1005)
* Replace usages of fs with vscode.workspace.fs

* Add no-restricted-imports rule for fs module
2022-06-08 14:12:03 +02:00
Riccardo Ferretti
eb74e57a9e v0.18.4 2022-06-03 16:41:19 +02:00
Riccardo Ferretti
a01cf8ec8d Preparation for next release 2022-06-03 16:40:18 +02:00
allcontributors[bot]
5b63fa8108 docs: add Lauviah0622 as a contributor for code (#1000)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-05-30 13:14:25 +02:00
Lauviah0622
ddf7ddf7b3 Jump after the closing brackets (]]) on autocomplete (#998)
* feat: jump to bracket of the end

* fix: jump cursor except commit with #

* feat: add | to link and section commit char
2022-05-30 13:13:39 +02:00
memeplex
4b263667ea Some link highlighting improvements (#890) 2022-05-09 14:22:49 +02:00
allcontributors[bot]
309194b3c3 docs: add drewtyler as a contributor for doc (#992)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-04-28 17:25:26 +02:00
Drew Tyler
c4f35b7649 Adding reference to the vscode key binding command (#989)
When setting up my foam workspace, it took me a bit to find this command. Calling it out here to make it easier for the next person.
2022-04-28 17:24:51 +02:00
Riccardo Ferretti
b9e18de7e7 Removed reference to no longer existing file in docs 2022-04-20 15:45:45 +01:00
Riccardo Ferretti
23cf5a021e v0.18.3 2022-04-17 14:59:15 +01:00
Riccardo Ferretti
8231ed14c5 Prepare for 0.18.3 2022-04-17 14:58:16 +01:00
Riccardo Ferretti
3bea283c04 Better reporting when link parsing fails, and making it not fail the whole graph computation 2022-04-17 14:56:45 +01:00
Riccardo Ferretti
a3cffe8418 v0.18.2 2022-04-14 21:58:57 +01:00
Riccardo Ferretti
675e7fa216 Prepare 0.18.2 2022-04-14 21:58:24 +01:00
Riccardo Ferretti
87d12bf3af Use VS Code URI in backlink and tag explorer panels 2022-04-14 21:55:52 +01:00
allcontributors[bot]
e118ab74b5 docs: add josephdecock as a contributor for code (#984)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-04-14 22:45:21 +02:00
Joe DeCock
04a61eed0e Remove square brackets in preview on wikilinks with link definition (#979)
Remove references that are wiki links, they are not needed (because Foam will take care of the routing in the preview) and they cause the rendering of wiki links to be surrounded by square brackets.
2022-04-14 22:44:32 +02:00
allcontributors[bot]
350b3005f1 docs: add chrisUsick as a contributor for code (#983)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-04-14 22:33:25 +02:00
Riccardo
f7293b1eb4 Fix #974: restore proper handling of section-only wikilinks (#981) 2022-04-14 21:53:42 +02:00
Chris Usick
672eb6ed20 Support direct links without labels (#980)
Fixes #975
2022-04-14 17:21:36 +02:00
Riccardo Ferretti
37a9bc49bc v0.18.1 2022-04-13 19:03:40 +02:00
Riccardo Ferretti
38741ca52e Prepare for 0.18.1 2022-04-13 19:03:09 +02:00
Riccardo
ed762618ed Fixed parsing issue of links with square brackets (#977)
Also added some tests for both links and wikilinks
Fixes #975
2022-04-13 19:00:03 +02:00
Riccardo
21a32382a2 Fixed issue with markdown direct link resolution (#972)
Fixes #726
2022-04-13 18:48:04 +02:00
Riccardo Ferretti
7e6c041b87 Fix linter error 2022-04-11 22:59:03 +02:00
Riccardo Ferretti
c9a0a1d53c createDocAndFocus now saves the resulting file 2022-04-11 22:45:59 +02:00
Riccardo Ferretti
0516088656 Fixed bug in template default text application 2022-04-11 22:45:35 +02:00
Riccardo
f98ff336bf Template to better support custom paths checks (#970)
Fixes #967
2022-04-11 16:50:04 +02:00
Riccardo Ferretti
1b1396d949 v0.18.0 2022-04-11 16:29:09 +02:00
Riccardo Ferretti
ebaab2ee59 Preparation for 0.18.0 2022-04-11 16:28:46 +02:00
Riccardo Ferretti
c6a754f1a8 Fixed YAML string that would cause escaping in windows 2022-04-11 15:39:46 +02:00
Riccardo Ferretti
3fb35494d4 Fixed tests 2022-04-11 10:13:01 +02:00
Riccardo
a7af7689a4 Feature: sync links on file rename (#969)
* basic implementation of file rename support

* tweaks to various tests

* make lint happy again

* Improved reporting

* added setting related to file sync

* added documentation in readme
2022-04-07 17:50:24 +02:00
Riccardo Ferretti
5b7a2ab022 Simplified ResourceLink model and added utility functions to manipulate it 2022-04-06 17:42:35 +02:00
Riccardo Ferretti
88227d4028 Simplified graph and tag update using full recomputation 2022-04-06 17:42:15 +02:00
Riccardo Ferretti
a531c9f9cd Prevent reference generation from triggering workspace updates 2022-04-02 16:41:14 +02:00
Riccardo Ferretti
ff172dd709 v0.17.8 2022-04-01 21:17:42 +02:00
Riccardo Ferretti
8bad56f71e Preparation for 0.17.8 2022-04-01 19:36:30 +02:00
Riccardo Ferretti
4e608a67a9 Fix 480 - Do not add ignored files to Foam upon save 2022-04-01 18:48:14 +02:00
Riccardo Ferretti
a2f7c8a549 Fix 693 - can't use action editor.action.openLink unless document already open 2022-04-01 18:34:48 +02:00
Riccardo Ferretti
63c6b7056e Using for..of to (marginally) improve performance, and showing startup time 2022-04-01 18:33:17 +02:00
Riccardo Ferretti
b48268e20f Fix 919 - Do not use locale for some FOAM_DATE related variables
This way we match the behavior in date variables in VS Code
2022-03-30 14:44:52 +02:00
Riccardo Ferretti
f5f476e717 v0.17.7 2022-03-29 22:11:29 +02:00
Riccardo Ferretti
25172ee100 Preparation for 0.17.7 2022-03-29 22:10:42 +02:00
Riccardo Ferretti
cbb0dab124 Improved navigation
There was an issue with navigation that would cause multiple text editors to be opened for the same file.
Turns out the issue was related to the use of URIs that included the fragment component, as well as the interaction between the link provider and the definition provider.
This commit fixes the issue.
2022-03-29 21:24:31 +02:00
Riccardo Ferretti
d570983e16 Fix 895 - Ignore section when computing backlinks 2022-03-29 08:56:21 +02:00
Riccardo Ferretti
b5e979ead6 Fixed snippet parser test 2022-03-28 15:31:31 +02:00
Riccardo Ferretti
aed907663a Consolidated WikiLink an DirectLink into ResourceLink 2022-03-27 19:56:28 +02:00
Riccardo Ferretti
a65325a6e1 Refactoring of markdown parser and provider code
No functional change
2022-03-27 19:47:57 +02:00
Riccardo Ferretti
772cba4b43 Refactored mardown provider, workspace and graph tests 2022-03-25 21:02:34 +01:00
Riccardo Ferretti
f1a0054141 v0.17.6 2022-03-03 15:59:12 +01:00
Riccardo Ferretti
854e329c90 Preparation for next release 2022-03-03 15:59:04 +01:00
allcontributors[bot]
0978bebd5b docs: add cliffordfajardo as a contributor for tool (#949)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-02-28 18:15:45 +01:00
Clifford Fajardo
6eaae23e19 update github ISSUE_TEMPLATE files (#945) 2022-02-28 18:10:48 +01:00
Samuel Krieg
4c615bdb02 Don't fail on errors when scanning workspace for files (#943)
Fixes #941 

Unfortunately there is no way to see which errors are being skipped, but at the same time it makes sense to not be strict and have a single file block a whole scan (especially because it could be a file Foam is not even interested in).
2022-02-25 15:10:22 +01:00
Riccardo Ferretti
3adf853b89 v0.17.5 2022-02-22 23:11:44 +01:00
Riccardo Ferretti
111c7718c4 Preparation for 0.17.5 2022-02-22 23:11:14 +01:00
allcontributors[bot]
9c7f03d62e docs: add techCarpenter as a contributor for code (#939)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-02-22 19:58:21 +01:00
Brian DeVries
0d90fc5c5a FOAM_SLUG template variable addition (#865)
* create slugified title variable available in templates
* add test
* add FOAM_SLUG to documentation
* add github-slugger dependency

Co-authored-by: Brian DeVries <brian@brianjdevries.com>
2022-02-20 18:58:21 +01:00
dependabot[bot]
537c78b630 Bump markdown-it from 12.0.4 to 12.3.2 (#909)
Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 12.0.4 to 12.3.2.
- [Release notes](https://github.com/markdown-it/markdown-it/releases)
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/12.0.4...12.3.2)

---
updated-dependencies:
- dependency-name: markdown-it
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-20 17:31:18 +01:00
dependabot[bot]
6d210590b2 Bump shelljs from 0.8.4 to 0.8.5 (#912)
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/shelljs/shelljs/compare/v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-20 17:30:35 +01:00
dependabot[bot]
ab8e97ce0b Bump node-fetch from 2.6.1 to 2.6.7 (#928)
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-20 17:29:54 +01:00
dependabot[bot]
f756d9c966 Bump trim-off-newlines from 1.0.1 to 1.0.3 (#929)
Bumps [trim-off-newlines](https://github.com/stevemao/trim-off-newlines) from 1.0.1 to 1.0.3.
- [Release notes](https://github.com/stevemao/trim-off-newlines/releases)
- [Commits](https://github.com/stevemao/trim-off-newlines/compare/v1.0.1...v1.0.3)

---
updated-dependencies:
- dependency-name: trim-off-newlines
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-20 17:28:46 +01:00
Radosław Kierznowski
aa7669f8ad Update web-clipper.md (#936)
I corrected the name of the plugin.
2022-02-20 17:28:05 +01:00
Francis Hamel
38bd5f67f2 Fix doc around Mermaid rendering in Github (#934)
According to this [blog post](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/), Github can now render Mermaid diagrams.
2022-02-20 17:27:12 +01:00
Radosław Kierznowski
336b8cfbba Added recommended tool (#935)
I added a recommended plugin that saves the page directly to the repository.
2022-02-20 17:15:49 +01:00
Riccardo Ferretti
ea03b86338 v0.17.4 2022-02-13 15:25:51 +01:00
Riccardo Ferretti
449c062566 Preparation for 0.17.4 2022-02-13 15:25:21 +01:00
Michael Overmeyer
880c2e3d3b Vendor a snippet parser (#882)
* Add the snippet parsing code from VSCode

From 95be30b3ac

* Remove `override` keyword

This is a TypeScript 4.3 feature, but Foam is not there yet

* Use `SnippetParser` to find Foam variables

* Return `Variable` objects from `findFoamVariables`

* Make `SnippetParser` resolve async

* Implement a `VariableResolver`

* Add start/end positions to `Variable`s

* Substitute based on indices, not regex

* Remove limitation warning from docs

* Merge `FoamVariableResolver` and `Resolver`

* Remove `extraVariablesToResolve`

It was no longer being used for `FOAM_TITLE`, and `FOAM_SELECTED_TEXT` didn't need to have it set either, so long as it appeared in `givenValues`, which it does.

* Add name filter to `resolveVariables`

You cannot call `resolve` on a `Variable` without modifying it, even if your `VariableResolver` doesn't know how to resolve the `Variable`.
For example, a `Transform` with a default value will modify the `Varible`'s `children`, even if the `VariableResolver` does not resolve a value.

Instead, we add a name filter, so that we don't resolve any `Variable`s that aren't Foam variables.

* Return `undefined` when the `VariableResolver` cannot resolve a `Variable`

This is how a `VariableResolver` is supposed to behave in these cases.

* Move variable substitution into `TextmateSnippet`

That way, the Foam `VariableResolver` code doesn't need to keep track of the text, nor interact with the `Variable` `pos`/`endPos`.
2022-02-09 00:45:54 +01:00
fuck-capitalism
17cb619480 Fixed typo (#913) 2022-01-15 17:24:57 +01:00
Riccardo Ferretti
6deae95d80 v0.17.3 2022-01-14 20:21:32 +01:00
Riccardo Ferretti
1c0ebb8af7 Preparation for 0.17.3 2022-01-14 20:20:28 +01:00
allcontributors[bot]
fe56823e76 docs: add bentongxyz as a contributor for code (#905)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-07 13:10:45 +01:00
bentongxyz
6956e0779a Fix commented test case that might randomly fail (#902) 2022-01-07 13:10:09 +01:00
allcontributors[bot]
c8f1f8e03a docs: add veesar as a contributor for doc (#901)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-04 12:40:03 +01:00
Veesar
9589071760 Remove reference to VSCode Markdown Notes (#896)
Remove mention of VSCode Markdown Notes as it is no longer a recommended extension or required for Backlinks (ca8ee63cea, https://github.com/foambubble/foam/issues/719#issuecomment-880100159)
2022-01-04 12:39:25 +01:00
allcontributors[bot]
6f65c10746 docs: add MalcolmMielle as a contributor for doc (#900)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-04 12:38:32 +01:00
Mike Cluck
e04409e74f Verify that openDailyNote receives a Date (#897) 2022-01-04 12:37:10 +01:00
Malcolm Mielle
dba0a72d98 Update publish to gitlab instructions (#898) 2022-01-04 12:35:00 +01:00
Fullchee Zhang
fd23b1d010 docs: Use ordered list to separate steps from details (#899) 2022-01-04 12:32:38 +01:00
memeplex
cfb946a5f2 Fix link autocompletion with tags (#885)
* Fix link autocompletion with tags
* Add test cases
2021-12-23 22:12:34 +01:00
memeplex
32c3a484d6 Improve linting (#887)
* Improve linting
2021-12-23 21:17:04 +01:00
Riccardo Ferretti
4195797024 v0.17.2 2021-12-22 23:33:10 +01:00
Riccardo Ferretti
fa405f5f65 Preparation for 0.17.2 2021-12-22 23:32:27 +01:00
Riccardo Ferretti
4fd573b9e4 Fixed VS Code settings file 2021-12-22 23:11:19 +01:00
Riccardo Ferretti
f613e1b9e2 Fix issue when applying edits to last line
Authored by: @memeplex

See also #860
2021-12-22 23:11:03 +01:00
Riccardo Ferretti
0ada7d8e2c chore: minor change around test function 2021-12-22 22:53:51 +01:00
memeplex
8b39bcdf16 Update yarn.lock (#883) 2021-12-21 21:54:26 +01:00
memeplex
6073dc246d Remove legacy github slugger (#872) 2021-12-21 21:32:40 +01:00
memeplex
5b671d59a8 Use syntax injection for wikilinks (#876)
* Use syntax injection for wikilinks

* Configurable placeholder color

* Highlight only contents
2021-12-21 21:08:39 +01:00
memeplex
8abea48b5c Improve testing experience (#881)
* Improve testing experience
* Support vscode-jest for unit tests
2021-12-21 21:08:09 +01:00
Riccardo Ferretti
2eeb2e156b Fix #878 - Added support for (wiki)links in titles 2021-12-16 16:46:13 +01:00
Riccardo Ferretti
dc76660a63 v0.17.1 2021-12-16 13:24:29 +01:00
Riccardo Ferretti
e8eeffa4ca Prepare 0.17.1 2021-12-16 13:24:07 +01:00
memeplex
7d4f5e1532 Graph improvements: light theme, zoom to fit canvas, dat.gui layout (#875)
* Improve dat.gui theme
* Zoom to fit canvas at start
2021-12-15 10:48:48 +01:00
memeplex
e7749cd52b Better support dendron-style names (#870)
* Better support dendron-style names

* Add test for non-markdown resource
2021-12-13 17:20:04 +01:00
memeplex
c6a4eab744 Unify isWindows implementation (#873) 2021-12-13 00:08:22 +01:00
allcontributors[bot]
c88bd6f2f0 docs: add jimt as a contributor for doc (#869)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-12-12 16:27:34 +01:00
Jim Tittsler
304a803310 docs: fix typos (#866) 2021-12-12 16:26:51 +01:00
allcontributors[bot]
632c41ac5f docs: add iam-yan as a contributor for doc (#868)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-12-12 16:23:00 +01:00
Yan
ec636809d8 Add recipe for creating wikilink to sections. The guide is added in the original wikilinks recipe. (#867)
Co-authored-by: juuyan <hello@juuyan.com>
2021-12-12 16:22:03 +01:00
memeplex
af43a31ae8 Refactor URI and path related code (#858)
* Refactor uri/path-related code
* Clarify usage of uri vs fs paths
* OO URI API with some path methods
* Fix open command uri
* Document path API
2021-12-12 16:18:43 +01:00
Riccardo Ferretti
7235af70dd fix #859 - force focus on note only if it already exists
This way it will not interfere with the template placeholder logic
2021-12-11 15:48:56 +01:00
Riccardo Ferretti
de84541692 fix for #857 - decorate only markdown files 2021-12-11 15:04:37 +01:00
Riccardo Ferretti
84fab168ce Improved replacement range for link completion 2021-12-08 23:22:38 +01:00
Riccardo Ferretti
4f116cfc88 v0.17.0 2021-12-08 09:29:20 +01:00
Riccardo Ferretti
fd71dbe557 Prepare 0.17.0 2021-12-08 09:28:40 +01:00
Riccardo Ferretti
df4bf5a5cb Fixed graph update bug 2021-12-08 09:20:29 +01:00
Riccardo
122db20695 Add support for sections (#856)
* Added support for sections/subsections in `Resource`

* Added support for sections in navigation and definitions

* Section completion

* Diagnostics and quick actions for sections

* Added support for section embeds in preview

* Added reference to sections support in readme file

* Add support for sections in direct links

* Added support for sections in identifier computation

* Support for section wikilinks within same file

* Tweaks
2021-12-04 19:05:13 +01:00
Riccardo Ferretti
3b40e26a83 fix for #726 - account for both absolute and relative paths when creating files from placeholders 2021-12-03 19:33:05 +01:00
Riccardo Ferretti
bbe44ea21b added documentation for releasing Foam 2021-12-02 16:02:48 +01:00
Riccardo Ferretti
59bb2eb38f updated docs from @memeplex comments in PR #841 2021-12-02 11:15:05 +01:00
Riccardo Ferretti
97f87692b6 v0.16.1 2021-11-30 19:22:01 +01:00
Riccardo Ferretti
4f76a6b24a Prepare for 0.16.1 2021-11-30 19:21:35 +01:00
Riccardo Ferretti
c822589733 fix for #851 - fixed listing resources by ID when files had same suffix 2021-11-30 19:20:23 +01:00
Riccardo Ferretti
b748629c68 v0.16.0 2021-11-24 14:58:32 +01:00
Riccardo Ferretti
b1aa182fac Prepare for 0.16.0 2021-11-24 14:58:00 +01:00
Riccardo
c7155d3956 Completion provider support for unique identifiers (#845) 2021-11-24 14:31:09 +01:00
Riccardo
91385fc937 Added diagnostic with quick fix actions (#844) 2021-11-23 19:35:19 +01:00
Riccardo
9f42893d61 Add support for wikilinks disambiguation (#841)
* using different approach to store/look-up references in FoamWorkspace that also supports better wikilink matching

* added documentation for Foam wikilinks

* added changelog
2021-11-23 17:14:00 +01:00
Riccardo Ferretti
65497ba6d3 v0.15.9 2021-11-23 13:18:57 +01:00
Riccardo Ferretti
f5ad5245b4 prepare 0.15.9 2021-11-23 13:18:44 +01:00
Riccardo
d1a6412cb7 fixed #842 - corrected property name in template metadata, and added test case (#843) 2021-11-23 13:16:55 +01:00
Riccardo Ferretti
e03fcf5dfa v0.15.8 2021-11-22 00:29:08 +01:00
Riccardo Ferretti
f174aa7162 prepare 0.15.8 2021-11-22 00:28:25 +01:00
Riccardo
2d9e1f5903 Fix #836 - make references also links (#840) 2021-11-22 00:24:32 +01:00
Riccardo Ferretti
cf5daa4d22 added screenshots 2021-11-21 23:10:22 +01:00
Riccardo Ferretti
e9eb3032e8 v0.15.7 2021-11-21 19:54:10 +01:00
Riccardo Ferretti
a8a418824f moved screenshots in foam-vscode package 2021-11-21 19:53:18 +01:00
Riccardo Ferretti
dd06d0b805 Prepare 0.15.7 2021-11-21 19:47:19 +01:00
Riccardo
11af331694 Make preview navigation test more robust (#838)
* create test note inside workspace dir

* lint
2021-11-21 19:45:02 +01:00
Riccardo
5da1012fab Fix recent issues with templates (#837)
* Fix #831 - fixed glob used to look for templates

* Fix #834 - ask for note title when creating from template
2021-11-21 18:01:41 +01:00
Martin Laws
8015a35f39 Update @martinlaws all-contributors info (#832) 2021-11-19 17:28:53 +01:00
Riccardo Ferretti
587466a210 v0.15.6 2021-11-18 11:01:24 +01:00
Riccardo
52bc1ba13d fix preview navigation (#830)
Fixes #787
2021-11-17 16:08:08 +01:00
Riccardo
8f045a3ff4 Improve readme (#829)
* Updated display name and description

* Updated readme with screenshots
2021-11-17 15:54:37 +01:00
Riccardo Ferretti
b2be5a7311 Made template tests more robust 2021-11-15 22:44:29 +01:00
Riccardo Ferretti
87e2400070 Link reference definitions are now off by default 2021-11-15 22:43:52 +01:00
Riccardo Ferretti
78e946c177 v0.15.5 2021-11-15 22:16:08 +01:00
Riccardo Ferretti
80e46f7898 Prepare 0.15.5 2021-11-15 22:14:51 +01:00
Zero King
5f89a59b07 Use forEach() consistently in test suite (#826) 2021-11-15 21:21:53 +01:00
Riccardo
f921c095aa Refactored note templates code (#825)
* refactored note templates code

* more tests for "Create from template" commands

* inject resolver

* implemented feedback from PR #827 (Authored by @l2dy)
2021-11-15 21:21:32 +01:00
Riccardo Ferretti
a51e0613ea moved tags-tree-view out of directory 2021-11-11 00:12:16 +01:00
Riccardo
9df71adb64 Removed FoamConfig as not used (#823)
Simplifying the Foam abstractions.
In the end `FoamConfig` was only used by the `Matcher`, so we get rid of it and use the matcher instead
2021-11-11 00:08:20 +01:00
Riccardo
17c216736b Implemented navigation provider for links, definitions and references (#821)
- introduce definition and references support
- changes links to only be used for placeholders
- simplifies configuration

Co-authored-by: Jonas Sprenger <sprengerjo@gmail.com>
2021-11-10 23:58:38 +01:00
Riccardo
66a8c3bd49 In hover provider show one source despite number of links from it (#822) 2021-11-10 13:20:59 +01:00
Riccardo Ferretti
5f7b3b7c02 v0.15.4 2021-11-09 00:34:18 +01:00
Riccardo Ferretti
9ed0d6e18e prepare 0.15.4 2021-11-09 00:33:45 +01:00
Riccardo Ferretti
0140748550 improved URI.toFsPath 2021-11-09 00:24:53 +01:00
Riccardo
356dcc5579 Consolidate use of Foam URI (#820)
* always convert vscode.Uri to foam.URI

* Improve handling on Windows paths in URI

- convert to upper case drive letter
- normalize use of Windows conversion in URI
- added more test cases

* Fixed tests
2021-11-08 23:39:01 +01:00
Riccardo Ferretti
265afdee19 v0.15.3 2021-11-08 11:34:18 +01:00
Riccardo Ferretti
de7c686f75 Prepare 0.15.3 2021-11-08 11:34:05 +01:00
Riccardo
8dfc5bd2ff Throw exception instead of process.exit (#819) 2021-11-08 11:12:15 +01:00
Riccardo
b3c5e75aa2 Fixing some test issues (#818)
* renamed test scripts

* improved hover provider tests

* removed buffering of log lines in test suite
2021-11-06 17:48:27 +01:00
Paul de Raaij
000da4bd1c Allow inclusion of note when using reference definitions (#808)
* Allow inclusion of note when using reference definitions

* Add additional comments
2021-11-04 20:17:03 +01:00
allcontributors[bot]
86749940c2 docs: add AndreiD049 as a contributor for code (#815)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-11-04 13:09:09 +01:00
AndreiD049
27f9a08870 replaced vscode uri with foam uri when generating references (#814) 2021-11-04 11:58:15 +01:00
Riccardo Ferretti
e791726692 fixed logging in test suite 2021-11-03 10:54:15 +01:00
Riccardo Ferretti
a3c00744ca fixed linting errors 2021-11-03 10:52:27 +01:00
allcontributors[bot]
00220b1f6c docs: add memeplex as a contributor for code (#812)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-11-03 10:31:56 +01:00
memeplex
759f4f1963 Avoid delaying decorations on editor switch (#811) 2021-11-03 10:31:20 +01:00
Riccardo Ferretti
d86fc7f433 removed outdated use of links 2021-11-01 20:04:37 +01:00
Riccardo
bd9c6806fa tweaks to test suite (#804) 2021-10-28 23:13:20 +02:00
Riccardo Ferretti
4c9a9cec56 v0.15.2 2021-10-27 12:11:02 +02:00
Riccardo Ferretti
8a91a6ab36 Prepare v0.15.2 2021-10-27 12:05:39 +02:00
Paul de Raaij
667037bc14 Improve generation of link reference definitions (#786)
* Fixes the removal of explicitly defined link references

* Add use case of explicit & implicit
2021-10-27 10:58:10 +02:00
allcontributors[bot]
30cc9fc9f0 docs: add eltociear as a contributor for doc (#801)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-27 10:52:41 +02:00
Ikko Ashimine
abed7be3ec Fix typo in write-your-notes-in-github-gist.md (#798)
recieve -> receive
2021-10-27 10:51:27 +02:00
Riccardo
d31e094358 Added support for target date variables in daily note template (#781)
* added support for target date variables in daily note template

* added FOAM_DATE_* variables to resolver

* Document `FOAM_DATE_*` template variables

* Add CHANGELOG entry

Co-authored-by: Michael Overmeyer <michael.overmeyer@shopify.com>
2021-10-27 10:50:58 +02:00
Riccardo
f320af05c5 Improve graph performance by batching painting (#795) 2021-10-26 13:01:19 +02:00
Paul de Raaij
ee229dac84 Apply entire tag regex to the preview window (#785) 2021-10-25 19:56:51 +02:00
allcontributors[bot]
877d843f60 docs: add Laptop765 as a contributor for doc (#796)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-10-25 19:51:22 +02:00
Paul
af65e4d5f7 Add some basic details about multi-root workspaces (#775)
* Include details about multi-root workspaces

* Reword and clarify
2021-10-25 19:50:47 +02:00
Riccardo Ferretti
dd9fa0af79 Link decorations now enabled by default 2021-10-25 19:22:32 +02:00
Riccardo Ferretti
14f68aea30 minor fixes around VS Code test configurations and suite reporting 2021-10-25 19:22:00 +02:00
Riccardo Ferretti
f68c2ab6db Color graph filter control based on style of node type 2021-10-22 12:33:19 +02:00
Riccardo Ferretti
bae99a6184 fixed dependencies and types 2021-10-21 10:09:45 +02:00
Riccardo Ferretti
861f7dbba7 v0.15.1 2021-10-21 09:01:19 +02:00
Riccardo Ferretti
6a4b90d6d7 Prepare 0.15.1 2021-10-21 08:59:34 +02:00
Riccardo
f73ddb88d4 Fixed test suite
* tweaking error propagation

* updated xvfb-action version

* improved logging

* only adding actually failing tests to failures (no comment)
2021-10-19 12:42:41 +02:00
Riccardo Ferretti
41ca70f23c better handling of output streams in tests and small change around computing which tests to run 2021-10-19 10:53:19 +02:00
Riccardo
7cf7811b85 Include other connected notes into link hovers (#780)
* Include other connected notes into link hovers

* reorganized hover provider tests and added some
2021-10-11 11:59:15 +02:00
Riccardo
eef0aa7f0b Improved filtering controls on graph visualization (#782)
* improved handling of filters in graph view
* code clean up
2021-10-11 11:55:54 +02:00
Riccardo
d222cfbbec Consolidate foam-core within foam-vscode (#774)
* moved `foam-core` inside `foam-vscode`

* updated contribution guide to reflect new modules setup

* improved testing

* consolidate to root yarn.lock files

* tweaking CI workflow && using github secrets to force cache refresh

* improved linting configuration. `core` module cannot depend on other parts of the `foam-vscode` package
2021-10-09 11:09:02 +02:00
Riccardo Ferretti
ee7a891976 v0.15.0 2021-10-04 10:05:46 +02:00
Riccardo Ferretti
680e317dbf Preparation for 0.15.0 2021-10-04 10:05:15 +02:00
Riccardo Ferretti
dbb46369a2 Added Project Manager to recommended extensions list (reported by @readingsnail) 2021-09-14 18:49:04 +02:00
Riccardo Ferretti
562da95f90 Bump fast-array-diff from 1.0.0 to 1.0.1 2021-09-14 18:37:32 +02:00
Riccardo Ferretti
fc03e07eeb removed extra file 2021-09-14 18:24:09 +02:00
Riccardo Ferretti
ccea5666bf fixed CI workflow (caching) 2021-09-14 18:23:39 +02:00
dannysemi
2a7a909ac5 Issue #530: Introduced DAT in dataviz view, and sending properties to it (#737)
* Introduced DAT.ui

* Sending properties and tags to graph for better data handling
2021-09-13 17:33:49 +02:00
Paul de Raaij
efac46174a Proposal and basic feature to include notes into a note (#741)
* Add the functionality to include notes in a note

* Add proposal of embedding

* Add tests for including notes

* Add documentation for inclusion feature
2021-09-13 17:23:40 +02:00
Riccardo Ferretti
4c5d996586 minor change in hash computation for CI 2021-09-13 17:17:28 +02:00
Jonas SPRENGER
6de0024b0b bugfix/705: replacing Indexable Types with Map (#729)
* bugfix/705: replacing Indexable Types with Map

* test for resources/placeholders named like JS proto properties

Co-authored-by: Jonas <jojo@srg.com>
2021-09-13 17:10:46 +02:00
allcontributors[bot]
70b0fae078 docs: add JonasSprenger as a contributor for code (#763)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-09-06 23:31:54 +02:00
Jonas SPRENGER
fd9bf8f04f Implement hover feature for wikilinks (#728)
* Implement hover feature for wikilinks

* Make hover configuration reactive
2021-09-06 23:31:04 +02:00
allcontributors[bot]
630a77782d docs: add ksprashu as a contributor for doc (#756)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-09-01 21:19:08 +02:00
Prashanth Subrahmanyam
6fdce389e9 Update recommended extensions based on template (#755) 2021-09-01 21:18:08 +02:00
allcontributors[bot]
9ce5a9528f docs: add theowenyoung as a contributor for doc, content (#753)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-08-31 19:51:03 +02:00
Owen Young
ca821d3928 Add another gatsby template (#752)
Add foam-template-gatsby-theme-primer-wiki
2021-08-31 19:49:05 +02:00
allcontributors[bot]
9dacadedfc docs: add Pearcekieser as a contributor for doc (#750)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-08-27 13:06:34 +02:00
Pearcekieser
0c07e7535e Add Recommended Extension: TODO Tree (#748)
issue: #740
2021-08-27 13:05:55 +02:00
Riccardo Ferretti
dddc379f2b fix 734: improved logging in markdown-provider 2021-07-28 11:51:38 +02:00
Riccardo
e83740d65a Tags improvements (#733)
* No longer parsing tags inside codeblocks

* fixed linting

* Using Tag data structure in Resource
2021-07-28 11:45:19 +02:00
Riccardo Ferretti
eddd9de665 foam-vscode to use latest foam-core 2021-07-25 15:57:31 +02:00
Riccardo Ferretti
7f6004dd6d v0.14.2 2021-07-24 10:20:31 +02:00
Riccardo Ferretti
1258cef04c Preparation for 0.14.2 2021-07-24 10:19:16 +02:00
Paul de Raaij
7adbffcfc2 Introduce autocompletion for tags (#708) 2021-07-24 00:10:42 +02:00
Michael Overmeyer
8395a408f2 Make navigating to a placeholder wikilink use the default template (#712) 2021-07-23 16:50:32 +02:00
Michael Overmeyer
721a6cc935 Standardize on wikilink, MediaWiki, and GitHub (#716)
* Standardize on `wikilink`

Not `wiki-link`, nor `wiki link`

https://en.wikipedia.org/wiki/Help:Link#Wikilinks

* Standardize on `MediaWiki`

Not `media-wiki`, nor `mediawiki`

https://www.mediawiki.org/wiki/MediaWiki

* Standardize on `GitHub`

Not `Github`

Co-authored-by: Riccardo <code@riccardoferretti.com>
2021-07-22 00:19:35 +02:00
Paul de Raaij
1659fe37d9 Respect the ignore globs when searching all files (#730) 2021-07-21 11:22:23 +02:00
Riccardo Ferretti
32f9120864 updated link to log output in bug template 2021-07-18 16:37:32 +02:00
Michael Overmeyer
cec0aecd06 Remove Markdown Notes from recommended extensions (#722) 2021-07-17 21:03:45 +02:00
Riccardo Ferretti
c59584d342 v0.14.1 2021-07-15 01:24:25 +02:00
Riccardo Ferretti
ea930d3d17 preparation for 0.14.1 2021-07-15 01:21:11 +02:00
Paul de Raaij
130b839ee9 Add a null check to prevent preview to break (#718) 2021-07-15 01:11:07 +02:00
Riccardo Ferretti
1b4dc8a8b1 v0.14.0 2021-07-13 13:50:25 +02:00
Riccardo Ferretti
7fcbf1acf1 Preparation for 0.14.0 2021-07-13 13:48:44 +02:00
Michael Overmeyer
011706904b Make daily notes use templates (#700) 2021-07-13 12:24:48 +02:00
Michael Overmeyer
c14e1e6349 Migrate create-from-template to use Foam's URI instead of VSCode's Uri (#709) 2021-07-12 23:24:21 +02:00
Paul de Raaij
97629a2ce6 Removes escape character of an alias when setting target (#697)
* Removes escape character of an alias when setting WikiLink target

* Alter tearDown of document-link-provider test

* Disable link reference defintion generation for all tests
2021-07-12 22:41:33 +02:00
Paul de Raaij
6b3eef43a8 Allows wikilinks to be opened in the editor again (#710) 2021-07-12 20:49:25 +02:00
Paul de Raaij
d4adce6730 Adds FAQ about enabling and disabling Foam (#706)
* Adss FAQ about enabling and disabling Foam

* Update frequently-asked-questions.md
2021-07-12 19:16:57 +02:00
allcontributors[bot]
ae65f53540 docs: add rafo as a contributor for doc (#703)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-07-06 12:57:30 +02:00
Rafael Riedel
8998204298 Update recommended-extensions.md (#702)
Changed "Mermaid Support for Preview" to the extensions new name: "Markdown Preview Mermaid Support"
2021-07-06 12:56:46 +02:00
Michael Overmeyer
92f6e001e5 Fix implicit insertion of FOAM_SELECTED_TEXT (#701)
* Only do the insertion when necessary.
* Insert using the correct whitespace.
2021-07-06 00:37:39 +02:00
Paul de Raaij
889f93a7e1 Move selected text into a new note and auto create a backlink (#666)
template and functionality to use selected text in a new note
2021-07-04 20:44:22 +02:00
Paul de Raaij
4db8c55969 Only remove link definition token that contain an alias divider (#698)
* be more conservative in removing link definitions

* Update packages/foam-vscode/src/features/preview-navigation.ts

Co-authored-by: Riccardo <code@riccardoferretti.com>

Co-authored-by: Riccardo <code@riccardoferretti.com>
2021-07-04 20:38:52 +02:00
Riccardo Ferretti
7e740fec0f v0.13.8 2021-07-02 20:02:27 +02:00
Riccardo Ferretti
beae852c21 Prepare for next release 2021-07-02 19:48:52 +02:00
Paul de Raaij
85e857d973 handle different capitalizations of wikilinks and files (#688) 2021-07-02 19:41:24 +02:00
José Duarte
667eee0e10 Add documentation to the dated-notes.ts file (#690)
* Add docs to `createDailyNoteDirectoryIfNotExists`

* Add docs to `createDailyNoteIfNotExists`

* Capitalize doc strings

* Add docs to `getDailyNoteFileName`

* Update the @configuration parameter docs

* Add docs to `getDailyNotePath`

* Add docs to `openDailyNoteFor`

* Update packages/foam-vscode/src/dated-notes.ts

Co-authored-by: Michael Overmeyer <michael.overmeyer@shopify.com>

* Update packages/foam-vscode/src/dated-notes.ts

Co-authored-by: Michael Overmeyer <michael.overmeyer@shopify.com>

* Polish some of the comments

Co-authored-by: José Duarte <jmg.duarte@campus.fct.unl.pt!>
Co-authored-by: Michael Overmeyer <michael.overmeyer@shopify.com>
2021-06-28 14:55:14 +02:00
dependabot[bot]
b6e68b3605 Bump glob-parent from 5.1.1 to 5.1.2 in /packages/foam-core (#678)
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-24 23:57:34 +02:00
Paul de Raaij
b9b0f9b515 Allow for dots in wikilinks (#689) 2021-06-24 23:20:03 +02:00
dependabot[bot]
95399977ec Bump hosted-git-info from 2.8.8 to 2.8.9 (#686)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-21 18:15:13 +02:00
dependabot[bot]
f759e7cd6e Bump ws from 5.2.2 to 5.2.3 in /packages/foam-core (#685)
Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/5.2.2...5.2.3)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-21 18:14:46 +02:00
Riccardo Ferretti
5839455535 fixed bug in date snippet
thanks to @syndenham-chorea for reporting and directing the fix
see https://discord.com/channels/729975036148056075/729975036664086560/855628250414972998
2021-06-21 00:28:45 +02:00
Riccardo Ferretti
7e4ae82fe1 updated foam-core dependency 2021-06-21 00:25:13 +02:00
Scott Bronson
e47155424f doc: describe how to select launch configuration (#674) 2021-06-12 00:19:57 +02:00
allcontributors[bot]
903a191394 docs: add bronson as a contributor for doc (#677)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-06-12 00:17:33 +02:00
Scott Bronson
5c6212dc96 remove broken link to adding-a-new-command (#675)
This file was removed by deb77328c0 last Dec.
2021-06-12 00:16:05 +02:00
Paul de Raaij
bca9756e2b Revive support for basic link alias (#656)
* Add support for basic link aliases

* Refactor to future link model

* Refactor preview behavior for aliases

* Refactore use of NoteSource

* Remove references from ref block  before processing links

Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2021-06-09 23:07:10 +02:00
Riccardo Ferretti
2e435a3828 v0.13.7 2021-06-05 15:53:16 +02:00
Riccardo Ferretti
a0f83e7510 refactored code to avoid circular dependency 2021-06-05 15:50:04 +02:00
Riccardo Ferretti
641024b01b added dependency on replace-ext (fix for #667 we hope..) 2021-06-05 15:49:34 +02:00
Riccardo Ferretti
c5a7d02656 include ES2019 library in tsconfig for vscode package 2021-06-05 15:30:35 +02:00
Riccardo Ferretti
b76196cd23 removed Foam local plugin experimental feature 2021-06-05 15:17:23 +02:00
Riccardo Ferretti
61ae468a70 v0.13.6 2021-06-05 14:58:22 +02:00
Riccardo Ferretti
6119278915 Removed support for Foam local plugins 2021-06-05 14:51:16 +02:00
Riccardo Ferretti
34c179123e v0.13.5 2021-06-05 00:30:24 +02:00
Riccardo Ferretti
c34394a0ea prepare for 0.13.5 2021-06-05 00:28:38 +02:00
Riccardo Ferretti
26c38a06ff fixes #665 - always access files in .foam/templates directory when looking for templates 2021-06-04 15:29:33 +02:00
Michael Overmeyer
d4623a2d91 Allow for YAML metadata in templates (#655)
* Add a frontmatter metadata parser

* Use the template metadata to determine the filepath to use

* Document template metadata

* Add name and description template metadata attributes

These are displayed in the template picker

* Document name and description template metadata attributes
2021-06-04 15:27:46 +02:00
dependabot[bot]
2f9507dc87 Bump ws from 7.3.1 to 7.4.6 in /packages/foam-vscode (#662)
Bumps [ws](https://github.com/websockets/ws) from 7.3.1 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.3.1...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-31 20:59:09 +02:00
Paul de Raaij
4db09070a8 Filter out tag references that are part of a nested tag (#661)
* Filter out tagreferences that are part fo a nested tag

* add test case for notes with parent and child tag
2021-05-31 20:57:40 +02:00
Riccardo Ferretti
5f99d9d5c6 v0.13.4 2021-05-26 13:39:18 +02:00
Riccardo Ferretti
9c1480197c Preparation for 0.13.4 2021-05-26 13:16:49 +02:00
Riccardo Ferretti
f1a6426046 updated documentation to reflect nested tags 2021-05-26 09:18:30 +02:00
Riccardo Ferretti
6de8baa6b5 updated yarn.lock 2021-05-26 09:18:01 +02:00
Riccardo Ferretti
27ff023a26 fix loading of markdownIt extensions 2021-05-26 09:12:14 +02:00
Paul de Raaij
690eb10856 Add support for nested tags (#643)
* Add support for nested tags

* Adds test for feature
2021-05-26 09:11:39 +02:00
Michael Overmeyer
1cb8174a9f Always ask for the note title when creating from template (#645)
* Fix snake_case to camelCase

* Always ask for the note title when creating from the default template

In the future, we'll make this conditional on whether the template provides the filepath to use in its metadata block
2021-05-22 21:46:47 +02:00
allcontributors[bot]
2141bac24a docs: add pderaaij as a contributor (#650)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-05-22 21:39:50 +02:00
Paul de Raaij
6abef8f8e7 Allow for optionality in title prop in frontmatter (#647) 2021-05-22 21:39:03 +02:00
dependabot[bot]
c797a00223 Bump nokogiri from 1.11.1 to 1.11.5 in /docs (#646)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.1 to 1.11.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.1...v1.11.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-20 15:35:51 +02:00
José Duarte
7c01fb13f0 Upgrade force-graph to 1.40.5 (#642) 2021-05-20 11:14:15 +02:00
dependabot[bot]
abbc2bbb14 Bump lodash from 4.17.19 to 4.17.21 in /packages/foam-core (#628)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-14 11:28:11 +02:00
dependabot[bot]
bb7fee24bb Bump hosted-git-info from 2.8.8 to 2.8.9 in /packages/foam-core (#629)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-14 11:27:22 +02:00
dependabot[bot]
43ef3a3e2b Bump lodash from 4.17.20 to 4.17.21 in /packages/foam-vscode (#630)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-14 11:26:59 +02:00
dependabot[bot]
da69a3057f Bump hosted-git-info from 2.8.8 to 2.8.9 in /packages/foam-vscode (#631)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-14 11:26:29 +02:00
Riccardo
2d06f26bbf fix #638 link to license page 2021-05-13 15:55:54 +02:00
Riccardo
edbe128e1e fix #546 - title yaml property can also be a number 2021-05-13 13:09:09 +02:00
Riccardo Ferretti
af0c2bbaa3 v0.13.3 2021-05-11 21:40:56 +02:00
Riccardo Ferretti
700bfc1b26 addressing windows issue with provider matching (related to #617) 2021-05-11 21:25:25 +02:00
Riccardo Ferretti
a6d5c04453 improve bootstrap performance
we wait to create the graph, as changes to the workspace will cause it to be recomputed.
so, first load all resources from the initial providers, then compute the graph.
2021-05-11 21:22:19 +02:00
Riccardo Ferretti
b0c42cead2 setting logging level to error for all tests 2021-05-11 21:12:38 +02:00
Riccardo Ferretti
6c643adb9d Prepare for 0.13.3 2021-05-09 23:13:27 +02:00
Riccardo Ferretti
ca7fdefaae improvemets in matcher and linting 2021-05-09 23:13:27 +02:00
Riccardo Ferretti
149d5f5a7c fix #617 - fixed error in file matching in MarkdownProvider 2021-05-09 22:50:42 +02:00
Michael Overmeyer
be80857fd1 Handle users cancelling "Create New Note" commands (#623) 2021-05-09 22:50:18 +02:00
Michael Overmeyer
611fa7359d Completely ignore unknown Foam variables (#622)
If we don't know it we shouldn't touch it
Previously it replaced the variable with the variables name
2021-05-09 18:23:06 +02:00
Riccardo Ferretti
08b7e7a231 fixed isMarkdown function to check the .md extension (related to #617) 2021-05-07 23:53:14 +02:00
Riccardo Ferretti
0a259168c7 fix #618: properly printing file name 2021-05-07 22:58:44 +02:00
Riccardo Ferretti
f3d0569c76 fixed Barabazs contributor name 2021-05-06 12:26:22 +02:00
Riccardo Ferretti
502129d5ac v0.13.2 2021-05-06 10:10:51 +02:00
Riccardo Ferretti
d29bf16db1 prepare 0.13.2 2021-05-06 10:10:22 +02:00
Riccardo Ferretti
d228c7cb18 fixed test 2021-05-06 10:04:00 +02:00
Riccardo Ferretti
78078cf338 improved foam settings 2021-05-06 10:04:00 +02:00
Riccardo Ferretti
fe65883bc5 fix #600 - clicking on notes in placeholder and orphan panels now navigates to them 2021-05-06 10:04:00 +02:00
allcontributors[bot]
20b5261c5c docs: add EngincanV as a contributor (#615)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-05-06 10:02:12 +02:00
Engincan VESKE
f91cfe5d0d Update capture-notes-with-shortcuts-and-github-actions.md (#613) 2021-05-06 10:01:42 +02:00
Michael Overmeyer
1ab9cc5f4a Add streamline "Create new note" command (#601)
* Add new `Create New Note` command
It is the streamlined counterpart to `Create New Note From Template`

* Simplify the variable Regex
\W is equivalent to [^A-Za-z0-9_]
2021-05-03 13:48:14 +02:00
allcontributors[bot]
02ff681700 docs: add Barabazs as a contributor (#610)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-05-03 13:20:26 +02:00
Barabas
2d9c3be0e6 Add support for stylable tags (#598) 2021-05-03 13:19:37 +02:00
Robin King
78cf602347 fix: (#592) extra autocomplete hints outside wiki-link brackets (#596) 2021-05-03 13:02:28 +02:00
dependabot[bot]
898c7b4387 Bump rexml from 3.2.4 to 3.2.5 in /docs (#607)
Bumps [rexml](https://github.com/ruby/rexml) from 3.2.4 to 3.2.5.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.2.4...v3.2.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-03 11:40:40 +02:00
Riccardo
7412d518d7 Spike on FoamWorkspace and DataStore refactor (#593)
* extracted graph from workspace

* refactored datastore

* dataviz to use URI for placeholder detection

* graph uses uris, not resources

* adding placeholder in graph

* link completion to use graph

* API v1 - Resource refactoring (#595)

* aside: tweaked jest extension configuration

* added provider for markdown

* removed file check in URI

the problem is that it makes the URI dependent on the disk, which makes testing harder.
The change was originally introduced to prevent Foam from treating directories ending in .md as markdown files, but the check needs to probably happen somewhere else, e.g. in `FileDataStore.list` - or directories should be expressed with a trailing slash (to check whether that breaks the URI convention)

* Various changes

- `resolveLink` now delegates to providers
- added `read` method in providers and `FoamWorkspace`
- improved `Matcher` API
- updated tests to use workspace with providers
- delegating more to workspace now it can read files (simplifies wiring and exposed API surface)
- provider init returns a promise, so it can be awaited on
- `IDataStore` now has `list` method, to encapsulate all access to FS

* improved windows support in URI and matcher

* improved grouped resources interface

* added readAsMarkdown in provider, useful for tooltip generation with preview in vscode
2021-04-30 16:50:16 +02:00
allcontributors[bot]
e6030ac562 docs: add daniel-vera-g as a contributor (#603)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-04-25 23:58:47 +02:00
Daniel VG
d6d958bc92 Docs: Fix markdown formatting issues (#599)
* Fix: Right links and formatting

* Docs: Run markdownlint to automatically fix minor formatting errors

* Style: Format with markdownlint and not prettier
2021-04-25 23:58:02 +02:00
Riccardo Ferretti
fd7a24c5fc v0.13.1 2021-04-21 21:10:48 +02:00
Riccardo Ferretti
41b3c6fbfb Prepare 0.13.1 2021-04-21 21:10:15 +02:00
Robin King
84b2ab6e42 fix:(#591) 'foam-vscode.open-daily-note' error on Windows (#594)
* when calling URI.file more than two time on windows
* a extra slash('/') at path's beginning may cause some problems
* so add a condition to solve it
2021-04-21 21:04:04 +02:00
dependabot[bot]
6cf184ba23 Bump ssri from 6.0.1 to 6.0.2 (#590)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 12:15:02 +02:00
Riccardo Ferretti
6ad8211f56 v0.13.0 2021-04-19 11:45:18 +02:00
Riccardo Ferretti
ac247867d9 prepare for 0.13.0 2021-04-19 11:44:54 +02:00
allcontributors[bot]
46f0bf2830 docs: add dheepakg as a contributor (#588)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-04-19 09:55:52 +02:00
Dheepak
f0d712d1ce Fixed LICENSE page issue occuring at github-pages. (#581) 2021-04-19 09:54:48 +02:00
Michael Overmeyer
b72bca661b Template variable refactor (#586)
* Switch the default note name to follow Obsidian filename style

Previously it was the style used by Markdown Links
Ref: https://github.com/foambubble/foam/pull/569#discussion_r611936272

* Refactor variable resolution

Taking the only good bits of [`FOAM_TITLE_SLUG`](https://github.com/foambubble/foam/pull/569).

* Use FOAM_TITLE as the default filename
2021-04-19 09:52:22 +02:00
Riccardo
ac5cd832f6 Added configuration to enable/disable link navigation (#584) 2021-04-16 12:29:19 +02:00
Riccardo
71e8f00e80 fixed #542 (#583) 2021-04-14 22:25:13 +02:00
Riccardo
b371f0fa7d Handle file errors more gracefully in FileDataStore (#578)
* handle file errors more gracefully in FileDataStore
2021-04-14 19:16:48 +02:00
Riccardo
b11a206b4a API v1 - Position and Range (#577)
* refactored position and range functions
2021-04-12 21:56:14 +02:00
Riccardo
c678375712 Wikilink completion (#554)
* placeholders are updated when creating connection, not when resolving link

* feature: link completion

* added tests

Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2021-04-12 19:37:25 +02:00
Michael Overmeyer
b1bdf766b1 [Templates v2] Add FOAM_TITLE snippet variable (#549)
* Remove unused variables to appease the linter

* Remove unecessary escape character

To appease the linter

* Add FOAM_TITLE snippet variable
2021-04-10 22:02:46 +02:00
Riccardo
531bdab250 Refactored URI for Foam API v1 (#537)
* refactored URI to be less dependent on VS Code implementation
* moved uri tests in own file, and added test case from #507
* added license info for VS Code inspired code
* moved URI utility methods in abstract class for namespacing
* better names for some methods

Co-authored-by: Jonathan <jonny@mondago.com>
2021-04-05 14:22:51 +02:00
allcontributors[bot]
5fa04c7384 docs: add RobinKing as a contributor (#571)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-04-05 13:52:29 +02:00
Robin King
1f95d0559c fixed bug with Chinese characters in tags (Issue #567) (#568)
Makes tags support Unicode Letters.
Makes it possible to create tags with Chinese characters -> Issue #567.
2021-04-05 13:51:46 +02:00
Riccardo Ferretti
f00886acac v0.12.1 2021-04-05 13:40:45 +02:00
Riccardo Ferretti
4895a8b84c prepare for 0.12.1 2021-04-05 13:39:57 +02:00
Riccardo
ea0f88475c introduced configuraiton option to make decorations optional (#558)
fixes #553 #547
2021-04-05 12:50:13 +02:00
Michael Overmeyer
567c87c285 Add a proposal for how templates should work (Templates v2) (#534) 2021-04-02 22:30:28 +02:00
Louie Christie
4ea076b949 docs: update instructions for Github pages (#559)
Because foam template defaults have been changed: ec2d44ad86 (diff-a5de3e5871ffcc383a2294845bd3df25d3eeff6c29ad46e3a396577c413bf357L16)
2021-04-02 09:04:33 +02:00
dependabot[bot]
bf80a40ad3 Bump y18n from 4.0.0 to 4.0.1 in /packages/foam-core (#555)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-01 18:22:17 +02:00
dependabot[bot]
85e687956f Bump y18n from 4.0.0 to 4.0.1 in /packages/foam-vscode (#556)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-01 18:21:59 +02:00
Michael Overmeyer
5f963fe895 Add a placeholder for the template file quick pick menu (#550)
Slightly nicer UX
2021-03-28 22:44:42 +02:00
Riccardo Ferretti
947ddf0b77 v0.12.0 2021-03-22 16:25:48 +01:00
Riccardo Ferretti
f206e855a9 prepare for 0.12.0 2021-03-22 16:24:57 +01:00
allcontributors[bot]
1b8f0cd2fd docs: add zomars as a contributor (#539)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-03-18 16:49:41 +01:00
Omar López
ca063d4eee Add Markdown Footnotes to recommended extensions (#538)
refs #492
2021-03-18 16:48:27 +01:00
Riccardo Ferretti
734986211a fixed bug in automatic opening of daily note 2021-03-18 12:45:34 +01:00
Riccardo
54a4aec1a0 Extracted foam-cli to https://github.com/foambubble/foam-cli (#535) 2021-03-18 12:16:40 +01:00
Riccardo
d1a28717fe (refactor) Use Position and Range in Foam model (#532)
* using Position and Range in Foam model
2021-03-17 15:25:20 +01:00
Michael Overmeyer
30759bd1f3 Ignore directories that end in Markdown extensions (#533) 2021-03-17 13:48:48 +01:00
Riccardo Ferretti
852b19f177 improved edge-case handling in FoamWorkspace.delete 2021-03-17 11:24:21 +01:00
Riccardo Ferretti
16cad729fd fixed method call 2021-03-17 11:12:36 +01:00
Riccardo Ferretti
ab6c046404 explicitly waiting for workspace cleanup 2021-03-17 11:11:37 +01:00
Riccardo Ferretti
4b16b530b4 updated lock file 2021-03-17 09:26:27 +01:00
Riccardo Ferretti
51ec6ddec4 fixed import error 2021-03-16 13:05:51 +01:00
allcontributors[bot]
ca39351407 docs: add derrickqin as a contributor (#528)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-03-15 13:21:16 +01:00
Derrick Qin
8e48dd77a2 fix dead link in readme.md (#527) 2021-03-15 13:20:44 +01:00
Riccardo
ade5b01316 Link Navigation (#524)
* added uri utility method, and exposing uri module

* added utility methods

* renamed and enhanced open-placeholder-note command to support all resources

* support for links via document link provider and decorator

* use open resource command in tree data provider

* make open resource command unavailable in command palette

* using snippet for better UX when creating note from placeholder

* exposing parser as a Foam service

* consolidated "open resource" command code

* added tests for document links provider
2021-03-15 12:55:01 +01:00
Riccardo
4e661aa6b5 Added cache for vscode used for e2e tests (#498)
* added caching of VS Code also for lint

Even if linting doesn't require the vscode part of the cache, we are not separating the two cases so that we only have one cache to maintain, and linting being a faster task (and a task that should fail less than tests) will update the cache more often, speeding up the run of the tests afterwards
2021-03-12 15:32:24 +01:00
Riccardo
fa4b9d57aa Wikilink navigation in markdown preview panel (#521)
* `FoamWorkspace.find` to return `null`  when no reference is provided for relative path

* turning wikilinks into browsable links in markdown preview

* moved preview styles in css file and reorganized code in static folder

Static was previous used only for the dataviz graph. Now we have 2 subdirectories: dataviz for the graph, and preview for the markdown preview.
For now the css style is a bit of an overkill, but sets up the right foundation for further customization down the line.

* chore: explicitly disabling gitdoc extension, removing unnecessary async keyword

* fix: fixed test utility fn (and linter warning)

* test: added tests for preview link generation

* changed launch configuration to support both foam-core and foam-vscode packages
2021-03-11 15:31:05 +01:00
allcontributors[bot]
a6db7815f0 docs: add movermeyer as a contributor (#522)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-03-11 15:01:02 +01:00
Michael Overmeyer
e604f26544 Allow absolute paths in openDailyNote.directory (#482)
* Use URI throughout dated-notes

* Fix typos in comments

* Allow absolute paths in `openDailyNote.directory`

This allows users to press the `alt-d` shortcut to open the daily note
from any instance of VSCode, not just within the `foam-template` repo.
2021-03-11 15:00:27 +01:00
José Duarte
9b12c79daf Add logo to the README (#506)
* Update readme

* Update readme

* Update icon position

* Update readme.md

* Revert
2021-03-10 16:23:09 +01:00
ingalless
d924a8612e Add ability to launch a daily note on startup (#501)
* Add ability to launch a daily note on startup

* Update documentation

* Fix grammar in docs

Co-authored-by: Jonathan <jonny@mondago.com>
2021-03-10 14:36:35 +01:00
Riccardo Ferretti
7aa2e0e411 v0.11.0 2021-03-09 11:52:50 +01:00
Riccardo Ferretti
a710358701 Prepare for 0.11.0 2021-03-09 11:52:35 +01:00
Riccardo Ferretti
9e4124068a fix this binding in tree provider refresh
The even listener is called with `this` bound to undefined, which causes the refresh function in fail when it accesses the object methods/fields. wrapping it into an arrow function avoids the problem
2021-03-09 11:50:59 +01:00
Riccardo
84e774144e Improved node highlight logic (#517)
* differentiate between regular nodes and lessened nodes style

* make lessened nodes even more transparent
2021-03-09 10:18:42 +01:00
allcontributors[bot]
ef9131ead7 docs: add ryo33 as a contributor (#518)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-03-08 10:51:54 +01:00
Hashiguchi Ryo
18f0725779 Fix wrong windows shortcut (#513) 2021-03-08 10:49:53 +01:00
Riccardo
eb2a2ed9e0 Backlinks Panel (#514)
* added position to direct links, and link reference to Connection

* added backlinks panel
2021-03-07 20:12:25 +01:00
allcontributors[bot]
433c0c5b7e docs: add joeltjames as a contributor (#509)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-03-02 12:06:21 +01:00
Joel James
f48c74c607 Feature/blank note explorer view (#493)
* Create Blank Note Explorer View

Creates a new "Blank Note" explorer view which displays all notes that
contain only a title. When note.source.text.trim().split('\n').length
is equal to 1, a note is considered blank. This should mean that the
note contains only a title.

The UX experience is identical to that of the Orphan view. A user can
toggle between both the flat view and a nested view grouped by
directory.

* Cleaned up views and made them much more dynamic.

Instead of just copy and pasting the orphans view into blank notes,
I created a filtered notes provider, which behaves identically to the
old orphan/blank notes providers, but allows the caller to pass in the
"filter function" which will narrow down the list of notes in the view.

This also allows us to more easily unit test the filtering logic, and
only test the flatten / nested logic in one place. It also makes it so
that when we refactor the way one of these views works (e.g. adding the
markdown preview), we don't have to make changes to the other view.

* Fixed unit test that was failing in Windows.

* Combined placeholders and blank notes.

* Removed workspacesFsPaths and replaced with workspacesURIs

Co-authored-by: J.T. James <joel.james@myfuelmaster.com>
2021-03-02 12:05:32 +01:00
Riccardo Ferretti
596d96eaff v0.10.3 2021-03-01 14:06:09 +01:00
Riccardo Ferretti
4b65397106 Preparation for 0.10.3 release 2021-03-01 14:05:41 +01:00
Riccardo
a92ea7d86e Improved wikilink definition resolution (fixes #499) (#502)
* improved resolution for direct links and wikilink with definition

* if the definition of a wikilink points to a non-existing file, create a placeholder for the full path instead
* if a link doesn't point to a valid resource, create a placeholder for the full path instead

* commented out test-data.js import in dataviz.html

* moved test to more appropriate group
2021-02-28 19:49:07 +01:00
Riccardo Ferretti
69a5d8201c improved validation on template creation 2021-02-24 17:03:22 +01:00
Riccardo Ferretti
9ea68e1f00 v0.10.2 2021-02-24 16:41:04 +01:00
Riccardo Ferretti
eaa80fdfd5 preparation for 0.10.2 release 2021-02-24 16:39:26 +01:00
Riccardo Ferretti
148b7252a8 improved template content, and checking file existance 2021-02-24 16:34:40 +01:00
ingalless
9f0deb4000 Templates improvements (#359)
* Combine steps

* Cancel if escape pressed in any step

* New template command

* Execute "create new template" when no templates found

* Provide inline documentation 

* Add tests

* Add docs for the feature

Co-authored-by: Jonathan <jonny@mondago.com>
2021-02-24 15:37:46 +01:00
Riccardo Ferretti
f818e51be2 v0.10.1 2021-02-23 17:28:57 +01:00
Riccardo Ferretti
f56a6d8d0d Preparation for 0.10.1 2021-02-23 17:28:14 +01:00
Riccardo
026023dc7a Fix - Foam workspace update (live) (#497)
* improved delta logic in graph.js

fixes a bug that was due to using object.splice inside a forEach loop (sometimes stackoverflow is wrong - removing the element inside the loop will actually reduce the iterations and not all elements in the array will be visited!)

* various fixes to live update of workspace model + tests

* added tab size option in settings.json
2021-02-23 16:59:55 +01:00
Riccardo
e118ac2f5c included new style options in graph visualization doc 2021-02-18 11:36:17 +01:00
Riccardo Ferretti
320d3d2bc3 v0.10.0 2021-02-18 10:18:04 +01:00
Riccardo Ferretti
cc42345276 Preparation for 0.10.0 release 2021-02-18 10:17:23 +01:00
Riccardo Ferretti
46f60ae036 fixed alpha value in graph labels 2021-02-17 21:37:44 +01:00
Riccardo
32e443bbae Refactor core workspace model (#467)
* added workspace WIP

* workspace supports resources

* uri check more lenient (was causing bug by not recognizing some objects)

* added placeholder resource type

* consolidated code in FoamWorkspace and added more tests

* updated all modules to use FoamWorkspace

* fixed FoamWorkspace.getConnections function
when links or backlinks are not present it no longer adds `undefined` to the connection list

* fix in workspace handling of direct links

* consolidated id/name generation functions

* added test for wikilink resolution when several notes have same filename

* removed reference to graphMiddleware in foam-local-plugins doc
graph middleware won't be supported with the `FoamWorkspace`. Support for the markdown provider remains

* removed support for graph middleware, graphlib dependency, and old note-graph implementation
2021-02-17 21:36:29 +01:00
allcontributors[bot]
259642196a docs: add nitwit-se as a contributor (#489)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-02-17 10:21:51 +01:00
Mark Dixon
8a8c0221a2 Added line width and line color to graph settings (#479) 2021-02-17 10:19:55 +01:00
Riccardo Ferretti
585a6d61e1 workaround: force version 1.52.0 during test run
Running the tests with vscode 1.53.0 is causing issues in `suite.ts:23`, which is causing a stack overflow, possibly due to a recursive callback. Also see https://github.com/foambubble/foam/pull/479#issuecomment-774167127 .
It's unclear what's causing the issue, but forcing the version to 1.52.0 solves the problem.
To review, further investigate, and roll back this workaround.
2021-02-09 19:26:56 +01:00
Riccardo Ferretti
bc7dc61511 chore: reset task now checks yarn packages, and no longer executes tests 2021-02-09 17:01:31 +01:00
Riccardo Ferretti
f29edc22cb using services instead of context to pass dataStore to features
The destructuring of the `context` object was causing a ProposedAPI exception to be thrown
2021-02-09 17:00:51 +01:00
allcontributors[bot]
718c83f6ec docs: add njnygaard as a contributor (#478)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-02-05 09:39:16 +01:00
Nikhil Nygaard
e1438cf3eb Update documentation for orphans panel #476 2021-02-05 09:38:14 +01:00
dependabot[bot]
33b995583f Bump nokogiri from 1.10.10 to 1.11.1 in /docs (#473)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.10 to 1.11.1.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.10...v1.11.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-02 13:55:17 +01:00
léon h
bc071a20b4 [FEATURE] Notes preview (#468)
* [FEATURE] Notes preview

* Refactor

* datestore to context

* Remove bracket test
2021-02-02 13:38:22 +01:00
hikerpig
96f22fb0a8 docs: add foam-template-gatsby-kb as a publishing solution (#465) 2021-01-29 10:15:53 +01:00
Riccardo Ferretti
d219b400fa v0.9.1 2021-01-28 16:05:34 +01:00
Riccardo Ferretti
19ba7e8673 prepare for release 0.9.1 2021-01-28 16:04:55 +01:00
léon h
7922aa950a [FIX] Orphans listeners (#464) 2021-01-28 16:00:50 +01:00
Riccardo Ferretti
4457e83e38 v0.9.0 2021-01-27 23:19:01 +01:00
Riccardo Ferretti
fb15672e6a preparation for 0.9.0 release 2021-01-27 23:18:40 +01:00
Riccardo Ferretti
2ef2a217ee updated links to discord 2021-01-27 21:54:45 +01:00
léon h
8a73cba1f0 Welcome screen for Tag Explorer (#460)
* Welcome screen for Tag Explorer

* Front matter
2021-01-27 16:38:05 +01:00
allcontributors[bot]
b0ea08b84f docs: add leonhfr as a contributor (#458)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-01-26 15:57:07 +01:00
léon h
ea0edc5149 Orphaned notes (#457)
* Orphaned notes

* Refactor to panel

* Toggle groupBy option

* Hide command from palette

* Icon toggle

* Docs

* Tests

* Extract isMatch logic
2021-01-26 15:56:14 +01:00
Riccardo Ferretti
42dabfbf9d added discord badge 2021-01-22 23:42:18 +01:00
Riccardo Ferretti
85d3aef2ff updated discord link 2021-01-21 12:32:05 +01:00
Riccardo Ferretti
8bd3109325 removed paste-image extension from recommendation list as it's now part of foam-template 2021-01-19 23:06:37 +01:00
Riccardo Ferretti
6ca800b500 Focus graph documentation on Foam implementation 2021-01-15 19:31:38 +01:00
Riccardo Ferretti
3a798b520f v0.8.0 2021-01-15 13:36:00 +01:00
Riccardo Ferretti
8db4d2897f Preparation for 0.8.0 release 2021-01-15 13:24:35 +01:00
Riccardo
e0bcb6bd92 Style graph nodes by type (#449)
* added styling of graph nodes by type

* removed unused css file

* added style by type to documentation
2021-01-14 20:22:44 +01:00
Riccardo
cd92468311 Prettier format and chores (#448)
* fix #442 - link to known-issues replaced

* formatted settings + enable format on save + improved jest config

* removed editorconfig in foam-cli

* formatted foam-vscode

* removed author in package.json files

* minor changes to readme files

* fixed husky pre-commit hook
2021-01-14 17:00:03 +01:00
Riccardo Ferretti
5a44fbc26f improved foam-vscode readme 2021-01-14 15:05:40 +01:00
allcontributors[bot]
4412f860dd docs: add elswork as a contributor (#445)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-01-14 13:16:44 +01:00
elswork
3e3d36b954 Update unlinked-references.md (#444)
Fix small mistake
2021-01-14 13:08:51 +01:00
José Duarte
eee6b7bd3a Allow for the reuse of the graph panel (#443) 2021-01-14 13:07:59 +01:00
José Duarte
792e66b061 Add custom graph styling support (#438)
* Add graph style to VSCode settings

* Update default to an empty object

* Add function to retrieve the graph style from the settings

* Implement the graph custom styling setting

The implementation makes use of the webview communication mechanism to
switch messages between the webview and the graph.
It works as follows:

- When the webview is loaded, it now sends a single request to VSCode,
the request asks VSCode for the graph style
- When VSCode answers with the style, the graph style is updated and
the webview loading process continues as normal.

The style change does not modify the API, in fact it makes use of the
shadiest programming tatic ever, *global variables* to remain
compatible.

The style object *currently* supports four base fields:
- background: string
- fontSize: int
- highlightedForeground: string
- node: object
  - note: string
  - nonExistingNote: string
  - unknown: string

* Simplify null handling logic

* Remove debug logs

* Rename style setting

* Rename message style type

* Remove forgotten debug log

* Refactor the code to match model & action

* Add missing break

* Allow for dynamic style updates

* Fix the window loading bug

* Implement a permanent fix to the bug

* Replace `nonExistingNote` with `placeholder`

* Include the new graph style feature in the docs

* Remove unnecessary async

* Remove unused case
2021-01-13 17:55:58 +00:00
Mike Cluck
e5589f0555 Add ability to open a random note (#440)
* Add Open Random Note command
2021-01-12 22:29:03 +01:00
Riccardo
32f40fa0de fix(#473) - link now points to correct location 2021-01-10 22:33:44 +01:00
Riccardo
97e3b20112 Added support for direct links (#433)
* support direct links

* added support for labels with formatting

* added documentation and removed lint warning

* ignore external links

* improved uri parsing

* filter links pointing to same note (e.g. sections within the note)

* check that note exists before navigating to it

* fixed compilation error
2021-01-08 17:54:40 +00:00
Brian Anglin
0060ea2a3a Fix typo in link (#434) 2021-01-06 22:53:38 +01:00
allcontributors[bot]
a11dee89ba docs: add anglinb as a contributor (#431)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-01-04 15:07:49 +01:00
Brian Anglin
62e46e87b0 Adds iOS Shortcut and GitHub Actions recipe (#430) 2021-01-04 15:04:59 +01:00
Riccardo
ef7ea8d23b End 2 end test for the extension in vscode (#428)
* added support for e2e vscode tests

* using github action that supports headless test run

* loading vscode test instance in empty dir to speed up bootstrap
2021-01-03 19:27:51 +01:00
Riccardo
36a632f218 consolidated prettier configuration in root package.json file (#429)
also fixed linting and consolidated .gitignore and moved .editorconfig
2021-01-03 18:35:33 +01:00
Riccardo
f9331ad327 refactor: better organization and simplification of core model (#406)
* using URI as note identifier

* cleanup: put definitions together with related code, moved note-graph, removed slug field from Note model
2021-01-03 13:04:05 +01:00
allcontributors[bot]
a944d993fc docs: add themaxdavitt as a contributor (#426)
for fixing recipe link in foam-template
2021-01-02 22:53:08 +01:00
Riccardo Ferretti
adf2dfa779 v0.7.7 2020-12-31 11:40:34 +01:00
Riccardo Ferretti
c04bc347ed Preparation for 0.7.7 release 2020-12-31 11:40:03 +01:00
Riccardo Ferretti
5f8a064af2 Added 0.7.6 info to CHANGELOG 2020-12-29 13:46:49 +01:00
allcontributors[bot]
eaa522fe1b docs: add bpugh as a contributor (#419)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-12-29 12:01:51 +01:00
Mike Cluck
3868cc5a17 Dated snippets create standard wikilinks (#416) 2020-12-29 11:58:18 +01:00
Brandon Pugh
76d70d40f8 Fallback to word-based suggestions when not triggered by trigger character (#417)
Fixes #415

Currently you have to return undefined or an empty array for suggestions
in order for vscode to fallback to word-based suggestions.
2020-12-29 11:56:32 +01:00
Riccardo Ferretti
2e373c4624 v0.7.6 2020-12-20 19:45:35 +01:00
Riccardo Ferretti
71948062b1 updated documentation links via janitor command 2020-12-20 19:39:16 +01:00
Riccardo
94711cf11b fix(#410): using fsPath property in janitor (#411) 2020-12-20 19:38:33 +01:00
Riccardo Ferretti
7d0858246d v0.7.5 2020-12-17 20:40:24 +01:00
Riccardo Ferretti
d998c8d482 Prepare for 0.7.5 release 2020-12-17 20:39:44 +01:00
allcontributors[bot]
85e0784c54 docs: add MCluck90 as a contributor (#408)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-12-17 20:28:57 +01:00
Mike Cluck
035fb7b634 Use fsPath to get normalized path for current OS (#407) 2020-12-17 17:20:04 +01:00
Riccardo Ferretti
50075a384b v0.7.4 2020-12-16 19:54:28 +01:00
Riccardo Ferretti
71e3581409 Preparation for 0.7.4 2020-12-16 17:53:08 +01:00
Riccardo Ferretti
5249edab38 use path to open doc selected in dataviz graph 2020-12-16 17:50:53 +01:00
Riccardo
6baeec4db6 Using URI across the board for better Windows support (#391)
* add windows-2019 to CI os matrix
* use actual URI object instead of strings to represent paths/uris
* added datastore tests
* chore: make Foam IDisposable
2020-12-16 17:47:31 +01:00
Riccardo Ferretti
39bc7ec0be docs: added image to help finding foam log in vscode 2020-12-14 17:10:36 +01:00
Riccardo Ferretti
3bcc97e432 publish script will also push to openvsx 2020-12-14 11:01:16 +01:00
Riccardo Ferretti
cde0ea7fc8 v0.7.3 2020-12-14 10:38:27 +01:00
Riccardo Ferretti
438422f545 Preparation for 0.7.3 2020-12-14 10:38:06 +01:00
Riccardo Ferretti
e9b6811234 dataviz: added safety check when rendering graph nodes 2020-12-14 10:38:06 +01:00
Riccardo Ferretti
ae05f38c70 Preparation for 0.7.3 2020-12-14 10:38:06 +01:00
Riccardo
17337a366f added off setting for foam.edit.linkReferenceDefinitions in documentation 2020-12-13 11:29:45 +01:00
Andrew Natoli
4c80b82cfd fix(dataviz): Don't delete node for note on update - #393 (#394)
* fix(graph): Don't delete node for note on update

Doing so causes graphlib to delete the inbound links from other nodes so when this node is re-created it will be adrift by itself.

* Clear graph node's forward links on note update so they can be accurately rebuilt

* test(dataviz): Ensure updating a note does not clear its backlinks (tests #393)

* fix(dataviz): On note delete, set node to "no file" state if it is referenced by other notes

* test(dataviz): Ensure graph updates properly from note deletions
2020-12-10 09:47:06 +01:00
Riccardo Ferretti
ab39fc9c05 fix(dataviz) selection/hover bug on data refresh 2020-12-09 23:47:51 +01:00
Riccardo
213590382c Fix graph issue when deleting node (#401)
* create commonjs modules

This is to fix a problem at startup regarding instantiation of objects.
See:
- https://github.com/foambubble/foam/pull/394#issuecomment-740065368
- https://discord.com/channels/729975036148056075/737970741324152882/784180656560275507

* minor style tweaks

* fix(dataviz): selected nodes must exist after updating graph data (#397)

* add graph view errors to foam log
2020-12-09 19:33:07 +01:00
Riccardo Ferretti
643df08ac5 fix link to /docs dir #399 2020-12-07 18:24:28 +01:00
Riccardo
deb77328c0 Reorganized and updated foam docs (#398)
* reorganized and updated foam docs

* minor changes to vscode extension readme

* added 404 page and minor changes

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2020-12-05 23:04:34 +01:00
Riccardo Ferretti
5af17c58c0 improved documentation and bug issue template 2020-11-29 13:18:21 +01:00
Riccardo Ferretti
4e624d5cf9 v0.7.2 2020-11-28 18:11:01 +01:00
Riccardo Ferretti
42ec29d3e9 Updated changelog for 0.7.2 2020-11-28 18:10:08 +01:00
Riccardo
26ab27e06f Note deletion, events testing, and improved CI
Added API and events around note deletion

Improved github workflows, added logic to avoid duplicate runs in CI and merged build + test jobs

Added support for running workflows in multiple environments, commented window-2019 as test don't pass, but they will be fixed in another PR to avoid scope creep here.
2020-11-28 17:52:02 +01:00
Sanket Dasgupta
6073bf143e WIP: Fix wikilinks slug querying (#386)
* WIP: Fix wikilinks slug querying

* Fix tests
2020-11-28 15:04:36 +01:00
Jonathan Carter
865bb95745 Updating the GistPad documentation (#379) 2020-11-27 14:54:30 -07:00
Riccardo
fa908bb4c6 tweaked issue templates (#385) 2020-11-27 18:18:25 +01:00
Riccardo Ferretti
83afa873dc v0.7.1 2020-11-27 16:12:04 +01:00
Riccardo Ferretti
69c3f5fb25 Preparation for 0.7.1 2020-11-27 15:50:15 +01:00
Riccardo
6152e89590 Adding service that can direct logging to vscode console (#377)
* Improved logging
- using classes instead of functions (feels like it fits better the use case)
- using singleton global to not pass logging service around

* Added vscode logger, command to change level, and settings

* improved bootstrap logging

* build foam-core before running tests in github workflows
2020-11-27 15:38:19 +01:00
Riccardo
9f17b1f7b9 Fixed parsing of tags (#382)
* fixed parsing of tags
* improved regex, courtesy of @jmg-duarte!
2020-11-27 13:35:39 +01:00
Riccardo
8f1327337c adjusting canvas size on window resize (and removing scrollbars) (#383) 2020-11-27 10:07:42 +01:00
allcontributors[bot]
b15f27aea6 docs: add jmg-duarte as a contributor (#384)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-27 00:13:15 +01:00
José Duarte
b8a16cc5ed Fix title cutting on slugs (#381) 2020-11-26 23:46:44 +01:00
José Duarte
168ef5edb4 Simplify the contribution guide (#372)
* Simplify the contribution guide

* Remove outdated files

* Update the contribution guide

* Add call to fixes on the contrib-guide bottom

* Apply suggestions from code review

Co-authored-by: Riccardo <code@riccardoferretti.com>

Co-authored-by: Riccardo <code@riccardoferretti.com>
2020-11-26 21:25:03 +00:00
Riccardo Ferretti
788ccbd905 v0.7.0 2020-11-25 16:44:47 +01:00
Riccardo Ferretti
cdaeefb252 more babel tweaks 2020-11-25 14:58:10 +01:00
Riccardo Ferretti
ddbf365313 preparation for 0.7.0 2020-11-25 14:22:29 +01:00
Riccardo Ferretti
1e327a4cc6 tweaking babel setting
because of a runtime error in vscode, presented only with the packaged extension https://github.com/formium/tsdx/issues/547
2020-11-25 14:20:04 +01:00
Riccardo Ferretti
391f4d6d07 updated CHANGELOG 2020-11-25 13:20:10 +01:00
Riccardo Ferretti
befdeb70e0 using native matchAll string function 2020-11-25 13:15:22 +01:00
José Duarte
a086a75e37 Add node_modules to the default Foam ignore list (#371)
* Add explicit foam ignores

* Add node_modules to the default ignores by Foam
2020-11-24 22:24:02 +01:00
Riccardo
9b886d3b27 Dataviz: graph smooth update and theme (#360)
* graph uses vscode colors

* added fallback value to style function

* graph now updates smoothly

* added support for multiple selections in graph
2020-11-24 18:29:16 +01:00
allcontributors[bot]
ecfa04cc4b docs: add ShaunaGordon as a contributor (#368)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-24 18:28:53 +01:00
Shauna Gordon
08e51fcbc8 Add additional feature extensions (#361) 2020-11-24 18:28:31 +01:00
Riccardo
15f412cac4 Show message to user when foam fails to bootstrap (#364) 2020-11-23 13:08:14 +01:00
Riccardo
d054e19eae Keep foam in sync with file system (#349)
* added common code from vscode repo

lots of good utility functions and objects, especially around lifecycle and event management

* added datastore and logger services

* refactored bootstrap to consolidate behavior in foam-core

* tags treeview now updates when files are saved

* updated node engine version to match vscode's

* using new event model for foam graph events
2020-11-20 12:04:07 +01:00
Riccardo Ferretti
846908e9d2 v0.6.0 2020-11-19 17:59:04 +01:00
Riccardo Ferretti
da69cc0f5d improved publishing scripts 2020-11-19 17:57:56 +01:00
Riccardo Ferretti
76a9a4ac93 Prepare for 0.6.0 release 2020-11-19 17:03:06 +01:00
allcontributors[bot]
138217e39d docs: add SanketDG as a contributor (#354)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-18 22:20:10 +01:00
Sanket Dasgupta
b473749260 Fix: wikilinks are slugified when looking for linked note (#353) 2020-11-18 22:18:08 +01:00
ingalless
fa01cce934 Feature/templates (#346)
* Initial work to create new note from template

* Treat template as snippet string

* Small refactor

* Improve semantics of focusNote

* Ask for filename, not title

Authored-by: Jonathan Ingall <jonny@mondago.com>
2020-11-18 22:12:37 +01:00
Riccardo
44e498dddb Center graph on active note, plus other tweaks (#352)
* tweaked label display

* #319 highlight and center active document in graph

* minor style tweaks to graph
2020-11-18 18:32:16 +00:00
allcontributors[bot]
679a2947d2 docs: add litanlitudan as a contributor (#351) 2020-11-18 12:25:05 +01:00
Tan Li
8710438a46 Minor fix on the icon location (#350)
Co-authored-by: Tan Li <tan.li@sambanovasystems.com>
2020-11-18 12:24:36 +01:00
José Duarte
90f869e8d0 Refactor the bootstrap function to be simpler (#344)
* Add documentation to the settings getters

* Reduce code noise in the bootstrap method

Files are now all processed in one method,
without `filter`s or `map`s to avoid reallocating arrays.

`addFile` is now inlined, as its function was mostly noise and became
unused.
`isLocalMarkdown` is now done right after listing all workspace files,
before applying the ignore globs.
`registerFiles` merely deals with registering several files,
instead of requiring a loop each time several files are to be
registered.

* Add documentation and type annotations

* Rephrase filterAndRegister docstring
2020-11-11 20:16:23 +01:00
hikerpig
8a7e9bcdd4 docs: update gitlab-pages.md for demo site of foam-jekyll-template (#345) 2020-11-11 20:00:05 +01:00
allcontributors[bot]
e68b6e3023 docs: add asifm as a contributor (#341)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-10 12:55:56 +01:00
allcontributors[bot]
ba84b9b496 docs: add jbn as a contributor (#340)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-10 12:55:12 +01:00
allcontributors[bot]
af5a4a20e6 docs: add Jackiexiao as a contributor (#339)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-10 12:54:01 +01:00
allcontributors[bot]
38181acd53 docs: add scott-joe as a contributor (#338)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-10 12:52:13 +01:00
allcontributors[bot]
683c28e393 docs: add umbrellait-danil-rodin as a contributor (#337)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-10 12:51:07 +01:00
allcontributors[bot]
f9444636e2 docs: add tristansokol as a contributor (#336)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-10 12:48:58 +01:00
allcontributors[bot]
fd0b2ef912 docs: add Sigfried as a contributor (#335)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-10 12:44:31 +01:00
allcontributors[bot]
b911d5b7b1 docs: add hikerpig as a contributor (#334)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-10 12:43:07 +01:00
allcontributors[bot]
7287aa62b5 docs: add yenly as a contributor (#333)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-10 12:42:15 +01:00
allcontributors[bot]
0475d26f2c docs: add jmg-duarte as a contributor (#332)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Riccardo <code@riccardoferretti.com>
2020-11-10 12:40:08 +01:00
allcontributors[bot]
bf43113fac docs: add ingalless as a contributor (#331)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-10 12:38:15 +01:00
allcontributors[bot]
81639fd650 docs: add ingalless as a contributor (#330)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-11-10 12:35:26 +01:00
José Duarte
8d110eb04b Add Foam icon to the extension (#328) 2020-11-09 22:18:40 +01:00
José Duarte
d89b6f0285 Add title cutting after given length (#327) 2020-11-09 21:08:12 +01:00
José Duarte
dbdb4c30b8 Improve ignore setting description & defaults (#326)
Add a simple reminder on folder ignore and add defaults aligned with it
2020-11-09 21:03:20 +01:00
Riccardo Ferretti
fdc2c7cf4c v0.5.0 2020-11-09 17:41:16 +01:00
Riccardo Ferretti
b0536ce9f7 v0.5.0-alpha.2 2020-11-09 17:26:58 +01:00
Riccardo Ferretti
a60dcaa52a updated readme 2020-11-09 17:23:01 +01:00
Riccardo Ferretti
799caa96a6 v0.5.0-alpha.1 2020-11-09 16:45:25 +01:00
Riccardo Ferretti
fb2ff3ac95 updated changelog 2020-11-09 16:41:47 +01:00
Riccardo Ferretti
39a96a2d02 v0.5.0-alpha.0 2020-11-09 16:24:44 +01:00
Riccardo
6e5c138f31 improved error handling when parsing markdown files (#320) 2020-11-09 13:23:51 +01:00
Riccardo
b2b1b58262 Adding support for tags (#311) 2020-11-06 19:22:14 +01:00
José Duarte
c10b73c59c Add file ignore setting (issue #300) (#304) 2020-11-03 11:36:45 +01:00
Yenly
74591eb192 docs: Update Publish recipes to link to community templates (#289)
* docs: Update Publish recipes to link to community templates

* Add instructions on how to deploy foam-gatsby-template to vercel
2020-11-02 21:26:16 +01:00
hikerpig
b2ebd82f25 Fix error in cli command janitor & migrate (#312)
* Fix error caused by 'createConfigFromFolders' in command janitor & migrate

* style: fix lint error
2020-11-02 15:35:35 +01:00
Riccardo
b2c4e9f78b Graph v0.2 - fixing bugs and adding labels (#310)
* added labels to graph
* fixed counter of in/out links in graph generation
* fixed linting errors
* removed unnecessary code
2020-10-30 19:09:12 +01:00
ingalless
b22fd50394 Provide more options for date snippets completion actions (#307)
Co-authored-by: Jonathan Ingall <jonny@mondago.com>
2020-10-30 07:12:26 +00:00
Riccardo Ferretti
a34842b957 v0.4.0 2020-10-28 13:06:38 +01:00
Riccardo Ferretti
0c9bbf6747 fixing peer dependency version 2020-10-28 13:06:00 +01:00
Riccardo Ferretti
1a85d16d10 updated vscode extension changelog 2020-10-28 13:04:00 +01:00
Riccardo Ferretti
689c11c5e8 fixed prepare script 2020-10-28 12:39:02 +01:00
Riccardo Ferretti
647afa80e8 v0.4.0-alpha.0 2020-10-28 12:27:04 +01:00
Riccardo
3e2cb248f2 Graph based on foam metadata (#290)
* added test with d3 and g6

* spiked on three graph libraries

* removed unnecessary deps

* small clean up

* picked implementation, cleaned code and added selection

* use title as graph node name instead of note basename

* reloading graph when adding/removing notes

* fixed graph construction to remove node duplicates

* using file name for notes that don't have an h1 title

* added utility functions

* fixed link highlighting bug

* fixed various checks and lint errors
2020-10-28 12:20:12 +01:00
ingalless
532348633b Add date snippets for daily notes (#298)
* Start working on date snippets

* Refactor logic to share across date features

* Start providing computed values

This may need to be changed to a Thenable

* Make calculated snippets functional

* Add support for any number

* Comment the code

These comments should be removed later

* Make "+" in snippet work

* Refactor changes

* Remove unused imports

* Add days of week snippets

* Add a shortcut for yesterday's note

* Rename focusDailyNote function

* Move pathExists to utils

* Make navigation on snippet selection configurable

Co-authored-by: Jonathan Ingall <jonny@mondago.com>
2020-10-27 11:38:59 +00:00
Sigfried Gold
891a182d77 fixed broken link in doc page (#292) 2020-10-21 16:14:32 +02:00
Sanket Dasgupta
ba78b9ecbe docs: Add Web Clipper Options (#228)
* docs: Add Web Clipper recipe

* chore: Update link reference definitions
2020-10-11 12:49:34 +02:00
Tristan Sokol
a47079168c add inital template for bug type issues (#230)
Co-authored-by: Tristan Sokol <git@tristansokol.com>
2020-10-09 20:30:54 +02:00
Riccardo
a23e73245f Update docs to use extension in wikilink definition (#283)
* changed vscode setting to include extensions in link definition

* updated docs to include extension in wikilink definition

* updated readme to navigate to github pages instead of published site
2020-10-09 19:04:07 +01:00
Riccardo
4f244d6a0f fix #276 - support empty titles in notes (#284)
* fix #276 - support empty titles in notes

* fixed imports to make lint happy
2020-10-09 17:45:58 +02:00
Riccardo
4caaed4c6b added option to disable wikilink definitions generation (#282) 2020-10-08 16:36:01 +02:00
Riccardo
74dbf485df added support for graph middleware via local plugin (#261)
* added support for graph middleware via local plugin

* added support for parsing extension points / plugins

* improved parser plugin and added docs

* improved name of parameter

* need to enable local plugins, and improved configuration system

For security reasons local plugins are off by default.
The feature can be enabled via a flag in the foam configuration, which has been expanded to support this case.
The configuration system now reads a `config.json` file inside the `.foam` directory as well as a `~/.foam/config.json` file to configure the system.
Only the user specific configuration file can be used to enable local plugins, as a security measure against malicious repos.

* added prettier configuration file

This ensures consistency across machines as well as an explicit source of truth
2020-10-07 22:19:04 +02:00
Joe Previte
39854277a9 feat(vscode): add command "Copy To Clipboard Without Brackets (#274)
* feat: add removeBrackets util

* feat: add copy to clipboard without brackets

* fix: add one more test

* refactor: add toTitleCase function
2020-10-06 13:01:29 -07:00
Danil Rodin
5f561100e6 Update gitlab-pages.md (#266)
* Update gitlab-pages.md

The `jekyll-optional-front-matter` need to set plugin in the _config.yaml

* Update gitlab-pages.md
2020-10-04 14:20:22 +02:00
dependabot[bot]
b1080618d3 Bump lodash from 4.17.15 to 4.17.20 in /packages/foam-vscode (#273)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.20.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-03 17:09:34 +02:00
dependabot[bot]
3db28f5328 Bump node-fetch from 2.6.0 to 2.6.1 (#262)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-01 10:51:48 +02:00
Scott Williams
d45d715f6d Update roadmap.md (#271) 2020-09-30 15:29:42 +02:00
Asif Mehedi
d1fcba35c7 Typo/grammar (#267) 2020-09-30 15:29:03 +02:00
jackiexiao
542725fe51 add preview on hover && github pages templates (#272) 2020-09-28 15:32:45 +02:00
John B Nelson
6364af0477 s/higlight/highlight/ (#263) 2020-09-15 14:09:17 +02:00
Arief Rahmansyah
b2449df390 docs: Fix typo in Diagrams recipes (#256) 2020-09-08 18:04:13 +01:00
allcontributors[bot]
12b98e633d docs: add spencerwooo as a contributor (#255)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-09-08 16:28:44 +01:00
Spencer Woo
35d361e119 Add instruction for deploying on Vercel and using KaTeX to render math (#247)
Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-09-08 16:27:06 +01:00
allcontributors[bot]
9becf8e88c docs: add HeroicHitesh as a contributor (#254)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-09-08 15:55:23 +01:00
Hitesh Kumar
a65549b38a Fix License redirection url (#249) 2020-09-08 15:51:11 +01:00
allcontributors[bot]
54c2635aa6 docs: add vHanda as a contributor (#253)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-09-08 14:17:51 +01:00
Vishesh Handa
7f9783a7ea Update GitJournal's pros/cons (#245)
WikiLinks and Backlinks have been supported for a long time.
2020-09-08 14:17:05 +01:00
dependabot[bot]
8b8d6fcc57 Bump bl from 4.0.2 to 4.0.3 (#242)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-08 14:03:45 +01:00
allcontributors[bot]
88d1856026 docs: add anku255 as a contributor (#252)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-09-08 13:58:19 +01:00
allcontributors[bot]
d58e343fa2 docs: add ariefrahmansyah as a contributor (#251)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-09-08 13:56:56 +01:00
Ankit Tiwari
bc405dc515 Fix link references spacing when there is no trailing newline (#236) 2020-09-08 13:55:54 +01:00
allcontributors[bot]
3fb3bb04b3 docs: add kneely as a contributor (#250)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-09-08 13:52:32 +01:00
Arief Rahmansyah
604564a643 Add recipe to use Draw.io to embed diagram (#239)
Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-09-08 13:51:16 +01:00
Kevin Neely
0e5ce819b7 Add recipe for Custom Note Macros (#225)
Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-09-08 13:45:23 +01:00
allcontributors[bot]
3b45e0e92a docs: add sksmith as a contributor (#234)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-08-27 13:25:08 +01:00
Sean K Smith
ab6d6ed569 Daily note could be created before the daily note directory (#232)
Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-08-27 13:19:44 +01:00
Jani Eväkallio
3e084fd944 Fix issue with janitor crashing when file is only frontmatter (#222)
* Access correct property on error to display stack trace

* Fix crash when file contains only frontmatter

* Add test for generateHeadings when the file only contains frontmatter

Co-authored-by: Ankit Tiwari <ankitt255@gmail.com>
2020-08-14 15:51:11 +01:00
Jani Eväkallio
b4e9c76a4b Improve wikilink styling (#221)
* Improve wikilink formatting detection

* Remove surrounding brackets

* Add wikilink styling
2020-08-14 15:49:57 +01:00
Jani Eväkallio
76188bde79 Improve wikilink formatting detection (#220) 2020-08-14 15:45:49 +01:00
Sashmit Bhaduri
346cc46f77 Update math-support.md (#224)
* Update math-support.md

Explains how this mechanism works and adds some ideas on alternatives.

* Improve document structure

Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-08-14 15:45:23 +01:00
allcontributors[bot]
f63e78026f docs: add martinlaws as a contributor (#215)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-08-11 23:52:24 +01:00
zbw8388
19140488ae Fixed Note ${noteId} was not added to NoteGraph
After #208, id for each note in NoteGraph is hashed. However, in generateReferenceList in file wikilink-reference-generation.ts, the id is still given by the file path, which compromised the core functionality. This PR fixed this bug.
2020-08-11 11:46:12 +02:00
Martin Laws
3297d8bd67 Fixed typos in foam workspace link (#214) 2020-08-07 07:57:19 +01:00
ingalless
5fabe08afa Add pre-defined user snippets to roadmap (#192)
Co-authored-by: Jonathan Ingall <jonny@mondago.com>
2020-08-05 18:35:50 +01:00
Riccardo
87f172d217 Decoupled note ID from note slug (#208)
* decoupled ID from note slug

* added vscode debug configuration to work with vscode-jest extension

* made things prettier

* Add a test for parsing empty frontmatter

* Use astPositionToVsCodePosition util function

* fixed a TODOs around URIs and added tests

* added tests around notes querying

* removing unused imports

* Fix typo

* implemented PR feedback

* fixed lint warnings and renamed method for consistency

* removed unnecessary checks and fix compilation error in tests

Co-authored-by: Ankit Tiwari <ankitt255@gmail.com>
2020-08-05 18:37:35 +02:00
allcontributors[bot]
3bebbcc45a docs: add dshemetov as a contributor (#210)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-08-04 13:28:08 -07:00
Dmitry Shemetov
b4224659b7 Fill out [[Migrating from OneNote]] stub. (#200)
* Fill out Migrating from OneNote stub

* Update Summary and improve grammatic consistency

* Added terminal navigation instructions

* kebab-case and update roadmap links
2020-08-04 13:26:33 -07:00
Joe Previte
7f3ba7853e feat(foam-vscode): add jest for testing (#204)
* feat: setup jest for foam-vscode

* Add failing test (fails due to missing vscode dependency)

* feat: add vscode mock

Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-08-04 13:27:11 +01:00
Ankit Tiwari
bcab41917a Parse frontmatter and use frontmatter.title as heading (fixes #174) (#191)
* Add frontmatter data to NoteGraph node

* Store document start position inside NoteGraph node

* Add heading below the frontmatter

* Show a progress bar while running Janitor

* Fix tests

* Update note start position to make it 1-indexed

* Initialize frontmatter by an empty object instead of null

* Remove console logs
2020-08-03 18:41:12 +02:00
allcontributors[bot]
f32b432e26 docs: add hooncp as a contributor (#207)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-08-02 16:34:20 -07:00
hooncp
5383865d88 Update documentation by adding new FAQ page (#202)
* Update documentation by adding new FAQ page

* Update FAQ page according to review
2020-08-02 16:33:22 -07:00
allcontributors[bot]
c2c639b402 docs: add Klaudioz as a contributor (#205)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-08-02 11:51:20 -07:00
Claudio Canales
f4a864ee7d Add how to update pushed Azure Wiki (#203)
* Add how to update pushed Azure Wiki

Add the way to push to GitHub and Azure with one command.

* Update docs/azure-devops-wiki.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* Update azure-devops-wiki.md

Add suggested changes

* Update docs/azure-devops-wiki.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2020-08-02 10:45:03 -07:00
hooncp
bf2aa599ef Remove brackets (#201) 2020-08-02 18:33:03 +01:00
Claudio Canales
24738e4390 Update azure-devops-wiki.md (#189)
I followed the entire guide so I think this addition can do it a little bit more friendly.
2020-07-30 21:40:33 +01:00
Jani Eväkallio
0e0355ae9f Fix VSCode Launch Task and Monorepo builds (#193)
* revise vscode task and launch configs

- Removed commands from sub-package:
  same can be achieved from the root
- Added build and no-build variants.
  In case separate watcher is already running,
  no need to build.
- Changed watch to build (no hot-reload in vscode by default)
- Show the build in console

Didn't update yarn.lock, seems to want to add
foam-core@0.3.0-alpha.0, but not really
related to this change

Note: the extension tests are failing due to
`Cannot find module '...foam-vscode/out/test/suite/index'`.
However that shouldn't be related to this change either.

* Simplify VS Code launch tasks (shift work to typescript compiler)

* Fix circular dependency index->janitor/index->index

* Use --build flag to use TSC in Build Mode
https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript

This configures tsc to use multiple project roots (vscode, core) and run incremental builds on
changes to each projects. This will necessitate us running the core in commonjs build mode,
which is fine for testing and deployment to node environments, but won't work in the browser,
so foam-core will need a separate build config for UMD builds

* Build foam-core in commonjs mode by default (+cleanup unnecessary config)

* Create ES6 build config for distribution builds

* Cleanup yarn.lock

* Build package before running

* Fix missing lint paths and fix lint error

* Remove redundant .vscode settings files from foam-vscode project

* Add core test launch task

Co-authored-by: jojanaho <janne.ojanaho@iki.fi>
2020-07-30 21:39:16 +01:00
allcontributors[bot]
49ddc41d41 docs: add dshemetov as a contributor (#195)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-30 10:13:10 +01:00
Dmitry Shemetov
5226917e35 Update creating-new-notes.md (#194)
* Update creating-new-notes.md

Added a non-intuitive hotkey for entering notes.

* Add instructions on how to remap the key binding

Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-07-30 08:23:41 +01:00
allcontributors[bot]
ba6448ee89 docs: add vitaly-pevgonen as a contributor (#190)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-29 08:38:17 -07:00
Jani Eväkallio
ad12962192 Restructure documentation page 2020-07-28 09:32:04 +01:00
Jani Eväkallio
6a1e61d93b Add documentation for Link Formatting and Markdown Notes Autocompletion (#180)
* Add recipe to fix autocompletion problems in markdown notes

* Writeup broader link formatting guide

* Reference new note from recipes

* Update foam workspace settings

* Fix typo

Co-authored-by: Jonathan Ingall <jonny@mondago.com>
2020-07-28 08:20:26 +01:00
allcontributors[bot]
4dbb04a364 docs: add Klaudioz as a contributor (#182)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-27 23:57:57 +01:00
Claudio Canales
da5eb33bdd Some minor improvements to contribution-guide.md (#181) 2020-07-27 23:57:11 +01:00
Jani Eväkallio
b5b7f2dde0 Add epicfaace to all-contributors 2020-07-27 19:01:40 +01:00
allcontributors[bot]
a9ccd0fb6c docs: add johnlindquist as a contributor (#177)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-27 18:58:43 +01:00
John Lindquist
0155f48518 Adding a section for Jekyll config to ignore _site (#176)
* Adding a section for Jekyll config to ignore _site

* Generalise explanation

Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-07-27 18:56:24 +01:00
Ashwin Ramaswami
615b8d745f Fix spacing on readme (#172) 2020-07-27 17:49:51 +02:00
allcontributors[bot]
894441bedb docs: add MehraAkshay as a contributor (#168)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-26 23:56:22 +01:00
Jani Eväkallio
36bf39e276 v0.3.1 2020-07-26 23:49:28 +01:00
Jani Eväkallio
ff55c7425d Prepare for 0.3.1 release 2020-07-26 23:48:48 +01:00
Akshay
d8512db7aa fixed issue with opening daily note on windows (#167)
* fixed issue with opening daily note on windows

fixed issue with opening daily note on windows

* Reset yarn.lock
2020-07-26 23:43:38 +01:00
Jani Eväkallio
16a0e94d3f Link template zip 2020-07-26 16:13:44 +01:00
Jani Eväkallio
60efdaa864 Run Janitor on docs/ 2020-07-25 18:35:23 +01:00
Jani Eväkallio
5418ea8bb2 v0.3.0 2020-07-25 18:28:52 +01:00
Jani Eväkallio
50dd3685cd Prepare for 0.3.0 release 2020-07-25 18:27:08 +01:00
Jani Eväkallio
0ae0ab6c50 Remove unnecessary file 2020-07-25 18:23:05 +01:00
Jani Eväkallio
e1f5fb06c6 Add missing Janitor image 2020-07-25 18:22:46 +01:00
Jani Eväkallio
c04b342a76 Document janitor 2020-07-25 18:22:33 +01:00
Jani Eväkallio
0fc9397ed8 foam-vscode changelog 2020-07-25 18:09:11 +01:00
Jani Eväkallio
11fa878ed8 Document withExtensions 2020-07-25 18:06:55 +01:00
Jani Eväkallio
2e3f02c5bc Document daily note feature (#157)
* Document daily note feature

* Update docs/daily-notes.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* Update docs/daily-notes.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* Update docs/daily-notes.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* Update docs/recipes.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* Update docs/daily-notes.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2020-07-25 17:52:04 +01:00
Jani Eväkallio
7c6874d528 Use shared Foam instance in janitor 2020-07-25 17:41:54 +01:00
Jani Eväkallio
fe9c6461c4 Remove hello commoand from CLI 2020-07-25 17:28:06 +01:00
Thomas Koppelaar
1047443677 Update images-from-your-clipboard.md (#150) 2020-07-25 17:17:33 +01:00
CHIRAG SINGHAL
0cf2295c2a Implement janitor command to extension (#155)
* Move applyTextEdit to core

* WIP: Add janitor command in foam-vscode

* basic janitor command done

* unsaved markdown janitor solved

* export bootstrap getConfig functions

* fixed multi unsaved files text edits

* Move applyTextEdit to core

* WIP: Add janitor command in foam-vscode

* basic janitor command done

* unsaved markdown janitor solved

* export bootstrap getConfig functions

* fixed multi unsaved files text edits

* Be less greedy about definitions, only include defs at end of file

* Use link reference definitions in janitor

* Add headers/footers to tests

* Ensure janitor doesn't touch unrelated reference definitions

* Format document, convert promise trampoline to async/await for readability

* Add error handling and friendly output

* Use workspace settings for extension

* Add flag to janitor

* Use note.eol

* Fix tests

Co-authored-by: Ankit Tiwari <ankitt255@gmail.com>
Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-07-25 17:17:03 +01:00
vitaly-pevgonen
9e7c3ffed8 Recipe for publishing to Azure DevOps wiki. (#147)
* Recipe for publishing to Azure DevOps wiki.

* Small fix: Devops -> DevOps in link references.

* Update docs/azure-devops-wiki.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* Update docs/azure-devops-wiki.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* Update docs/azure-devops-wiki.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* Update docs/azure-devops-wiki.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* Update docs/azure-devops-wiki.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

* Update azure-devops-wiki.md

Co-authored-by: Vitaly Pevgonen <vitaly.pevgonen@cgi.com>
Co-authored-by: Joe Previte <jjprevite@gmail.com>
2020-07-25 17:13:11 +01:00
nixsee
c69a2bb2b1 adding recipe for migrating from Onenote (#152)
* adding recipe for migrating from Onenote

* Update docs/roadmap.md

Co-authored-by: Joe Previte <jjprevite@gmail.com>

Co-authored-by: Joe Previte <jjprevite@gmail.com>
2020-07-25 17:10:58 +01:00
Jani Eväkallio
a3ab4f53a7 Update note graph and reference list when new notes are created (#156)
* Add notes to NoteGraph when they are created

* Add experimental events to foam-core to notify listeners about added/updated notes

* Update reference definitions in active editor when new note is added

* Update document in note graph before updating references
2020-07-25 16:50:44 +01:00
Mathieu Dutour
524ab15b12 add GH workflows (#145) 2020-07-25 12:19:15 +01:00
Ankit Tiwari
fd9fe12571 Move cursor to end of file when opening daily note (#137)
* Move cursor to end of file when opening daily note

* always move cursor to end of the file

* Only move cursor focus when file is newly created

Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-07-25 12:11:23 +01:00
Jani Eväkallio
8d41d02ef4 Add thomaskoppelaar to contributors 2020-07-23 14:43:00 +01:00
Jani Eväkallio
8b578c1a1c Log ideas into inbox 2020-07-23 14:39:59 +01:00
ingalless
1e757aa7c4 Fix small typo (#148) 2020-07-23 13:54:27 +02:00
Riccardo
c88c24f97e DX: repo-wide build tasks (#144) 2020-07-22 00:11:04 +01:00
allcontributors[bot]
0c95ea7ca1 docs: add synesthesia as a contributor (#143)
* docs: update docs/index.md [skip ci]

* docs: update readme.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-21 07:49:30 +01:00
Julian Elve
00d1bd3a23 Add recipe for capturing notes from Drafts app on iOS (#132)
Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-07-20 20:42:28 +01:00
allcontributors[bot]
a2e511ec6f docs: add lostintangent as a contributor (#142)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-20 20:13:24 +01:00
allcontributors[bot]
639a1ea21c docs: add chirag-singhal as a contributor (#141)
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2020-07-20 20:11:24 +01:00
Jonathan Carter
271017c663 Adding GistPad recipe (#138)
Co-authored-by: Joe Previte <jjprevite@gmail.com>
Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-07-20 20:10:42 +01:00
Ankit Tiwari
c7277383dd Initialise note.title only if heading exists (#136)
Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-07-20 20:00:39 +01:00
Ankit Tiwari
339274309f Implement foam-cli janitor command (#112)
* Add Note.definitions and Note.end

* Use stringifyMarkdownLinkReferenceDefinition in foam-vscode

This commit also applies prettier to previously badly formatted files, so the diff is larger than necessary

* Add Note.end and Note.definitions to foam-core tests

* Export stringifyMarkdownLinkReferenceDefinition from foam-core

* Implement first version of generateLinkReferenceDefinitions janitor method

* Add partial tests for generateLinkReferenceDefinitions

* Setup Jest

* Add remove link definitions test to generateLinkReferences janitor method

* Add update link definitions test to generateLinkReferences janitor method

* export TextEdit interface

* Implement first version of applyText method

* Add no change  in link definitions test to generateLinkReferences janitor method

* Add  partial tests for writeFileToDisk method

* Implement generateHeading janitor method

Co-authored-by: CHIRAG SINGHAL <csinghal208@gmail.com>

* Move noteGraph scaffolding to utils

* Implement basic foam-cli janitor command

* kebab case file names while running janitor

* added generate Heading function to janitor

* added tests for generateHeading in janitor

* PR changes

* Add ora spinner

* Store endOfLine inside Note

* Use note.eol to append line endings

* check if given path is valid directory

* minor fixes

* added glob as dependency

* ignore link refrences with no file

* added tests files for migration

* Solves issue with roam migration

* fixed core tests

* Replace dashify by github-slugger

* used github slagger instead of dashify

* Add foam-core as dependency

* added foam migrate command

* updated foam janitor command

* minor fixes

* removed extra test files

* removed excess white space

* Refactor (PR changes)

1.  Renamed initializeNoteGraph.ts to initialize-note-graph.ts to be consistent with naming

2.  Refactored code in janitor and migrate commands

* Mock fs for tests

* Use Promise.resolve(null)

* Make fs tests no blocking by using promises

* Refactor renameFile to use path module

* Propagate the error from writeFileToDisk method

* Remove posttest command

* Run prettier before merge to get a cleaner diff

* Fix typo in variable name

* yarn lint --fix

* Update markdown-provider tests to support new API

* Add missing includeExtension argument

Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
Co-authored-by: chirag-singhal <csinghal208@gmail.com>
2020-07-20 19:28:41 +01:00
Riccardo
dc1c237c05 Paths in link definition section now include file extension (#133)
* Add .md extension when generating link definition section

The change in the definition allows links to be navigated in github
The changes in the JS inside _layouts maintains the html navigation when publishing to github pages.

For more info see https://foambubble.github.io/foam/link-reference-definition-improvements

* Updated existing docs to new link definition section

* better md file detection and consolidated code in parent template

* added mdx extension to markdown file detection

* added note about shortcut taken

* added configuration to toggle extensions in wikilinks + tests

* Revert "Updated existing docs to new link definition section"

This reverts commit 50e4a527e0.

We'll do this change once the version has been released

Co-authored-by: Jani Eväkallio <jani.evakallio@gmail.com>
2020-07-17 14:20:00 +01:00
434 changed files with 34693 additions and 17660 deletions

View File

@@ -175,7 +175,8 @@
"profile": "https://anku.netlify.com/",
"contributions": [
"doc",
"test"
"test",
"code"
]
},
{
@@ -211,7 +212,8 @@
"avatar_url": "https://avatars3.githubusercontent.com/u/8980971?v=4",
"profile": "https://sanketdg.github.io",
"contributions": [
"doc"
"doc",
"code"
]
},
{
@@ -241,6 +243,785 @@
"code",
"doc"
]
},
{
"login": "chirag-singhal",
"name": "CHIRAG SINGHAL",
"avatar_url": "https://avatars3.githubusercontent.com/u/42653703?v=4",
"profile": "https://github.com/chirag-singhal",
"contributions": [
"code"
]
},
{
"login": "lostintangent",
"name": "Jonathan Carter",
"avatar_url": "https://avatars3.githubusercontent.com/u/116461?v=4",
"profile": "https://github.com/lostintangent",
"contributions": [
"doc"
]
},
{
"login": "synesthesia",
"name": "Julian Elve",
"avatar_url": "https://avatars3.githubusercontent.com/u/181399?v=4",
"profile": "https://www.synesthesia.co.uk",
"contributions": [
"doc"
]
},
{
"login": "thomaskoppelaar",
"name": "Thomas Koppelaar",
"avatar_url": "https://avatars3.githubusercontent.com/u/36331365?v=4",
"profile": "https://github.com/thomaskoppelaar",
"contributions": [
"question",
"code",
"userTesting"
]
},
{
"login": "MehraAkshay",
"name": "Akshay",
"avatar_url": "https://avatars1.githubusercontent.com/u/8671497?v=4",
"profile": "http://www.akshaymehra.com",
"contributions": [
"code"
]
},
{
"login": "johnlindquist",
"name": "John Lindquist",
"avatar_url": "https://avatars0.githubusercontent.com/u/36073?v=4",
"profile": "http://johnlindquist.com",
"contributions": [
"doc"
]
},
{
"login": "epicfaace",
"name": "Ashwin Ramaswami",
"avatar_url": "https://avatars2.githubusercontent.com/u/1689183?v=4",
"profile": "https://ashwin.run/",
"contributions": [
"doc"
]
},
{
"login": "Klaudioz",
"name": "Claudio Canales",
"avatar_url": "https://avatars1.githubusercontent.com/u/632625?v=4",
"profile": "https://github.com/Klaudioz",
"contributions": [
"doc"
]
},
{
"login": "vitaly-pevgonen",
"name": "vitaly-pevgonen",
"avatar_url": "https://avatars0.githubusercontent.com/u/6272738?v=4",
"profile": "https://github.com/vitaly-pevgonen",
"contributions": [
"doc"
]
},
{
"login": "dshemetov",
"name": "Dmitry Shemetov",
"avatar_url": "https://avatars0.githubusercontent.com/u/1810426?v=4",
"profile": "https://dshemetov.github.io",
"contributions": [
"doc"
]
},
{
"login": "hooncp",
"name": "hooncp",
"avatar_url": "https://avatars1.githubusercontent.com/u/48883554?v=4",
"profile": "https://github.com/hooncp",
"contributions": [
"doc"
]
},
{
"login": "martinlaws",
"name": "Martin Laws",
"avatar_url": "https://avatars1.githubusercontent.com/u/13721239?v=4",
"profile": "http://rt-canada.ca",
"contributions": [
"doc"
]
},
{
"login": "sksmith",
"name": "Sean K Smith",
"avatar_url": "https://avatars3.githubusercontent.com/u/2085441?v=4",
"profile": "http://seanksmith.me",
"contributions": [
"code"
]
},
{
"login": "kneely",
"name": "Kevin Neely",
"avatar_url": "https://avatars1.githubusercontent.com/u/37545028?v=4",
"profile": "https://www.linkedin.com/in/kevin-neely/",
"contributions": [
"doc"
]
},
{
"login": "ariefrahmansyah",
"name": "Arief Rahmansyah",
"avatar_url": "https://avatars3.githubusercontent.com/u/8122852?v=4",
"profile": "https://ariefrahmansyah.dev",
"contributions": [
"doc"
]
},
{
"login": "vHanda",
"name": "Vishesh Handa",
"avatar_url": "https://avatars2.githubusercontent.com/u/426467?v=4",
"profile": "http://vhanda.in",
"contributions": [
"doc"
]
},
{
"login": "HeroicHitesh",
"name": "Hitesh Kumar",
"avatar_url": "https://avatars3.githubusercontent.com/u/37622734?v=4",
"profile": "http://www.linkedin.com/in/heroichitesh",
"contributions": [
"doc"
]
},
{
"login": "spencerwooo",
"name": "Spencer Woo",
"avatar_url": "https://avatars2.githubusercontent.com/u/32114380?v=4",
"profile": "https://spencerwoo.com",
"contributions": [
"doc"
]
},
{
"login": "ingalless",
"name": "ingalless",
"avatar_url": "https://avatars3.githubusercontent.com/u/22981941?v=4",
"profile": "https://ingalless.com",
"contributions": [
"code",
"doc"
]
},
{
"login": "jmg-duarte",
"name": "José Duarte",
"avatar_url": "https://avatars2.githubusercontent.com/u/15343819?v=4",
"profile": "http://jmg-duarte.github.io",
"contributions": [
"code",
"doc"
]
},
{
"login": "yenly",
"name": "Yenly",
"avatar_url": "https://avatars1.githubusercontent.com/u/6759658?v=4",
"profile": "https://www.yenly.wtf",
"contributions": [
"doc"
]
},
{
"login": "hikerpig",
"name": "hikerpig",
"avatar_url": "https://avatars1.githubusercontent.com/u/2259688?v=4",
"profile": "https://www.hikerpig.cn",
"contributions": [
"code"
]
},
{
"login": "Sigfried",
"name": "Sigfried Gold",
"avatar_url": "https://avatars1.githubusercontent.com/u/1586931?v=4",
"profile": "http://sigfried.org",
"contributions": [
"doc"
]
},
{
"login": "tristansokol",
"name": "Tristan Sokol",
"avatar_url": "https://avatars3.githubusercontent.com/u/867661?v=4",
"profile": "http://www.tristansokol.com",
"contributions": [
"code"
]
},
{
"login": "umbrellait-danil-rodin",
"name": "Danil Rodin",
"avatar_url": "https://avatars0.githubusercontent.com/u/49779373?v=4",
"profile": "https://umbrellait.com",
"contributions": [
"doc"
]
},
{
"login": "scott-joe",
"name": "Scott Williams",
"avatar_url": "https://avatars1.githubusercontent.com/u/2026866?v=4",
"profile": "https://www.linkedin.com/in/scottjoewilliams/",
"contributions": [
"doc"
]
},
{
"login": "Jackiexiao",
"name": "jackiexiao",
"avatar_url": "https://avatars2.githubusercontent.com/u/18050469?v=4",
"profile": "https://jackiexiao.github.io/blog",
"contributions": [
"doc"
]
},
{
"login": "jbn",
"name": "John B Nelson",
"avatar_url": "https://avatars3.githubusercontent.com/u/78835?v=4",
"profile": "https://generativist.substack.com/",
"contributions": [
"doc"
]
},
{
"login": "asifm",
"name": "Asif Mehedi",
"avatar_url": "https://avatars2.githubusercontent.com/u/3958387?v=4",
"profile": "https://github.com/asifm",
"contributions": [
"doc"
]
},
{
"login": "litanlitudan",
"name": "Tan Li",
"avatar_url": "https://avatars2.githubusercontent.com/u/4970420?v=4",
"profile": "https://github.com/litanlitudan",
"contributions": [
"code"
]
},
{
"login": "ShaunaGordon",
"name": "Shauna Gordon",
"avatar_url": "https://avatars1.githubusercontent.com/u/579361?v=4",
"profile": "http://shaunagordon.com",
"contributions": [
"doc"
]
},
{
"login": "MCluck90",
"name": "Mike Cluck",
"avatar_url": "https://avatars1.githubusercontent.com/u/1753801?v=4",
"profile": "https://mcluck.tech",
"contributions": [
"code"
]
},
{
"login": "bpugh",
"name": "Brandon Pugh",
"avatar_url": "https://avatars1.githubusercontent.com/u/684781?v=4",
"profile": "http://brandonpugh.com",
"contributions": [
"code"
]
},
{
"login": "themaxdavitt",
"name": "Max Davitt",
"avatar_url": "https://avatars1.githubusercontent.com/u/27709025?v=4",
"profile": "https://max.davitt.me",
"contributions": [
"doc"
]
},
{
"login": "anglinb",
"name": "Brian Anglin",
"avatar_url": "https://avatars3.githubusercontent.com/u/2637602?v=4",
"profile": "http://briananglin.me",
"contributions": [
"doc"
]
},
{
"login": "elswork",
"name": "elswork",
"avatar_url": "https://avatars1.githubusercontent.com/u/1455507?v=4",
"profile": "http://deft.work",
"contributions": [
"doc"
]
},
{
"login": "leonhfr",
"name": "léon h",
"avatar_url": "https://avatars.githubusercontent.com/u/19996318?v=4",
"profile": "http://leonh.fr/",
"contributions": [
"code"
]
},
{
"login": "njnygaard",
"name": "Nikhil Nygaard",
"avatar_url": "https://avatars.githubusercontent.com/u/4606342?v=4",
"profile": "https://nygaard.site",
"contributions": [
"doc"
]
},
{
"login": "nitwit-se",
"name": "Mark Dixon",
"avatar_url": "https://avatars.githubusercontent.com/u/1382124?v=4",
"profile": "http://www.nitwit.se",
"contributions": [
"code"
]
},
{
"login": "joeltjames",
"name": "Joel James",
"avatar_url": "https://avatars.githubusercontent.com/u/3732400?v=4",
"profile": "https://github.com/joeltjames",
"contributions": [
"code"
]
},
{
"login": "ryo33",
"name": "Hashiguchi Ryo",
"avatar_url": "https://avatars.githubusercontent.com/u/8780513?v=4",
"profile": "https://www.ryo33.com",
"contributions": [
"doc"
]
},
{
"login": "movermeyer",
"name": "Michael Overmeyer",
"avatar_url": "https://avatars.githubusercontent.com/u/1459385?v=4",
"profile": "https://movermeyer.com",
"contributions": [
"code"
]
},
{
"login": "derrickqin",
"name": "Derrick Qin",
"avatar_url": "https://avatars.githubusercontent.com/u/3038111?v=4",
"profile": "https://github.com/derrickqin",
"contributions": [
"doc"
]
},
{
"login": "zomars",
"name": "Omar López",
"avatar_url": "https://avatars.githubusercontent.com/u/3504472?v=4",
"profile": "https://www.linkedin.com/in/zomars/",
"contributions": [
"doc"
]
},
{
"login": "RobinKing",
"name": "Robin King",
"avatar_url": "https://avatars.githubusercontent.com/u/1583193?v=4",
"profile": "http://robincn.com",
"contributions": [
"code"
]
},
{
"login": "dheepakg",
"name": "Dheepak ",
"avatar_url": "https://avatars.githubusercontent.com/u/4730170?v=4",
"profile": "http://twitter.com/deegovee",
"contributions": [
"doc"
]
},
{
"login": "daniel-vera-g",
"name": "Daniel VG",
"avatar_url": "https://avatars.githubusercontent.com/u/28257108?v=4",
"profile": "https://github.com/daniel-vera-g",
"contributions": [
"doc"
]
},
{
"login": "Barabazs",
"name": "Barabas",
"avatar_url": "https://avatars.githubusercontent.com/u/31799121?v=4",
"profile": "https://github.com/Barabazs",
"contributions": [
"code"
]
},
{
"login": "EngincanV",
"name": "Engincan VESKE",
"avatar_url": "https://avatars.githubusercontent.com/u/43685404?v=4",
"profile": "http://enginveske@gmail.com",
"contributions": [
"doc"
]
},
{
"login": "pderaaij",
"name": "Paul de Raaij",
"avatar_url": "https://avatars.githubusercontent.com/u/495374?v=4",
"profile": "http://www.paulderaaij.nl",
"contributions": [
"code"
]
},
{
"login": "bronson",
"name": "Scott Bronson",
"avatar_url": "https://avatars.githubusercontent.com/u/1776?v=4",
"profile": "https://github.com/bronson",
"contributions": [
"doc"
]
},
{
"login": "rafo",
"name": "Rafael Riedel",
"avatar_url": "https://avatars.githubusercontent.com/u/41793?v=4",
"profile": "http://rafaelriedel.de",
"contributions": [
"doc"
]
},
{
"login": "Pearcekieser",
"name": "Pearcekieser",
"avatar_url": "https://avatars.githubusercontent.com/u/5055971?v=4",
"profile": "https://github.com/Pearcekieser",
"contributions": [
"doc"
]
},
{
"login": "theowenyoung",
"name": "Owen Young",
"avatar_url": "https://avatars.githubusercontent.com/u/62473795?v=4",
"profile": "https://github.com/theowenyoung",
"contributions": [
"doc",
"content"
]
},
{
"login": "ksprashu",
"name": "Prashanth Subrahmanyam",
"avatar_url": "https://avatars.githubusercontent.com/u/476729?v=4",
"profile": "http://www.prashu.com",
"contributions": [
"doc"
]
},
{
"login": "JonasSprenger",
"name": "Jonas SPRENGER",
"avatar_url": "https://avatars.githubusercontent.com/u/25108895?v=4",
"profile": "https://github.com/JonasSprenger",
"contributions": [
"code"
]
},
{
"login": "Laptop765",
"name": "Paul",
"avatar_url": "https://avatars.githubusercontent.com/u/1468359?v=4",
"profile": "https://github.com/Laptop765",
"contributions": [
"doc"
]
},
{
"login": "eltociear",
"name": "Ikko Ashimine",
"avatar_url": "https://avatars.githubusercontent.com/u/22633385?v=4",
"profile": "https://bandism.net/",
"contributions": [
"doc"
]
},
{
"login": "memeplex",
"name": "memeplex",
"avatar_url": "https://avatars.githubusercontent.com/u/2845433?v=4",
"profile": "https://github.com/memeplex",
"contributions": [
"code"
]
},
{
"login": "AndreiD049",
"name": "AndreiD049",
"avatar_url": "https://avatars.githubusercontent.com/u/52671223?v=4",
"profile": "https://github.com/AndreiD049",
"contributions": [
"code"
]
},
{
"login": "iam-yan",
"name": "Yan",
"avatar_url": "https://avatars.githubusercontent.com/u/48427014?v=4",
"profile": "https://github.com/iam-yan",
"contributions": [
"doc"
]
},
{
"login": "jimt",
"name": "Jim Tittsler",
"avatar_url": "https://avatars.githubusercontent.com/u/180326?v=4",
"profile": "https://WikiEducator.org/User:JimTittsler",
"contributions": [
"doc"
]
},
{
"login": "MalcolmMielle",
"name": "Malcolm Mielle",
"avatar_url": "https://avatars.githubusercontent.com/u/4457840?v=4",
"profile": "http://malcolmmielle.wordpress.com/",
"contributions": [
"doc"
]
},
{
"login": "veesar",
"name": "Veesar",
"avatar_url": "https://avatars.githubusercontent.com/u/74916913?v=4",
"profile": "https://snippets.page/",
"contributions": [
"doc"
]
},
{
"login": "bentongxyz",
"name": "bentongxyz",
"avatar_url": "https://avatars.githubusercontent.com/u/60358804?v=4",
"profile": "https://github.com/bentongxyz",
"contributions": [
"code"
]
},
{
"login": "techCarpenter",
"name": "Brian DeVries",
"avatar_url": "https://avatars.githubusercontent.com/u/42778030?v=4",
"profile": "https://brianjdevries.com",
"contributions": [
"code"
]
},
{
"login": "cliffordfajardo",
"name": "Clifford Fajardo ",
"avatar_url": "https://avatars.githubusercontent.com/u/6743796?v=4",
"profile": "http://Cliffordfajardo.com",
"contributions": [
"tool"
]
},
{
"login": "chrisUsick",
"name": "Chris Usick",
"avatar_url": "https://avatars.githubusercontent.com/u/6589365?v=4",
"profile": "http://cu-dev.ca",
"contributions": [
"code"
]
},
{
"login": "josephdecock",
"name": "Joe DeCock",
"avatar_url": "https://avatars.githubusercontent.com/u/1145533?v=4",
"profile": "https://github.com/josephdecock",
"contributions": [
"code"
]
},
{
"login": "drewtyler",
"name": "Drew Tyler",
"avatar_url": "https://avatars.githubusercontent.com/u/5640816?v=4",
"profile": "http://www.drewtyler.com",
"contributions": [
"doc"
]
},
{
"login": "Lauviah0622",
"name": "Lauviah0622",
"avatar_url": "https://avatars.githubusercontent.com/u/43416399?v=4",
"profile": "https://github.com/Lauviah0622",
"contributions": [
"code"
]
},
{
"login": "joshdover",
"name": "Josh Dover",
"avatar_url": "https://avatars.githubusercontent.com/u/1813008?v=4",
"profile": "https://www.elastic.co/elastic-agent",
"contributions": [
"code"
]
},
{
"login": "phelma",
"name": "Phil Helm",
"avatar_url": "https://avatars.githubusercontent.com/u/4057948?v=4",
"profile": "http://phelm.co.uk",
"contributions": [
"doc"
]
},
{
"login": "lingyv-li",
"name": "Larry Li",
"avatar_url": "https://avatars.githubusercontent.com/u/8937944?v=4",
"profile": "https://github.com/lingyv-li",
"contributions": [
"code"
]
},
{
"login": "infogulch",
"name": "Joe Taber",
"avatar_url": "https://avatars.githubusercontent.com/u/133882?v=4",
"profile": "https://github.com/infogulch",
"contributions": [
"doc"
]
},
{
"login": "readingsnail",
"name": "Woosuk Park",
"avatar_url": "https://avatars.githubusercontent.com/u/1904967?v=4",
"profile": "https://www.readingsnail.pe.kr",
"contributions": [
"doc"
]
},
{
"login": "dmurph",
"name": "Daniel Murphy",
"avatar_url": "https://avatars.githubusercontent.com/u/294026?v=4",
"profile": "http://www.dmurph.com",
"contributions": [
"code"
]
},
{
"login": "Dominic-DallOsto",
"name": "Dominic D",
"avatar_url": "https://avatars.githubusercontent.com/u/26859884?v=4",
"profile": "https://github.com/Dominic-DallOsto",
"contributions": [
"code"
]
},
{
"login": "elgirafo",
"name": "luca",
"avatar_url": "https://avatars.githubusercontent.com/u/80516439?v=4",
"profile": "http://elgirafo.xyz",
"contributions": [
"doc"
]
},
{
"login": "Lloyd-Jackman-UKPL",
"name": "Lloyd Jackman",
"avatar_url": "https://avatars.githubusercontent.com/u/55206370?v=4",
"profile": "https://github.com/Lloyd-Jackman-UKPL",
"contributions": [
"doc"
]
},
{
"login": "sn3akiwhizper",
"name": "sn3akiwhizper",
"avatar_url": "https://avatars.githubusercontent.com/u/102705294?v=4",
"profile": "http://sn3akiwhizper.github.io",
"contributions": [
"doc"
]
},
{
"login": "jonathanpberger",
"name": "jonathan berger",
"avatar_url": "https://avatars.githubusercontent.com/u/41085?v=4",
"profile": "http://jonathanpberger.com/",
"contributions": [
"doc"
]
},
{
"login": "badsketch",
"name": "Daniel Wang",
"avatar_url": "https://avatars.githubusercontent.com/u/8953212?v=4",
"profile": "https://github.com/badsketch",
"contributions": [
"code"
]
},
{
"login": "tlylt",
"name": "Liu YongLiang",
"avatar_url": "https://avatars.githubusercontent.com/u/41845017?v=4",
"profile": "http://yongliangliu.com",
"contributions": [
"doc"
]
},
{
"login": "Skakerman",
"name": "Scott Akerman",
"avatar_url": "https://avatars.githubusercontent.com/u/15224439?v=4",
"profile": "http://scottakerman.com",
"contributions": [
"code"
]
},
{
"login": "jimgraham",
"name": "Jim Graham",
"avatar_url": "https://avatars.githubusercontent.com/u/430293?v=4",
"profile": "http://www.jim-graham.net/",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,

61
.eslintrc.json Normal file
View File

@@ -0,0 +1,61 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"env": { "node": true, "es6": true },
"plugins": ["jest"],
"extends": [
"eslint:recommended",
"plugin:import/typescript",
"plugin:jest/recommended"
],
"rules": {
"no-redeclare": "off",
"no-unused-vars": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/no-unused-vars": "warn",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["**/src/test/**", "**/src/**/*{test,spec}.ts"]
}
]
},
"overrides": [
{
// Restrict usage of fs module outside tests to keep foam compatible with the browser
"files": ["**/src/**"],
"excludedFiles": ["**/src/test/**", "**/src/**/*{test,spec}.ts"],
"rules": {
"no-restricted-imports": [
"error",
{
"name": "fs",
"message": "Extension code must not rely Node.js filesystem, use vscode.workspace.fs instead."
}
]
}
}
],
"settings": {
"import/core-modules": ["vscode"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
},
"ignorePatterns": ["**/core/common/**", "*.js"],
"reportUnusedDisableDirectives": true
}

97
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,97 @@
name: 'Bug report'
description: Create a report to help us improve
body:
- type: markdown
attributes:
value: |
Thank you for reporting an issue :pray:.
This issue tracker is for reporting bugs found in `foam` (https://github.com/foambubble).
If you have a question about how to achieve something and are struggling, please post a question
inside of either of the following places:
- Foam's Discussion's tab: https://github.com/foambubble/foam/discussions
- Foam's Discord channel: https://foambubble.github.io/join-discord/g
Before submitting a new bug/issue, please check the links below to see if there is a solution or question posted there already:
- Foam's Issue's tab: https://github.com/foambubble/foam/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc
- Foam's closed issues tab: https://github.com/foambubble/foam/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aclosed
- Foam's Discussions tab: https://github.com/foambubble/foam/discussions
The more information you fill in, the better the community can help you.
- type: textarea
id: description
attributes:
label: Describe the bug
description: Provide a clear and concise description of the challenge you are running into.
validations:
required: true
- type: input
id: reproducible_example
attributes:
label: Small Reproducible Example
description: |
Note:
- Your bug will may get fixed much faster if there is a way we can somehow run your example or code.
- To create a shareable example, consider cloning the following Foam Github template: https://github.com/foambubble/foam-template
- Please read these tips for providing a minimal example: https://stackoverflow.com/help/mcve.
placeholder: |
e.g. Link to your github repository containing a small reproducible example that the team can run.
validations:
required: false
- type: textarea
id: steps
attributes:
label: Steps to Reproduce the Bug or Issue
description: Describe the steps we have to take to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: Provide a clear and concise description of what you expected to happen.
placeholder: |
As a user, I expected ___ behavior but i am seeing ___
validations:
required: true
- type: textarea
id: screenshots_or_videos
attributes:
label: Screenshots or Videos
description: |
If applicable, add screenshots or a video to help explain your problem.
For more information on the supported file image/file types and the file size limits, please refer
to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files
placeholder: |
You can drag your video or image files inside of this editor ↓
- type: input
id: os
attributes:
label: Operating System Version
description: What opearting system are you using?
placeholder: |
- OS: [e.g. macOS, Windows, Linux]
validations:
required: true
- type: input
id: vscode_version
attributes:
label: Visual Studio Code Version
description: |
What version of Visual Studio Code are you using?
How to find Visual Studio Code Version: https://code.visualstudio.com/docs/supporting/FAQ#_how-do-i-find-the-version
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional context
description: |
Add any other context about the problem here.
The Foam log output for VSCode can be found here: https://github.com/foambubble/foam/blob/master/docs/features/foam-logging-in-vscode.md

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Question
url: https://foambubble.github.io/join-discord/g
about: Please ask and answer questions here.

View File

@@ -0,0 +1,42 @@
name: Feature request
description: Suggest an idea for the `Foam` project
body:
- type: markdown
attributes:
value: |
This issue form is for requesting features only!
If you want to report a bug, please use the [bug report](https://github.com/foambubble/foam/issues/new?assignees=&labels=&template=bug_report.yml) form.
- type: textarea
validations:
required: true
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- type: textarea
validations:
required: true
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
placeholder: |
As a user, I expected ___ behavior but ___ ...
Ideal Steps I would like to see:
1. Go to '...'
2. Click on '....'
3. ....
- type: textarea
validations:
required: true
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
attributes:
label: Screenshots or Videos
description: |
If applicable, add screenshots or a video to help explain your problem.
For more information on the supported file image/file types and the file size limits, please refer
to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files
placeholder: |
You can drag your video or image files inside of this editor ↓

65
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,65 @@
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v1
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Restore Dependencies and VS Code test instance
uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
packages/foam-vscode/.vscode-test
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', 'packages/foam-vscode/src/test/run-tests.ts') }}-${{ secrets.CACHE_VERSION }}
- name: Install Dependencies
run: yarn
- name: Check Lint Rules
run: yarn lint
test:
name: Build and Test
strategy:
matrix:
os: [macos-12, ubuntu-22.04, windows-2022]
runs-on: ${{ matrix.os }}
env:
OS: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v1
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Restore Dependencies and VS Code test instance
uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
packages/foam-vscode/.vscode-test
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', 'packages/foam-vscode/src/test/run-tests.ts') }}-${{ secrets.CACHE_VERSION }}
- name: Install Dependencies
run: yarn
- name: Build Packages
run: yarn build
- name: Run Tests
uses: GabrielBB/xvfb-action@v1.4
with:
run: yarn test --stream

43
.github/workflows/update-docs.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Update Docs
on:
push:
branches:
- master
paths:
- docs/user/**/*
workflow_dispatch:
jobs:
update-docs:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
repository: foambubble/foam-template
path: foam-template
- uses: actions/checkout@v3
with:
path: foam
- name: Copy and fixup user docs files
id: copy
run: |
rm -r foam-template/docs
cp -r foam/docs/user foam-template/docs
# Strip autogenerated wikileaks references because
# they are not an appropriate default user experience.
(cd foam-template/docs; sed -i '/\[\/\/begin\]/,/\[\/\/end\]/d' $(find . -type f -name \*.md))
# Set the commit message format
echo "message=Docs sync @ $(cd foam; git log --pretty='format:%h %s')" >> $GITHUB_OUTPUT
- uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.FOAM_DOCS_SYNC_TOKEN }}
path: foam-template
commit-message: ${{ steps.copy.outputs.message }}
branch: bot/foam-docs-sync
delete-branch: true
title: Sync docs from foam
body: Copy docs from main foam repo

5
.gitignore vendored
View File

@@ -4,4 +4,9 @@ node_modules
*.tsbuildinfo
*.vsix
*.log
out
dist
docs/_site
docs/.sass-cache
docs/.jekyll-metadata
.test-workspace

90
.vscode/launch.json vendored
View File

@@ -3,47 +3,51 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
// This task is also defined in packages/foam-vscode/.vscode/launch.json
// for when running separately outside of the monorepo environment
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/packages/foam-vscode"
],
"outFiles": [
"${workspaceFolder}/packages/foam-vscode/out/**/*.js"
],
"preLaunchTask": "Build foam-vscode"
},
{
// This task is also defined in packages/foam-vscode/.vscode/launch.json
// for when running separately outside of the monorepo environment
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/packages/foam-vscode",
"--extensionTestsPath=${workspaceFolder}/packages/foam-vscode/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/packages/foam-vscode/out/test/**/*.js"
],
"preLaunchTask": "Build foam-vscode"
},
{
"type": "node",
"request": "launch",
"name": "Workspace Manager tests",
"program": "${workspaceFolder}/node_modules/tsdx/dist/index.js",
"args": ["test"],
"cwd": "${workspaceFolder}/packages/foam-core",
"internalConsoleOptions": "openOnSessionStart"
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Debug Jest Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"${workspaceFolder}/packages/foam-vscode/.test-workspace",
"--disable-extensions",
"--disable-workspace-trust",
"--extensionDevelopmentPath=${workspaceFolder}/packages/foam-vscode",
"--extensionTestsPath=${workspaceFolder}/packages/foam-vscode/out/test/suite"
],
"outFiles": [
"${workspaceFolder}/packages/foam-vscode/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Run VSCode Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/packages/foam-vscode"
],
"outFiles": [
"${workspaceFolder}/packages/foam-vscode/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"type": "node",
"name": "vscode-jest-tests",
"request": "launch",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"cwd": "${workspaceFolder}/packages/foam-vscode",
"runtimeExecutable": "yarn",
"args": [
"jest",
"--runInBand",
"--watchAll=false"
]
}
]
}

46
.vscode/settings.json vendored
View File

@@ -1,15 +1,35 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
// set these to true to hide folders with the compiled JS files,
"packages/**/out": false,
"packages/**/dist": false
},
"search.exclude": {
// set this to false to include compiled JS folders in search results
"packages/**/out": true,
"packages/**/dist": true
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
"files.exclude": {
// set these to true to hide folders with the compiled JS files,
"packages/**/out": false,
"packages/**/dist": false
},
"search.exclude": {
// set this to false to include compiled JS folders in search results
"packages/**/out": true,
"packages/**/dist": true
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"foam.edit.linkReferenceDefinitions": "withExtensions",
"foam.files.ignore": [
"**/.vscode/**/*",
"**/_layouts/**/*",
"**/_site/**/*",
"**/node_modules/**/*",
"packages/**/*"
],
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"jest.autoRun": "off",
"jest.rootPath": "packages/foam-vscode",
"jest.jestCommandLine": "yarn jest",
"gitdoc.enabled": false,
"search.mode": "reuseEditor",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}

45
.vscode/tasks.json vendored
View File

@@ -1,22 +1,31 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
// This task is also defined in packages/foam-vscode/.vscode/tasks.json
// for when running separately outside of the monorepo environment
"type": "npm",
"script": "watch",
"label": "Build foam-vscode",
"path": "packages/foam-vscode",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "silent",
"revealProblems": "onProblem",
"focus": true
}
}
]
"version": "2.0.0",
"tasks": [
{
"label": "watch: foam-vscode",
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "always"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "test: all packages",
"type": "npm",
"script": "test",
"problemMatcher": [],
"group": {
"kind": "test",
"isDefault": true
}
}
]
}

1
.yarnrc Normal file
View File

@@ -0,0 +1 @@
--ignore-engines true

View File

@@ -1,14 +0,0 @@
# Contributing
Hello, friend.
This repository is a [monorepo](https://en.wikipedia.org/wiki/Monorepo) managed by [Yarn Workspaces](https://classic.yarnpkg.com/en/docs/workspaces/).
- The [packages](packages/) directory contains all Foam core code packages
- The [docs](docs/) directory contains a Foam workspace that hosts the official [documentation site](https://foambubble.github.io/foam)
The foam starter template lives outside of this repository at [foambubble/foam-template](https://github.com/foambubble/foam-template).
See [Foam Contribution Guide](https://foambubble.github.io/foam/contribution-guide) on the rendered Foam workspace for more information on how to contribute to Foam.
Thank you for your interest!

17
LICENSE
View File

@@ -1,6 +1,6 @@
The MIT Licence (MIT)
Copyright 2020 Jani Eväkallio <jani.evakallio@gmail.com>
Copyright 2020 - present Jani Eväkallio <jani.evakallio@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
@@ -17,4 +17,17 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Where noted, some code uses the following license:
MIT License
Copyright (c) 2015 - present Microsoft Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 935 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 KiB

4
docs/.vscode/custom-tag-style.css vendored Normal file
View File

@@ -0,0 +1,4 @@
.foam-tag{
color:#ffffff;
background-color: #000000;
}

View File

@@ -14,9 +14,6 @@
// Tons of markdown goodies (lists, tables of content, so much more)
"yzhang.markdown-all-in-one",
// [[wiki-links]], backlinking etc
"kortina.vscode-markdown-notes",
// Graph visualizer
"tchayen.markdown-links",

View File

@@ -4,7 +4,8 @@
"editor.wrappingIndent": "indent",
"editor.overviewRulerBorder": false,
"editor.lineHeight": 24,
"workbench.colorTheme": "Gray Matter Light",
"foam.edit.linkReferenceDefinitions": "withExtensions",
"vscodeMarkdownNotes.noteCompletionConvention": "noExtension",
"[markdown]": {
"editor.quickSuggestions": {
"other": true,
@@ -14,5 +15,19 @@
},
"cSpell.language": "en-GB",
"git.enableSmartCommit": true,
"git.postCommitCommand": "sync"
"git.postCommitCommand": "sync",
"spellright.language": [
"en"
],
"spellright.documentTypes": [
"markdown",
"plaintext"
],
"files.exclude": {
"_site/**": true
},
"files.insertFinalNewline": true,
"markdown.styles": [
".vscode/custom-tag-style.css"
]
}

1
docs/.vscode/spellright.dict vendored Normal file
View File

@@ -0,0 +1 @@
Backlinking

12
docs/404.md Normal file
View File

@@ -0,0 +1,12 @@
# Page not found!
Well, that shouldn't have happened!
If you got here via a link from another document, please file an [issue](https://github.com/foambubble/foam/issues) on our GitHub repo including:
- the page you came from
- the link you followed
Thanks!
-The Foam Team

View File

@@ -0,0 +1,29 @@
# Achieving Greater Privacy and Security
Foam, at its heart and committed to in its [Principles](https://foambubble.github.io/foam/principles), allows the user to control their content in a flexible and non-prescriptive manner. This extends to user preferences, or requirements depending on application and context, around both privacy and security. One way that these use cases can be met is through the use of open-source and not-for-profit mechanisms in the user's workflow to provide a functional equivalence.
Here are a few suggestions on increasing privacy and security when using Foam.
## VS Codium: The Open Source build of VS Code
Foam is built upon VS Code, itself a Microsoft product built on top of an open source project.
As can be found [here](https://github.com/Microsoft/vscode/issues/60#issuecomment-161792005) the **VS Code product itself is not fully open source**. This means that its inner workings are not fully transparent, facilitating the collection and distribution of your data, as specified in its [Privacy Statement](https://devblogs.microsoft.com/visualstudio/privacy/).
If you prefer a fully open source editor based on the same core of VS Code (and for most intents and purposes equivalent to it), you can try [VSCodium](https://github.com/VSCodium).
In its own introduction it is described as, "Binary releases of VS Code without MS branding/telemetry/licensing". Installation packages are easily available across Windows, Unix and Linux (or you can build it from source!).
Access to the VS Code marketplace of add-ons remains in place, including the Foam extension.
The change you will notice in using VS Code versus VS Codium - simply speaking, none. It is, in just about every way you will think of, the same IDE, just without the Microsoft proprietary licence and telemetry. Your Foam experience will remain as smooth and productive as before the change.
## Version Control and Replication
In Foam's [Getting Started](https://foambubble.github.io/foam/#getting-started) section, the set up describes how to set up your notes with a GitHub repository in using the template provided. Doing so provides the user with the ability to see commits made and therefore versions of their notes, allows the user to work across devices or collaborate effectively with other users, and makes publishing to GitHub pages easy.
It's important at the same time to point out the closed-source nature of GitHub, being owned by Microsoft.
One alternative approach could be to use [GitLab](https://gitlab.com/), an open source alternative to GitHub. Whilst it improves on the aspect of transparency, it does also collect usage details and sends your content across the internet.
And of course data is still stored in clear in the cloud, making it susceptible to hacks of the service.
A more private approach would manage replication between devices and users with a serverless mechanism like [Syncthing](https://syncthing.net). Its continuous synchronisation means that changes in files are seen almost instantly and offers the choice of using only local network connections or securely using public relays when a local network connection is unavailable. This means that having two connected devices online will have them synchronised, but it is worth noting that the continuous synchronisation could result in corruption if two users worked on the same file simultaneously and it doesn't offer the same kind of version control that git does (though versioning support can be found and is described [here](https://docs.syncthing.net/users/versioning.html)). It is also not advisable to attempt to use a continuous synchronisation tool to sync local git repositories as the risk of corruption on the git files is high (see [here](https://forum.syncthing.net/t/can-syncthing-reliably-sync-local-git-repos-not-github/8404/18)).
If you need the version control and collaboration, but do not want to compromise on your privacy, the best course of action is to host the open source GitLab server software yourself. The steps (well described [here](https://www.techrepublic.com/article/how-to-set-up-a-gitlab-server-and-host-your-own-git-repositories/)) are not especially complex by any means and can be used exclusively on the local network, if required, offering a rich experience of "built-in version control, issue tracking, code review, CI/CD, and more", according to its website, [GitLab / GitLab Community Edition · GitLab](https://gitlab.com/rluna-gitlab/gitlab-ce).

37
docs/Gemfile Normal file
View File

@@ -0,0 +1,37 @@
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 3.9.0"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", "~> 209", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
gem "tzinfo", "~> 1.2"
gem "tzinfo-data"
end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform?
# kramdown v2 ships without the gfm parser by default. If you're using
# kramdown v1, comment out this line.
gem "kramdown-parser-gfm"

272
docs/Gemfile.lock Normal file
View File

@@ -0,0 +1,272 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (6.0.3.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concurrent-ruby (1.1.7)
dnsruby (1.61.5)
simpleidn (~> 0.1)
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
ethon (0.12.0)
ffi (>= 1.3.0)
eventmachine (1.2.7)
execjs (2.7.0)
faraday (1.1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords
ffi (1.13.1)
forwardable-extended (2.6.0)
gemoji (3.0.1)
github-pages (209)
github-pages-health-check (= 1.16.1)
jekyll (= 3.9.0)
jekyll-avatar (= 0.7.0)
jekyll-coffeescript (= 1.1.1)
jekyll-commonmark-ghpages (= 0.1.6)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.15.1)
jekyll-gist (= 1.5.0)
jekyll-github-metadata (= 2.13.0)
jekyll-mentions (= 1.6.0)
jekyll-optional-front-matter (= 0.3.2)
jekyll-paginate (= 1.1.0)
jekyll-readme-index (= 0.3.0)
jekyll-redirect-from (= 0.16.0)
jekyll-relative-links (= 0.6.1)
jekyll-remote-theme (= 0.4.2)
jekyll-sass-converter (= 1.5.2)
jekyll-seo-tag (= 2.6.1)
jekyll-sitemap (= 1.4.0)
jekyll-swiss (= 1.0.0)
jekyll-theme-architect (= 0.1.1)
jekyll-theme-cayman (= 0.1.1)
jekyll-theme-dinky (= 0.1.1)
jekyll-theme-hacker (= 0.1.2)
jekyll-theme-leap-day (= 0.1.1)
jekyll-theme-merlot (= 0.1.1)
jekyll-theme-midnight (= 0.1.1)
jekyll-theme-minimal (= 0.1.1)
jekyll-theme-modernist (= 0.1.1)
jekyll-theme-primer (= 0.5.4)
jekyll-theme-slate (= 0.1.1)
jekyll-theme-tactile (= 0.1.1)
jekyll-theme-time-machine (= 0.1.1)
jekyll-titles-from-headings (= 0.5.3)
jemoji (= 0.12.0)
kramdown (= 2.3.0)
kramdown-parser-gfm (= 1.1.0)
liquid (= 4.0.3)
mercenary (~> 0.3)
minima (= 2.5.1)
nokogiri (>= 1.10.4, < 2.0)
rouge (= 3.23.0)
terminal-table (~> 1.4)
github-pages-health-check (1.16.1)
addressable (~> 2.3)
dnsruby (~> 1.60)
octokit (~> 4.0)
public_suffix (~> 3.0)
typhoeus (~> 1.3)
html-pipeline (2.14.0)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.9.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (>= 1.17, < 3)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-avatar (0.7.0)
jekyll (>= 3.0, < 5.0)
jekyll-coffeescript (1.1.1)
coffee-script (~> 2.2)
coffee-script-source (~> 1.11.1)
jekyll-commonmark (1.3.1)
commonmarker (~> 0.14)
jekyll (>= 3.7, < 5.0)
jekyll-commonmark-ghpages (0.1.6)
commonmarker (~> 0.17.6)
jekyll-commonmark (~> 1.2)
rouge (>= 2.0, < 4.0)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.15.1)
jekyll (>= 3.7, < 5.0)
jekyll-gist (1.5.0)
octokit (~> 4.2)
jekyll-github-metadata (2.13.0)
jekyll (>= 3.4, < 5.0)
octokit (~> 4.0, != 4.4.0)
jekyll-mentions (1.6.0)
html-pipeline (~> 2.3)
jekyll (>= 3.7, < 5.0)
jekyll-optional-front-matter (0.3.2)
jekyll (>= 3.0, < 5.0)
jekyll-paginate (1.1.0)
jekyll-readme-index (0.3.0)
jekyll (>= 3.0, < 5.0)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-relative-links (0.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-remote-theme (0.4.2)
addressable (~> 2.0)
jekyll (>= 3.5, < 5.0)
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
rubyzip (>= 1.3.0, < 3.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-swiss (1.0.0)
jekyll-theme-architect (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-cayman (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-dinky (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-hacker (0.1.2)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-leap-day (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-merlot (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-midnight (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-minimal (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-modernist (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-primer (0.5.4)
jekyll (> 3.5, < 5.0)
jekyll-github-metadata (~> 2.9)
jekyll-seo-tag (~> 2.0)
jekyll-theme-slate (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-tactile (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-time-machine (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-titles-from-headings (0.5.3)
jekyll (>= 3.3, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
jemoji (0.12.0)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
kramdown (2.3.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.3.3)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_portile2 (2.5.1)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.14.2)
multipart-post (2.1.1)
nokogiri (1.11.5)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
octokit (4.19.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (3.1.1)
racc (1.5.2)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.23.0)
ruby-enum (0.8.0)
i18n
ruby2_keywords (0.0.2)
rubyzip (2.3.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
simpleidn (0.1.1)
unf (~> 0.1.4)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.8)
thread_safe (~> 0.1)
tzinfo-data (1.2020.4)
tzinfo (>= 1.0.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
wdm (0.1.1)
zeitwerk (2.4.2)
PLATFORMS
ruby
DEPENDENCIES
github-pages (~> 209)
jekyll-feed (~> 0.6)
kramdown-parser-gfm
minima (~> 2.0)
tzinfo (~> 1.2)
tzinfo-data
wdm (~> 0.1.0)
BUNDLED WITH
2.1.2

33
docs/LICENSE.txt Normal file
View File

@@ -0,0 +1,33 @@
The MIT Licence (MIT)
Copyright 2020 - present Jani Eväkallio <jani.evakallio@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Where noted, some code uses the following license:
MIT License
Copyright (c) 2015 - present Microsoft Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

52
docs/_layouts/foam.html Normal file
View File

@@ -0,0 +1,52 @@
---
layout: default
---
<script type="text/javascript">
// NOTE: this should be in sync with the settings/usage in the vscode extension
// atm it's just a wide superset of md extensions to cover a wide range of cases
var MD_EXT = ['.md', '.markdown', '.mdx', '.mdown', '.mkdn', '.mkd', '.mdwn', '.mdtxt', '.mdtext', '.text', '.Rmd'];
function normalizeMdLink(link) {
var url = new URL(link);
var mdFileExt = MD_EXT.find(ext => url.pathname.endsWith(ext));
if (mdFileExt) {
url.pathname = url.pathname.slice(0, mdFileExt.length * -1);
}
return url.toString();
}
window.addEventListener('DOMContentLoaded', (event) => {
document
.querySelectorAll(".markdown-body a[title]:not([href^=http])")
.forEach((a) => {
// filter to only wikilinks
var prev = a.previousSibling;
var next = a.nextSibling;
if (
prev instanceof Text && prev.textContent.endsWith('[') &&
next instanceof Text && next.textContent.startsWith(']')
) {
// remove surrounding brackets
prev.textContent = prev.textContent.slice(0, -1);
next.textContent = next.textContent.slice(1);
// add CSS list for styling
a.classList.add('wikilink');
// replace page-link with "Page Title"...
a.innerText = a.title;
// ...and normalize the links to allow html pages navigation
a.href = normalizeMdLink(a.href);
}
});
document.querySelectorAll(".github-only").forEach((el) => {
el.remove();
});
});
</script>
{{ content }}

View File

@@ -1,25 +1,16 @@
---
layout: default
layout: foam
---
<script async defer src="https://buttons.github.io/buttons.js"></script>
{{ content }}
<script type="text/javascript">
// Hack: Replace page-link with "Page Title"
document
.querySelectorAll(".markdown-body a[title]:not([href^=http])")
.forEach((a) => {
a.innerText = a.title;
});
document.querySelectorAll(".github-only").forEach((el) => {
el.remove();
});
<script>
window.addEventListener('DOMContentLoaded', (event) => {
var duplicateHeading = document.querySelector("h1:not(#foam)");
if (duplicateHeading && duplicateHeading.remove) {
duplicateHeading.remove();
}
});
</script>

View File

@@ -1,22 +1,9 @@
---
layout: default
layout: foam
---
{{ content }}
<script type="text/javascript">
// Hack: Replace page-link with "Page Title"
document
.querySelectorAll(".markdown-body a[title]:not([href^=http])")
.forEach((a) => {
a.innerText = a.title;
});
document.querySelectorAll(".github-only").forEach((el) => {
el.remove();
});
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({

View File

@@ -1,18 +1,5 @@
---
layout: default
layout: foam
---
{{ content }}
<script type="text/javascript">
// Hack: Replace page-link with "Page Title"
document
.querySelectorAll(".markdown-body a[title]:not([href^=http])")
.forEach((a) => {
a.innerText = a.title;
});
document.querySelectorAll(".github-only").forEach((el) => {
el.remove();
});
</script>

View File

@@ -52,6 +52,16 @@ blockquote {
"DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
}
.wikilink:before {
content: "[[";
opacity: 0.5;
}
.wikilink:after {
content: "]]";
opacity: 0.5;
}
.github-only {
display: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

View File

@@ -0,0 +1,68 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="281px" height="181px" viewBox="-0.5 -0.5 281 181" content="&lt;mxfile host=&quot;dd26700e-36c4-4a92-a6df-21c7be0d8350&quot; modified=&quot;2020-08-31T10:44:14.509Z&quot; agent=&quot;5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.48.2 Chrome/78.0.3904.130 Electron/7.3.2 Safari/537.36&quot; etag=&quot;ygaBEVmOlivkHZFzXaxy&quot; version=&quot;13.1.3&quot;&gt;&lt;diagram id=&quot;6hGFLwfOUW9BJ-s0fimq&quot; name=&quot;Page-1&quot;&gt;1ZVNT4NAEIZ/DVdT2NrWq7XqQU89aI+bMsKahSHboYC/3qXMAhvUmJi08QTzzMcy72yGQKyz+sHIIn3GGHQQzeI6EHdBFIXLcGUfLWmYhMvrjiRGxcwGsFUfwHDGtFQxHLxAQtSkCh/uMc9hTx6TxmDlh72h9k8tZAITsN1LPaUvKqa0o6toOfBHUEnqTg4XN50nky6YOzmkMsZqhMQmEGuDSN1bVq9Bt+o5Xbq8+2+8/YcZyOk3Caz7gRrXG8S2VTbRUIoJ5lJvBnprsMxjaAvMrDXEPCEWFoYWvgNRw3OTJaFFKWWavVArem3Tr+z5nbkbue5qLn0yGmfkZJou69qZu7FvSDtZLq9rsO3qW4kYHbA0e46K+FZJkwBHiX489mIDZmBPsSEGtCR19KtLvmBJHzfMwL7wGL4eyeKyI1n+o5HMzzQSPvoodekXHQ3JH0GVKoJtIU8fX9k16MvN9cAQ1D9rMO2OE6I5rxC3RN1KqYaN1LN0tI0Ws78LIiaCRBcXJFz4gvQCnUOQ+UQQcXFBRHQ+Qaw5/LROvtG/X2w+AQ==&lt;/diagram&gt;&lt;/mxfile&gt;">
<defs/>
<g>
<path d="M 110 60 L 110 90 L 60 90 L 60 113.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 60 118.88 L 56.5 111.88 L 60 113.63 L 63.5 111.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 170 60 L 170 90 L 220 90 L 220 113.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 220 118.88 L 216.5 111.88 L 220 113.63 L 223.5 111.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<rect x="80" y="0" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 30px; margin-left: 81px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
1
</div>
</div>
</div>
</foreignObject>
<text x="140" y="34" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
1
</text>
</switch>
</g>
<rect x="0" y="120" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 150px; margin-left: 1px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
2
</div>
</div>
</div>
</foreignObject>
<text x="60" y="154" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
2
</text>
</switch>
</g>
<rect x="160" y="120" width="120" height="60" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 150px; margin-left: 161px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
3
</div>
</div>
</div>
</foreignObject>
<text x="220" y="154" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
3
</text>
</switch>
</g>
</g>
<switch>
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
<a transform="translate(0,-5)" xlink:href="https://desk.draw.io/support/solutions/articles/16000042487" target="_blank">
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
Viewer does not support full SVG 1.1
</text>
</a>
</switch>
</svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 944 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -1,11 +0,0 @@
# Automatic Git Syncing (stub)
**[[todo]] This [[roadmap]] item needs more specification work.**
If you're interested in working on it, please start a conversation in [GitHub issues](https://github.com/foambubble/foam/issues).
[//begin]: # "Autogenerated link references for markdown compatibility"
[todo]: todo "Todo"
[roadmap]: roadmap "Roadmap"
[//end]: # "Autogenerated link references"

View File

@@ -12,7 +12,6 @@
- What use cases are we working towards?
-[[todo]] User round table
[//begin]: # "Autogenerated link references for markdown compatibility"
[todo]: todo "Todo"
[todo]: dev/todo.md "Todo"
[//end]: # "Autogenerated link references"

View File

@@ -1,10 +0,0 @@
# Block References (stub)
**[[todo]] This [[roadmap]] item needs more specification work.**
If you're interested in working on it, please start a conversation in [GitHub issues](https://github.com/foambubble/foam/issues).
[//begin]: # "Autogenerated link references for markdown compatibility"
[todo]: todo "Todo"
[roadmap]: roadmap "Roadmap"
[//end]: # "Autogenerated link references"

View File

@@ -1,7 +0,0 @@
# Foam Blog
- [[2020-07-11-three-weeks-in]]
[//begin]: # "Autogenerated link references for markdown compatibility"
[2020-07-11-three-weeks-in]: blog/2020-07-11-three-weeks-in "Three Weeks In"
[//end]: # "Autogenerated link references"

View File

@@ -1,3 +0,0 @@
# Three Weeks In
Todo

View File

@@ -1,7 +0,0 @@
# Contributing
Head over to the [[contribution-guide]]. `CONTRIBUTING.md` file name is blocklisted on GitHub pages, and doesn't appear in the [rendered output](https://foambubble.github.io/foam).
[//begin]: # "Autogenerated link references for markdown compatibility"
[contribution-guide]: contribution-guide "Contribution Guide"
[//end]: # "Autogenerated link references"

View File

@@ -1,53 +0,0 @@
# Contribution Guide
> [[todo]] [[good-first-task]] This contribution guide itself could be improved 😅
Foam is open to contributions of any kind, including but not limited to code, documentation, ideas and feedback. Here are some general tips on how to get started on contributing to Foam:
- Use Foam for yourself, figure out what could be improved.
- Check out [[roadmap]] to see what's already in the plans. I have thoughts about how to implement some of these, but open to ideas and code contributions!
- Read about our [[principles]] to understand Foam's philosophy and direction
- Read and act in accordance of our [[code-of-conduct]].
- Feel free to open [GitHub issues](https://github.com/foambubble/foam/issues) to give me feedback and ideas for new features.
- Foam code and documentation live in the monorepo at [foambubble/foam](https://github.com/foambubble/foam/)
- [/docs](https://github.com/foambubble/foam/docs): documentation and [[recipes]]
- [/packages/foam-vscode](https://github.com/foambubble/foam/tree/master/packages/foam-vscode): the core VSCode plugin
- [/packages/foam-core](https://github.com/foambubble/foam/tree/master/packages/foam-core): powers the core functionality in Foam across all platforms
- Exceptions to the monorepo are:
- The starter template at [foambubble/foam-template](https://github.com/foambubble/)
- All other [[recommended-extensions]] live in their respective GitHub repos.
## Contributing to the VS Code Extension
If you're interested in contributing to the VS Code extension (aka `foam-vscode`), this guide will help you get things set up locally.
1. Clone the repo locally:
`git clone https://github.com/foambubble/foam.git`
2. Install the necessary dependencies by running this command from the root:
`yarn install`
3. This project uses [Yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/).`foam-vscode` relies on `foam-core`. This means we need to compile it before we do any extension development. From the root, run the command:
`yarn workspace foam-core build`
4. Now we'll use the launch configuration defined at [`.vscode/launch.json`](https://github.com/foambubble/foam/blob/master/.vscode/launch.json) to start a new extension host of VS Code. From the root, or the `foam-vscode` workspace, press f5.
5. In the new extension host of VS Code that launched, open a Foam workspace (e.g. your personal one, or a test-specific one created from foam-template). This is strictly not necessary, but the extension won't auto-run unless it's in a workspace with a `.vscode/foam.json` file.
6. Test a command to make sure it's working as expected. Open the Command Palette (Ctrl/Cmd + Shift + P) and select "Foam: Update Markdown Reference List". If you see no errors, it's good to go!
For more resources related to the VS Code Extension, check out the links below:
- [[tutorial-adding-a-new-command-to-the-vs-code-extension]]
[//begin]: # "Autogenerated link references for markdown compatibility"
[todo]: todo "Todo"
[good-first-task]: good-first-task "Good First Task"
[roadmap]: roadmap "Roadmap"
[principles]: principles "Principles"
[code-of-conduct]: code-of-conduct "Code of Conduct"
[recipes]: recipes "Recipes"
[recommended-extensions]: recommended-extensions "Recommended Extensions"
[tutorial-adding-a-new-command-to-the-vs-code-extension]: tutorial-adding-a-new-command-to-the-vs-code-extension "Tutorial: Adding a New Command to the VS Code Extension"
[//end]: # "Autogenerated link references"

View File

@@ -1,11 +0,0 @@
## Creating a new language
What if we created a new language that made it more ergonomic to use VS Code as a Foam workspace
- Based on markdown
- Could leverage mdx?
- Shortcuts, like links between pages
- Downside: Not markdown compatible, not so good for other tools
- Could it be a markdown superset?
- Or a language that transpiles to markdown and back, so it can be edited in "Foam" format and committed in MD so it's viewable on GH as markdown
- How imporant is it that links are navigable on GH? I guess it is

View File

@@ -1,11 +0,0 @@
# Creating New Notes
- Write out a new `[[wiki-link]]` and `Cmd` + `Click` to create a new file.
- `Cmd` + `Shift` + `P` (`Ctrl` + `Shift` + `P` for Windows), execute `New Note` from [VS Code Markdown Notes](<(https://marketplace.visualstudio.com/items?itemName=kortina.vscode-markdown-notes)>) and enter a **Title Case Name** to create `title-case-name.md`
- Add a keyboard binding to make creating new notes easier.
- You shouldn't worry too much about categorising your notes. You can always [[search-for-notes]], and explore them using the [[graph-visualisation]].
[//begin]: # "Autogenerated link references for markdown compatibility"
[search-for-notes]: search-for-notes "Search for Notes"
[graph-visualisation]: graph-visualisation "Graph visualisation"
[//end]: # "Autogenerated link references"

View File

@@ -1,15 +0,0 @@
# Custom Markdown Preview Styles
Visual Studio Code allows you to use your own CSS in the Markdown preview tab.
## Instructions
Custom CSS for the Markdown preview can be implemented by using the `"markdown.styles": []` setting in `settings.json`. The stylesheets can either be https URLs or relative paths to local files in the current workspace.
For example, to load a stylesheet called `Style.css`, we can update `settings.json` with the following line:
```
{
"markdown.styles": ["Style.css"]
}
```

View File

@@ -1,10 +0,0 @@
# Customising Styles
You can edit `assets/css/style.scss` to change how published pages look.
[[todo]] [[good-first-task]]
[//begin]: # "Autogenerated link references for markdown compatibility"
[todo]: todo "Todo"
[good-first-task]: good-first-task "Good First Task"
[//end]: # "Autogenerated link references"

View File

@@ -1,36 +0,0 @@
# Daily notes
The idea is to make it easier for people to be able to create Daily notes.
This feature is open for discussion at [foambubble/foam#54](https://github.com/foambubble/foam/issues/54).
## Must have
- Should exist as part of [foam-vscode](https://github.com/foambubble/foam/tree/master/packages/foam-vscode) extension
- A new command "Foam: Open Daily Note", which creates new file and focuses into it, or opens the existing file for today if it exists already.
- File should have a Level 1 `# Heading`
- Extension should define a hotkey for it (TBD? What do other apps do?)
## Should have
- Settings to customise:
- Format of file name, default to `yyyy-mm-dd`
- Format of title
- Default to same as file name
- Allow override e.g. `MMMMM D, YYYY`, to July 8. 2020 (locale specific)
- Extension of file, default to `.md`
- Directory into which file should be created, default to `./` (workspace root)
- Should create directory if needed
## Could have
- Automatically update a "daily notes" index file, newest first. Format TBD
- A custom note template .md file that could be stored in `.vscode/` directory (would supercede having to format the title)
- This could be useful for people who e.g. want there to be a format for every day's notes with fixed questions and stuff.
- Maybe we could do it with just back links or tags, by putting e.g. `[[daily]]` into the note template
- If files were named in alphabetic sortable order, and back links would display in reverse order, newest would always come on top
[//begin]: # "Autogenerated link references for markdown compatibility"
[todo]: todo "Todo"
[roadmap]: roadmap "Roadmap"
[//end]: # "Autogenerated link references"

View File

@@ -1,3 +0,0 @@
# Decision Needed
Check backlinks

View File

@@ -1,2 +0,0 @@
# Decision

20
docs/dev/about-docs.md Normal file
View File

@@ -0,0 +1,20 @@
# Developing documentation
The best way to develop docs for the Foam repo is to directly open the `$foam-repo/docs/` as the root folder in a new vscode window.
This automatically configures vscode with the necessary settings enabled (like [[link-reference-definitions]]) to efficiently write this documentation.
## Organization
The Foam documentation is organized into two areas:
* User docs, located at `$foam-repo/docs/user/*`, which are copied in their entirety into `$foam-template-repo/docs`.
* Developer docs, located at `$foam-repo/docs/dev/*`
New user docs should be added to the User docs folder in the main Foam repo, then copied over to the Foam Template repo.
> [[todo]]: Automate this process. Idea: github action to open a PR on any change to `/docs/user`
[//begin]: # "Autogenerated link references for markdown compatibility"
[link-reference-definitions]: ../user/features/link-reference-definitions.md "Link Reference Definitions"
[todo]: todo.md "Todo"
[//end]: # "Autogenerated link references"

View File

@@ -3,14 +3,10 @@
The Foam prototype is built by assembling third-party extensions, which seems like a good strategy because
- It supports picking and mixing of tools and workflows
- Less code to write an maintain
- Less code to write and maintain
But there's also a bunch of roadmap items that are hard to implement this way, as the third party plugins don't do exactly what we want them to do (e.g. Markdown All In One is not compatible with [[referencing-notes-by-title]].
Overall, we should strive to build big things from small things. Focused, interoperable modules are better, because they allow users to pick and mix which features work for them. A good example of why this matters is the Markdown All In One extension we rely on: While it provides many of the things we need, a few of its features are incompatible with how I would like to work, and therefore it becomes a limiter of how well I can improve my own workflow.
However, there becomes a point where we may benefit from implementing a centralised solution, e.g. a syntax, an extension or perhaps a VSCode language server. As much as possible, we should allow users to operate in a decentralised manner.
[//begin]: # "Autogenerated link references for markdown compatibility"
[referencing-notes-by-title]: referencing-notes-by-title "Referencing notes by title"
[//end]: # "Autogenerated link references"

View File

@@ -61,7 +61,7 @@ representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at `jani.evakallio+foam@gmail.com`.
reported to the community leaders responsible for enforcement at `riki.code+foam@gmail.com`.
All complaints will be reviewed and investigated promptly and fairly.
@@ -118,7 +118,7 @@ the community.
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
@@ -126,9 +126,5 @@ enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
[//begin]: # "Autogenerated link references for markdown compatibility"
[todo]: todo "Todo"
[//end]: # "Autogenerated link references"
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.

View File

@@ -0,0 +1,113 @@
---
tags: todo, good-first-task
---
# Contribution Guide
Foam is open to contributions of any kind, including but not limited to code, documentation, ideas, and feedback.
This guide aims to help guide new and seasoned contributors getting around the Foam codebase. For a comprehensive guide about contributing to open-source projects in general, [see here](https://sqldbawithabeard.com/2019/11/29/how-to-fork-a-github-repository-and-contribute-to-an-open-source-project/).
## Getting Up To Speed
Before you start contributing we recommend that you read the following links:
- [[principles]] - This document describes the guiding principles behind Foam.
- [[code-of-conduct]] - Rules we hope every contributor aims to follow, allowing everyone to participate in our community!
## Diving In
We understand that diving in an unfamiliar codebase may seem scary,
to make it easier for new contributors we provide some resources:
You can also see [existing issues](https://github.com/foambubble/foam/issues) and help out!
Finally, the easiest way to help, is to use it and provide feedback by [submitting issues](https://github.com/foambubble/foam/issues/new/choose) or participating in the [Foam Community Discord](https://foambubble.github.io/join-discord/g)!
## Contributing
If you're interested in contributing, this short guide will help you get things set up locally (assuming [node.js >= v16](https://nodejs.org/) and [yarn](https://yarnpkg.com/) are already installed on your system).
1. Fork the project to your Github account by clicking the "Fork" button on the top right hand corner of the project's [home repository page](https://github.com/foambubble/foam).
2. Clone your newly forked repo locally:
`git clone https://github.com/your_username/foam.git`
3. Install the necessary dependencies by running this command from the root of the cloned repository:
`yarn install`
4. From the repository root, run the command:
`yarn build`
You should now be ready to start working!
### Structure of the project
Foam code and documentation live in the monorepo at [foambubble/foam](https://github.com/foambubble/foam/).
- [/docs](https://github.com/foambubble/foam/tree/master/docs): documentation and [[recipes]].
Exceptions to the monorepo are:
- The starter template at [foambubble/foam-template](https://github.com/foambubble/)
- All other [[recommended-extensions]] live in their respective GitHub repos
This project uses [Yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/).
Originally Foam had:
- [/packages/foam-core](https://github.com/foambubble/foam/tree/ee7a8919761f168d3931079adf21c5ad4d63db59/packages/foam-core) - Powers the core functionality in Foam across all platforms.
- [/packages/foam-vscode](https://github.com/foambubble/foam/tree/master/packages/foam-vscode) - The core VS Code plugin.
To improve DX we have moved the `foam-core` module into `packages/foam-vscode/src/core`, but from a development point of view it's useful to think of the `foam-vscode/src/core` "submodule" as something that might be extracted in the future.
For all intents and purposes this means two things:
1. nothing in `foam-vscode/src/core` should depend on files outside of this directory
2. code in `foam-vscode/src/core` should NOT depend on `vscode` library
We have kept the yarn workspace for the time being as we might use it to pull out `foam-core` in the future, or we might need it for other packages that the VS Code plugin could depend upon (e.g. currently the graph visualization is inside the module, but it might be pulled out if its complexity increases).
### Testing
Code needs to come with tests.
We use the following convention in Foam:
- `*.test.ts` are unit tests
- `*.spec.ts` are integration tests
Tests live alongside the code in `src`.
### The VS Code Extension
This guide assumes you read the previous instructions and you're set up to work on Foam.
1. Now we'll use the launch configuration defined at [`.vscode/launch.json`](https://github.com/foambubble/foam/blob/master/.vscode/launch.json) to start a new extension host of VS Code. Open the "Run and Debug" Activity (the icon with the bug on the far left) and select "Run VSCode Extension" in the pop-up menu. Now hit F5 or click the green arrow "play" button to fire up a new copy of VS Code with your extension installed.
2. In the new extension host of VS Code that launched, open a Foam workspace (e.g. your personal one, or a test-specific one created from [foam-template](https://github.com/foambubble/foam-template)). This is strictly not necessary, but the extension won't auto-run unless it's in a workspace with a `.vscode/foam.json` file.
3. Test a command to make sure it's working as expected. Open the Command Palette (Ctrl/Cmd + Shift + P) and select "Foam: Update Markdown Reference List". If you see no errors, it's good to go!
### Submitting a Pull Request (PR)
After you have made your changes to your copy of the project, it is time to try and merge those changes into the public community project.
1. Return to the project's [home repository page](https://github.com/foambubble/foam).
2. Github should show you an button called "Compare & pull request" linking your forked repository to the community repository.
3. Click that button and confirm that your repository is going to be merged into the community repository. See [this guide](https://sqldbawithabeard.com/2019/11/29/how-to-fork-a-github-repository-and-contribute-to-an-open-source-project/) for more specifics.
4. Add as many relevant details to the PR message to make it clear to the project maintainers and other members of the community what you have accomplished with your new changes. Link to any issues the changes are related to.
5. Your PR will then need to be reviewed and accepted by the other members of the community. Any discussion about the changes will occur in your PR thread.
6. Once reviewed and accept you can complete the merge request!
7. Finally rest and watch the sun rise on a grateful universe... Or start tackling the other open issues ;)
---
Feel free to modify and submit a PR if this guide is out-of-date or contains errors!
---
[//begin]: # "Autogenerated link references for markdown compatibility"
[principles]: ../principles.md "Principles"
[code-of-conduct]: code-of-conduct.md "Code of Conduct"
[recipes]: ../user/recipes/recipes.md "Recipes"
[recommended-extensions]: ../user/getting-started/recommended-extensions.md "Recommended Extensions"
[//end]: # "Autogenerated link references"

View File

@@ -0,0 +1,16 @@
# Foam File Format
This file is an example of a valid Foam file. Essentially it's just a markdown file with a bit of additional support for MediaWiki-style `[[wikilinks]]`.
Here are a few specific constraints, mainly because our tooling is a bit fragmented. Most of these should be eventually lifted, and our requirement should just be "Markdown with `[[wikilinks]]`:
- **The first top level `# Heading` will be used as title for the note.**
- If not available, we will use the file name
- **File name should have extension `.md`**
- This is a temporary limitation and will be lifted in future versions.
- At least `.mdx` will be supported, but ideally we'll support any file that you can map to `Markdown` language mode in VS Code
- **In addition to normal Markdown Links syntax you can use `[[MediaWiki]]` links.** See [[wikilinks]] for more details.
[//begin]: # "Autogenerated link references for markdown compatibility"
[wikilinks]: ../user/features/wikilinks.md "Wikilinks"
[//end]: # "Autogenerated link references"

View File

@@ -5,5 +5,5 @@ See the backlinks of this page for good first contribution opportunities.
[[materialized-backlinks]] would help here.
[//begin]: # "Autogenerated link references for markdown compatibility"
[materialized-backlinks]: materialized-backlinks "Materialized Backlinks"
[materialized-backlinks]: proposals/materialized-backlinks.md "Materialized Backlinks (stub)"
[//end]: # "Autogenerated link references"

View File

@@ -1,10 +1,10 @@
# MDX by Default(stub)
**[[todo]] This [[roadmap]] item needs more specification work.**
**[[todo]] This [[roadmap]] item needs more specification work.**
If you're interested in working on it, please start a conversation in [GitHub issues](https://github.com/foambubble/foam/issues).
[//begin]: # "Autogenerated link references for markdown compatibility"
[todo]: todo "Todo"
[roadmap]: roadmap "Roadmap"
[//end]: # "Autogenerated link references"
[todo]: todo.md "Todo"
[roadmap]: proposals/roadmap.md "Roadmap"
[//end]: # "Autogenerated link references"

View File

@@ -13,6 +13,7 @@ Present: @jevakallio, @riccardoferretti
- Land work to master
- Create a foam-core package
-
### Open questions
@@ -122,5 +123,6 @@ How others solve this:
- Unique ids -- could support optionally as part of file name or front matter metadata. Should not be required.
[//begin]: # "Autogenerated link references for markdown compatibility"
[todo]: ../todo "Todo"
[todo]: ../todo.md "Todo"
[Index]: ../../index.md "Foam"
[//end]: # "Autogenerated link references"

View File

@@ -9,7 +9,7 @@
- Visualizations
- Tag clouds
- Graph
- Should we have a package for visualisation?
- Should we have a package for visualization?
- [[build-vs-assemble]]
- Not everything needs to live in the Foam repo
- Web based UI (Monaco)
@@ -17,7 +17,7 @@
`foam-core`'s primary responsibility is to build an API on top of a workspace of markdown files, which allows us to:
- Treat files as a graph, based on links
- Can be either [[wiki-links]] or relative `[markdown](links.md)` style
- Can be either [[wikilinks]] or relative `[markdown](links.md)` style
- We need to know about the edges (connections) as well as nodes
- What link points to what other file, etc.
- Needs to have the exact link text, e.g. even if `[[some-page]]` or `[[some-page.md]]` or `[[Some Page]]` point to the same document (`./some-page.md`), we need to know which format was used, so [[link-reference-definitions]] can be generated correctly
@@ -61,11 +61,11 @@ Here are some example use cases that the core should support. They don't need to
- Adding and editing page content
- [[materialized-backlinks]]
- [[link-reference-definitions]] for [[wiki-links]]
- [[link-reference-definitions]] for [[wikilinks]]
- [Frontmatter](https://jekyllrb.com/docs/front-matter/)
- Finding all documents with `#tag`
- Finding all documents with instances of `[[link]]`
- Visualisations
- Visualizations
- Full text search
- Or, if search is too expensive/complex, when given a list of file names and line/column positions from VS Code search API, can return the document context (e.g. full paragraph, preceding/following line etc)
@@ -96,12 +96,12 @@ Useful for knowing what needs to be supported. See [[feature-comparison]].
- [[foam-core-2020-07-11]]
[//begin]: # "Autogenerated link references for markdown compatibility"
[workspace-janitor]: workspace-janitor "Workspace Janitor"
[cli]: cli "Command Line Interface"
[build-vs-assemble]: build-vs-assemble "Build vs Assemble"
[wiki-links]: wiki-links "Wiki Links"
[materialized-backlinks]: materialized-backlinks "Materialized Backlinks (stub)"
[todo]: todo "Todo"
[feature-comparison]: feature-comparison "Feature comparison"
[foam-core-2020-07-11]: meeting-notes/foam-core-2020-07-11 "Foam Core 2020-07-11"
[workspace-janitor]: ../../user/tools/workspace-janitor.md "Janitor"
[cli]: ../../user/tools/cli.md "Command Line Interface"
[build-vs-assemble]: ../build-vs-assemble.md "Build vs Assemble"
[wikilinks]: ../../user/features/wikilinks.md "Wikilinks"
[link-reference-definitions]: ../../user/features/link-reference-definitions.md "Link Reference Definitions"
[materialized-backlinks]: materialized-backlinks.md "Materialized Backlinks (stub)"
[todo]: ../todo.md "Todo"
[foam-core-2020-07-11]: ../meeting-notes/foam-core-2020-07-11.md "Foam Core 2020-07-11"
[//end]: # "Autogenerated link references"

View File

@@ -0,0 +1,48 @@
# Inclusion of notes Proposal <!-- omit in TOC -->
Currently it is not possible within Foam to include other notes into a note. Next to including a full note it could be interesting to add functionalities that allow for greater flexibility. This proposal discusses some functionalities around inclusion of notes.
**IMPORTANT: This design is merely a proposal of a design that could be implemented. It DOES NOT represent a commitment by `Foam` developers to implement the features outlined in this document. This document is merely a mechanism to facilitate discussion of a possible future direction for `Foam`.**
- [Introduction](#introduction)
- [New features](#new-features)
- [Including a note](#including-a-note)
- [Include a section of a note](#include-a-section-of-a-note)
- [Include an attribute of a file (note property or frontmatter)](#include-an-attribute-of-a-file-note-property-or-frontmatter)
## Introduction
Initial work and thought on including a note was ignited by issue [#652](https://github.com/foambubble/foam/issues/652). Requested by a user was a likewise functionality as offered in Obsidian. This was simply the ability to include a note.
Whilst researching digital gardening for my own setup, I came across an in-depth overview by [Maggie Appleton](https://maggieappleton.com/roam-garden). Showing examples of her personal Roam Research I see valuable possibilites to connect more information, if we would add additional functionalities to the possibility of including a note. This proposal displays these possible functionalities and markup.
## New features
### Including a note
The minimal functionality is the ability to fully include a note. Markup used in Obsidian for this is `![[wikilink]]`. For Foam I would suggest to follow this syntax. Benefits being:
- Adds minimal amount of knowledge required as syntax is based on the syntax of creating a wikilink.
- Makes the auto-complete work ouf-of-the-box, without any additional code and listeners required.
**Important**. A risk exists that a loop of including the same notes arises. E.g. Note A includes note B which includes note A. This needs to be prevented by the implementation and made visible to the user.
### Include a section of a note
It could be interesting to only include a section of a note instead of the entire note. In order to do so thse user should be able to use the following syntax:
`![[wikilink#section-b]]`
As a result it will include the section title + section content until the next section *or* end of file.
### Include an attribute of a file (note property or frontmatter)
As a user I could be interested in collecting the value of any given proeprty for a note. For example, I might want to include the tags as defined in the frontmatter of note A. This should be possible via the syntax:
`![[wikilink:<property>]]`
The property value should be lookedup by foam defined properties, e.g. title, **or** any property defined in the frontmatter of a note.
So, the example of including the tags of a note should be:
`![[wikilink:tags]]`

View File

@@ -4,13 +4,13 @@
### File-by-file Insertion
For the time being, if you want to get [[wiki-links]] into all files within the workspace, you'll need to generate the link reference definitions yourself file-by-file (with the assistance of Foam).
For the time being, if you want to get [[wikilinks]] into all files within the workspace, you'll need to generate the link reference definitions yourself file-by-file (with the assistance of Foam).
### Wikilinks don't work on GitHub
> **TL;DR;** [workaround](#workaround) in the end of the chapter.
If you click any of the wiki-links on GitHub web UI (such as the `README.md` of a project), you'll notice that the links break with a 404 error.
If you click any of the wikilinks on GitHub web UI (such as the `README.md` of a project), you'll notice that the links break with a 404 error.
At the time of writing (June 28 2020) this is a known, but unsolved error. To understand why this is the case, we need to understand what we are trading off.
@@ -53,13 +53,13 @@ Problem space in essence:
- During edit-time (when modifying the markdown files in an editor)
- link reference definitions are needed if user uses editor extensions that don't understand wikilinks
- link reference definitions may be annoying since they
- link reference definitions may be annoying since they
- add content to files that the user hasn't typed in by themselves
- get out of date if user uses a tool that doesn't autogenerate them
- may clutter the search results
- During build-time (when converting markdown to html for publishing purposes)
- link reference definitions are needed, if the files are published via such tools (or to such platforms) that don't understand wikilinks
- link reference definitions might have to be in different formats depending on the publish target (e.g. Github pages vs Github UI)
- link reference definitions might have to be in different formats depending on the publish target (e.g. GitHub pages vs GitHub UI)
The potential solution:
@@ -68,10 +68,11 @@ The potential solution:
- Make format of the link reference definition configurable (whether to include '.md' or not)
- Out of recommended extensions, currently only "markdown links" doesn't support them (?). However even its [code](https://github.com/tchayen/markdown-links/blob/master/src/parsing.ts#L25) seems to include wikilink parser, so it might just be a bug?
- For build-time
- To satisfy mutually incompatible constraints between GitHub UI, VSCode UI, and GitHub Pages, we should add a pre-processing/build step for pushing to GitHub Pages.
- To satisfy mutually incompatible constraints between GitHub UI, VSCode UI, and GitHub Pages, we should add a pre-processing/build step for pushing to GitHub Pages.
- This would be a GitHub action (or a local script, ran via foam-cli) that outputs publish-friendly markdown format for static site generators and other publishing tools
- This build step should be pluggable, so that other transformations could be ran during it
- Have publish targets defined in settings, that support both turning the link reference definitions on/off and defining their format (.md or not). Example draft (including also edit-time aspect):
```typescript
// settings json
// see enumerations below for explanations on values
@@ -111,7 +112,7 @@ The potential solution:
WikiLinksToMarkdown, // links using wiki-format [[link]] are converted to normal md links: [link](./some/file.md)
// if this is set, not link reference definitions are generated (not needed)
}
// Defines if and how link reference definition section is generated
enum LinkReferenceDefinitions {
Off, // link reference definitions are not generated
@@ -120,8 +121,9 @@ The potential solution:
}
```
- With Foam repo, just use edit-time link reference definitions with '.md' extension - this makes the links work in the Github UI
- Have publish target defined for Github pages, that doesn't use '.md' extension, but still has the link reference definitions. Generate the output into gh-pages branch (or separate repo) with automation.
- With Foam repo, just use edit-time link reference definitions with '.md' extension - this makes the links work in the GitHub UI
- Have publish target defined for GitHub pages, that doesn't use '.md' extension, but still has the link reference definitions. Generate the output into gh-pages branch (or separate repo) with automation.
- This naturally requires first removing the existing link reference definitions during the build
- Other
- To clean up the search results, remove link reference definition section guards (assuming that these are not defined by the markdown spec). Use unifiedjs parse trees to identify if there's missing (or surplus) definitions (check if they are identified properly by the library), and just add the needed definitions to the bottom of the file (without guards) AND remove them if they are not needed (anywhere from the file).
@@ -135,8 +137,7 @@ UI-wise, the publish targets could be picked in some similar fashion as the run/
- [tracking issue on GitHub](https://github.com/foambubble/foam/issues/16)
[//begin]: # "Autogenerated link references for markdown compatibility"
[wiki-links]: wiki-links "Wiki Links"
[roadmap]: roadmap "Roadmap"
[link-reference-definitions]: link-reference-definitions "Link Reference Definitions"
[backlinking]: backlinking "Backlinking"
[wikilinks]: ../../user/features/wikilinks.md "Wikilinks"
[link-reference-definitions]: ../../user/features/link-reference-definitions.md "Link Reference Definitions"
[backlinking]: ../../user/features/backlinking.md "Backlinking"
[//end]: # "Autogenerated link references"

View File

@@ -1,6 +1,6 @@
# Materialized Backlinks (stub)
**[[todo]] This [[roadmap]] item needs more specification work.**
**[[todo]] This [[roadmap]] item needs more specification work.**
If you're interested in working on it, please start a conversation in [GitHub issues](https://github.com/foambubble/foam/issues).
@@ -12,6 +12,6 @@ The idea would be to automatically generate lists of backlinks (and optionally,
- Make Foam notes more portable to different apps and long-term storage
[//begin]: # "Autogenerated link references for markdown compatibility"
[todo]: todo "Todo"
[roadmap]: roadmap "Roadmap"
[//end]: # "Autogenerated link references"
[todo]: ../todo.md "Todo"
[roadmap]: roadmap.md "Roadmap"
[//end]: # "Autogenerated link references"

View File

@@ -6,16 +6,12 @@ Some of these items can be achieved by combining existing tools, but others may
Items that are already being worked on. Roadmap items in this stage should have an owner.
- [@jevakallio](https://github.com/jevakallio): [[cli]]
## High priority
Items we plan on working next. Items in this stage don't need to have an owner, but before we start working on them should have enough specification that they can be picked up and worked on without having to seek consensus.
If you want to pick up work in this category, you should have a plan on how long the implementation will approximately take so we don't block progress by sitting on high priority issues.
- [[workspace-janitor]]
## Backlog
Everything else, categorised into themes. Just because something is on this list doesn't mean it'll get done. If you're interested in working on items in this category, check the [[contribution-guide]] for how to get started.
@@ -27,15 +23,15 @@ If a roadmap item is a stub, **consider** opening a [GitHub issue](https://githu
### Known issues
- [[improve-default-workspace-settings]]
- Discussion: [foam#270](https://github.com/foambubble/foam/issues/270)
- Improve [[git-integration]]
- Fix [[wiki-links]] compatibility issues
- Fix [[wikilinks]] compatibility issues
- Simplify [[foam-file-format]]
### Core features
- [[renaming-files]]
- [[unlinked-references]]
- [[daily-notes]]
- [[block-references]]
- [[improved-backlinking]]
- UX: [[make-backlinks-more-prominent]]
@@ -44,6 +40,7 @@ If a roadmap item is a stub, **consider** opening a [GitHub issue](https://githu
- [[git-flows-for-teams]]
- [[user-settings]]
- [[link-reference-definitions]]
- [[predefined-user-snippets]]
### Publishing
@@ -66,51 +63,41 @@ If a roadmap item is a stub, **consider** opening a [GitHub issue](https://githu
### Migration
The community is working on a number of automated scripts to help you migrate to Foam. The main work of developing such a method involves exporting your notes, converting them to the Markdown format, and then making sure that the links between notes (if you had those) still work.
- [[migrating-from-roam]]
- Discussion: [foam#55](https://github.com/foambubble/foam/issues/55)
- [[migrating-from-obsidian]]
- Discussion: [foam#46](https://github.com/foambubble/foam/issues/46)
- [[migrating-from-onenote]]
- Discussion: [foam#151](https://github.com/foambubble/foam/issues/151)
- _Migration from other tools..._
### integration
### Integration
- _Integrations to third party tools_...
### Wild ideas
- [[foam-linter]]
- [[refactoring-via-language-server-protocol]]
[//begin]: # "Autogenerated link references for markdown compatibility"
[build-vs-assemble]: build-vs-assemble "Build vs Assemble"
[recipes]: recipes "Recipes"
[cli]: cli "Command Line Interface"
[workspace-janitor]: workspace-janitor "Workspace Janitor"
[contribution-guide]: contribution-guide "Contribution Guide"
[improve-default-workspace-settings]: improve-default-workspace-settings "Improve Default Workspace Settings (stub)"
[git-integration]: git-integration "Git integration"
[wiki-links]: wiki-links "Wiki Links"
[foam-file-format]: foam-file-format "Foam File Format"
[renaming-files]: renaming-files "Renaming files (stub)"
[unlinked-references]: unlinked-references "Unlinked references (stub)"
[daily-notes]: daily-notes "Daily notes"
[block-references]: block-references "Block References (stub)"
[improved-backlinking]: improved-backlinking "Improved Backlinking (stub)"
[materialized-backlinks]: materialized-backlinks "Materialized Backlinks (stub)"
[automatic-git-syncing]: automatic-git-syncing "Automatic Git Syncing (stub)"
[git-flows-for-teams]: git-flows-for-teams "Git Flows for Teams (stub)"
[officially-support-alternative-templates]: officially-support-alternative-templates "Officially Support Alternative Templates (stub)"
[improved-static-site-generation]: improved-static-site-generation "Improved Static Site Generation (stub)"
[mdx-by-default]: mdx-by-default "MDX by Default(stub)"
[search-in-published-workspace]: search-in-published-workspace "Search in Published Workspace (stub)"
[graph-in-published-workspace]: graph-in-published-workspace "Graph in Published Workspace (stub)"
[linking-between-published-workspaces]: linking-between-published-workspaces "Linking between Published Workspaces (stub)"
[publishing-permissions]: publishing-permissions "Publishing Permissions(stub)"
[mobile-apps]: mobile-apps "Mobile Apps"
[packaged-desktop-app]: packaged-desktop-app "Packaged Desktop App (stub)"
[web-editor]: web-editor "Web Editor (stub)"
[migrating-from-roam]: migrating-from-roam "Migrating from Roam (stub)"
[migrating-from-obsidian]: migrating-from-obsidian "Migrating from Obsidian (stub)"
[foam-linter]: foam-linter "Foam Linter (stub)"
[refactoring-via-language-server-protocol]: refactoring-via-language-server-protocol "Refactoring via Language Server Protocol (stub)"
[make-backlinks-more-prominent]: make-backlinks-more-prominent "Make Backlinks More Prominent"
[//end]: # "Autogenerated link references"
[build-vs-assemble]: ../build-vs-assemble.md "Build vs Assemble"
[recipes]: ../../user/recipes/recipes.md "Recipes"
[contribution-guide]: ../contribution-guide.md "Contribution Guide"
[wikilinks]: ../../user/features/wikilinks.md "Wikilinks"
[foam-file-format]: ../foam-file-format.md "Foam File Format"
[unlinked-references]: ../unlinked-references.md "Unlinked references (stub)"
[make-backlinks-more-prominent]: ../../user/recipes/make-backlinks-more-prominent.md "Make Backlinks More Prominent"
[materialized-backlinks]: materialized-backlinks.md "Materialized Backlinks (stub)"
[automatic-git-syncing]: ../../user/recipes/automatic-git-syncing.md "Automatically Sync with Git"
[link-reference-definitions]: ../../user/features/link-reference-definitions.md "Link Reference Definitions"
[predefined-user-snippets]: ../../user/recipes/predefined-user-snippets.md "Pre-defined User Snippets"
[mdx-by-default]: ../mdx-by-default.md "MDX by Default(stub)"
[publishing-permissions]: ../publishing-permissions.md "Publishing Permissions(stub)"
[cli]: ../../user/tools/cli.md "Command Line Interface"
[migrating-from-roam]: ../../user/recipes/migrating-from-roam.md "Migrating from Roam (stub)"
[migrating-from-obsidian]: ../../user/recipes/migrating-from-obsidian.md "Migrating from Obsidian (stub)"
[migrating-from-onenote]: ../../user/recipes/migrating-from-onenote.md "Migrating from OneNote"
[//end]: # "Autogenerated link references"

View File

@@ -0,0 +1,329 @@
# Templates v2 Proposal <!-- omit in TOC -->
The current capabilities of templates is limited in some important ways. This document aims to propose a design that addresses these shortcomings.
**IMPORTANT: This design is merely a proposal of a design that could be implemented. It DOES NOT represent a commitment by `Foam` developers to implement the features outlined in this document. This document is merely a mechanism to facilitate discussion of a possible future direction for `Foam`.**
- [Introduction](#introduction)
- [Limitations of current templating](#limitations-of-current-templating)
- [Too much friction to create a new note](#too-much-friction-to-create-a-new-note)
- [Manual note creation (Mouse + Keyboard)](#manual-note-creation-mouse--keyboard)
- [Manual note creation (Keyboard)](#manual-note-creation-keyboard)
- [Foam missing note creation](#foam-missing-note-creation)
- [`Markdown Notes: New Note` (Keyboard)](#markdown-notes-new-note-keyboard)
- [Foam template note creation (Keyboard)](#foam-template-note-creation-keyboard)
- [Templating of daily notes](#templating-of-daily-notes)
- [Templating of filepaths](#templating-of-filepaths)
- [Goal / Philosophy](#goal--philosophy)
- [Proposal](#proposal)
- [Summary](#summary)
- [Add a `${title}` and `${titleSlug}` template variables](#add-a-title-and-titleslug-template-variables)
- [Add a `Foam: Create New Note` command and hotkey](#add-a-foam-create-new-note-command-and-hotkey)
- [Case 1: `.foam/templates/new-note.md` doesn't exist](#case-1-foamtemplatesnew-notemd-doesnt-exist)
- [Case 2: `.foam/templates/new-note.md` exists](#case-2-foamtemplatesnew-notemd-exists)
- [Change missing wikilinks to use the default template](#change-missing-wikilinks-to-use-the-default-template)
- [Add a metadata section to templates](#add-a-metadata-section-to-templates)
- [Example](#example)
- [Add a replacement for `dateFormat`](#add-a-replacement-for-dateformat)
- [Add support for daily note templates](#add-support-for-daily-note-templates)
- [Eliminate all `foam.openDailyNote` settings](#eliminate-all-foamopendailynote-settings)
- [Summary: resulting behaviour](#summary-resulting-behaviour)
- [`Foam: Create New Note`](#foam-create-new-note)
- [`Foam: Open Daily Note`](#foam-open-daily-note)
- [Navigating to missing wikilinks](#navigating-to-missing-wikilinks)
- [`Foam: Create Note From Template`](#foam-create-note-from-template)
- [Extensions](#extensions)
- [More variables in templates](#more-variables-in-templates)
- [`defaultFilepath`](#defaultfilepath)
- [Arbitrary hotkey -> template mappings?](#arbitrary-hotkey---template-mappings)
## Introduction
Creating of new notes in Foam is too cumbersome and slow. Despite their power, Foam templates can currently only be used in very limited scenarios.
This proposal aims to address these issues by streamlining note creation and by allowing templates to be used everywhere.
## Limitations of current templating
### Too much friction to create a new note
Creating new notes should an incredibly streamlined operation. There should be no friction to creating new notes.
Unfortunately, all of the current methods for creating notes are cumbersome.
#### Manual note creation (Mouse + Keyboard)
1. Navigate to the directory where you want the note
2. Click the new file button
3. Provide a filename
4. Manually enter the template contents you want
#### Manual note creation (Keyboard)
1. Navigate to the directory where you want the note
2. `⌘N` to create a new file
3. `⌘S` to save the file and give it a filename
4. Manually enter the template contents you want
#### Foam missing note creation
1. Open an existing note in the directory where you want the note
2. Use the wikilinks syntax to create a link to the title of the note you want to have
3. Use `Ctrl+Click`/`F12` to create the new file
4. Manually enter the template contents you want
#### `Markdown Notes: New Note` (Keyboard)
1. Navigate to the directory where you want the note
2. `Shift+⌘P` to open the command pallette
3. Type `New Note` until it appears in the list. Press `Enter/Return` to select it.
4. Enter a title for the note
5. Manually enter the template contents you want
#### Foam template note creation (Keyboard)
1. `Shift+⌘P` to open the command pallette
2. Type `Create New Note From Template` until it appears in the list. Press `Enter/Return` to select it.
3. Use the arrow keys (or type the template name) to select the template. Press `Enter/Return` to select it.
4. Modify the filepath to match the desired directory + filename. Press `Enter/Return` to select it.
All of these steps are far too cumbersome. And only the last one allows the use of templates.
### Templating of daily notes
Currently `Open Daily Note` opens an otherwise empty note, with a title defined by the `foam.openDailyNote.titleFormat` setting.
Daily notes should be able to be fully templated as well.
### Templating of filepaths
As discussed in ["Template the filepath in `openDailyNote`"](https://github.com/foambubble/foam/issues/523), it would be useful to be able to specify the default filepaths of templates. For example, many people include timestamps in their filepaths.
## Goal / Philosophy
In a sentence: **Creating a new note should be a single button press and should use templates.**
## Proposal
1. Add a new `Foam: Create New Note` that is the streamlined counterpart to the more flexible `Foam: Create New Note From Template`
2. Use templates everywhere
3. Add metadata into the actual templates themselves in order to template the filepaths themselves.
### Summary
This can be done through a series of changes to the way that templates are implemented:
1. Add a `${title}` and `${titleSlug}` template variables
2. Add a `Foam: Create New Note` command and hotkey
3. Change missing wikilinks to use the default template
4. Add a metadata section to templates
5. Add a replacement for `dateFormat`
6. Add support for daily note templates
7. Eliminate all `foam.openDailyNote` settings
I've broken it out into these steps to show that the overall proposal can be implemented piecemeal in independent PRs that build on one another.
### Add a `${title}` and `${titleSlug}` template variables
When you use `Markdown Notes: New Note`, and give it a title, the title is formatted as a filename and also used as the title in the resulting note.
**Example:**
Given the title `Living in a dream world` to `Markdown Notes: New Note`, the filename is `living-in-a-dream-world.md` and the file contents are:
```markdown
# Living in a dream world
```
When creating a note from a template in Foam, you should be able to use a `${title}` variable. If the template uses the `${title}` variable, the user will be prompted for a title when they create a note from a template.
Example:
Given this `.foam/templates/my_template.md` template that uses the `${title}` variable:
```markdown
# ${title}
```
When a user asks for a new note using this template (eg. `Foam: Create New Note From Template`), VSCode will first ask the user for a title then provide it to the template, producing:
```markdown
# Living in a dream world
```
There will also be a `${titleSlug}` variable made available, which will be the "slugified" version of the title (eg. `living-in-a-dream-world`). This will be useful in later steps where we want to template the filepath of a template.
### Add a `Foam: Create New Note` command and hotkey
Instead of using `Markdown Notes: New Note`, Foam itself will have a `Create New Note` command that creates notes using templates.
This would open use the template found at `.foam/templates/new-note.md` to create the new note.
`Foam: Create New Note` will offer the fastest workflow for creating a note when you don't need customization, while `Foam: Create New Note From Template` will remain to serve a fully customizable (but slower) workflow.
#### Case 1: `.foam/templates/new-note.md` doesn't exist
If `.foam/templates/new-note.md` doesn't exist, it behaves the same as `Markdown Notes: New Note`:
* it would ask for a title and create the note in the current directory. It would open a note with the note containing the title.
**Note:** this would use an implicit default template, making use of the `${title}` variable.
#### Case 2: `.foam/templates/new-note.md` exists
If `.foam/templates/new-note.md` exists:
* it asks for the note title and creates the note in the current directory
**Progress:** At this point, we have a faster way to create new notes from templates.
### Change missing wikilinks to use the default template
Clicking on a dangling/missing wikilink should be equivalent to calling `Foam: Create New Note` with the contents of the link as the title.
That way, creating a note by navigating to a missing note uses the default template.
### Add a metadata section to templates
* The `Foam: New Note` command creates a new note in the current directory. This is a sensible default that makes it quick, but lacks flexibility.
* The `Foam: Create New Note From Template` asks the user to confirm/customize the filepath. This is more flexible but slower since there are more steps involved.
Both commands use templates. It would be nice if we could template the filepaths as well as the template contents (See ["Template the filepath in `openDailyNote`"](https://github.com/foambubble/foam/issues/523) for a more in-depth discussion the benefits of filepath templating).
In order to template the filepath, there needs to be a place where metadata like this can be specified.
I think this metadata should be stored alongside the templates themselves. That way, it can make use of all the same template variable available to the templates themselves.
Conceptually, adding metadata to the templates is similar to Markdown frontmatter, though the choice of exact syntax for adding this metadata will have to be done with care since the templates can contain arbitrary contents including frontmatter.
#### Example
A workable syntax is still to be determined.
While this syntax probably doesn't work as a solution, for this example I will demonstrate the concept using a second frontmatter block:
```markdown
<!-- The below front-matter block is for foam-specific template settings -->
<!-- It is removed when the user creates a new note using this template -->
---
<!-- The default filepath to use when using this template -->
<!-- Relative paths are relative to the workspace, absolute paths are absolute -->
<!-- Note that you can include VSCode snippet variables to template the path -->
filepath: `journal/${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}_${titleSlug}.md`
---
<!-- The actual contents of the template begin after the `---` thematic break immediately below this line-->
---
---
created: ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}T${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}
tags: []
---
# ${title}
```
In this example, using this template improves the UX:
In `Foam: Create New Note` workflow, having `filepath` metadata within `.foam/templates/new-note.md` allows for control over the filepath without having to introduce any more UX steps to create a new note. It's still just a hotkey away and a title.
As we'll see, when it comes to allowing daily notes to be templated, we don't even need to use `${title}` in our template, in which case we don't we don't even need to prompt for a title.
In the `Create New Note From Template` workflow, during the step where we allow the user to customize the filepath, it will already templated according to the `filepath` in the template's metadata. This means that the user has to make fewer changes to the path, especially in cases where they want to include things like datetimes in the filenames. This makes it faster (eg. don't have to remember what day it is, and don't have to type it) and less error-prone (eg. when they accidentally type the wrong date).
### Add a replacement for `dateFormat`
`foam.openDailyNote.filenameFormat` uses `dateFormat()` to put the current timestamp into the daily notes filename. This is much more flexible than what is available in VSCode Snippet variables. Before daily notes are switched over to use templates, we will have to come up with another mechanism/syntax to allow for calls to `dateFormat()` within template files.
This would be especially useful in the migration of users to the new daily notes templates. For example, if `.foam/templates/daily-note.md` is unset, then we could generate an implicit template for use by `Foam: Open Daily Note`. Very roughly something like:
```markdown
<!-- The below front-matter block is for foam-specific template settings -->
<!-- It is removed when the user creates a new note using this template -->
---
<!-- The default filepath to use when using this template -->
<!-- Relative paths are relative to the workspace, absolute paths are absolute -->
<!-- Note that you can include VSCode snippet variables to template the path -->
filepath: `${foam.openDailyNote.directory}/${foam.openDailyNote.filenameFormat}.${foam.openDailyNote.fileExtension}`
---
<!-- The actual contents of the template begin after the `---` thematic break immediately below this line-->
---
# ${foam.openDailyNote.titleFormat}
```
### Add support for daily note templates
With the above features implemented, making daily notes use templates is simple.
We define a `.foam/templates/daily-note.md` filepath that the `Foam: Open Daily Note` command will always use to find its daily note template.
If `.foam/templates/daily-note.md` does not exist, it falls back to a default, implicitly defined daily notes template (which follows the default behaviour of the current `foam.openDailyNote` settings).
Both `Foam: Open Daily Note` and `Foam: Create New Note` can share all of the implementation code, with the only differences being the hotkeys used and the template filepath used.
Example daily note template (again using the example syntax of the foam-specific frontmatter block):
```markdown
<!-- The below front-matter block is for foam-specific template settings -->
<!-- It is removed when the user creates a new note using this template -->
---
<!-- The default filepath to use when using this template -->
<!-- Relative paths are relative to the workspace, absolute paths are absolute -->
<!-- Note that you can include VSCode snippet variables to template the path -->
filepath: `journal/${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}.md`
---
<!-- The actual contents of the template begin after the `---` thematic break immediately below this line-->
---
# ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE}
```
Since there is no use of the `${title}` variable, opening the daily note behaves exactly as it does today and automatically opens the note with no further user interaction.
### Eliminate all `foam.openDailyNote` settings
Now that all of the functionality of the `foam.openDailyNote` settings have been obviated, these settings can be removed:
* `foam.openDailyNote.directory`, `foam.openDailyNote.filenameFormat`, and `foam.openDailyNote.fileExtension` can be specified in the `filepath` metadata of the daily note template.
* `foam.openDailyNote.titleFormat` has been replaced by the ability to fully template the daily note, including the title.
## Summary: resulting behaviour
### `Foam: Create New Note`
A new command optimized for speedy creation of new notes. This will become the default way to create new notes. In its fastest form, it simply opens the new note with no further user interaction.
### `Foam: Open Daily Note`
Simplified since it no longer has its custom settings, and re-uses all the same implementation code as `Foam: Create New Note`.
Templates can now be used with daily notes.
### Navigating to missing wikilinks
Now creates the new notes using the default template. Re-uses all the same implementation code as `Foam: Create New Note`
Now uses the contents of the wikilink as the `${title}` parameter for the template.
### `Foam: Create Note From Template`
Almost the exact same as it is today. However, with `${title}` and `filepath` templating, users will have less changes to make in the filepath confirmation step.
It's the slower but more powerful version of `Foam: Create New Note`, allowing you to pick any template, as well as customize the filepath.
## Extensions
In addition to the ideas of this proposal, there are ways we could imagine extending it. These are all "out of scope" for this design, but thinking about them could be useful to guide our thinking about this design.
### More variables in templates
`${title}` is necessary in this case to replace the functionality of `Markdown Notes: New Note`.
However, one could imagine that this pattern of "Ask the user for a value for missing variable values" could be useful in other situations too.
Perhaps users could even define their own (namespaced) template variables, and Foam would ask them for values to use for each when creating a note using a template that used those variables.
### `defaultFilepath`
By using `defaultFilepath` instead of `filepath` in the metadata section, you could have more control over the note creation without having to fall back to the full `Create New Note From Template` workflow.
* `filepath` will not ask the user for the file path, simply use the value provided (as described above)
* `defaultFilepath` will ask the user for the file path, pre-populating the file path using `defaultFilepath`
The first allows "one-click" note creation, the second more customization.
This might not be necessary, or this might not be the right way to solve the problem. We'll see.
### Arbitrary hotkey -> template mappings?
`Foam: Open Daily Note` and `Foam: Create New Note` only differ by their hotkey and their default template setting.
Is there a reason/opportunity to abstract this further and allow for users to define custom `hotkey -> template` mappings?

View File

@@ -0,0 +1,93 @@
# Wikilinks in Foam
Foam supports standard wikilinks in the format `[[wikilink]]`.
Wikilinks can refer to any note or attachment in the repo: `[[note.md]]`, `[[doc.pdf]]`, `[[image.jpg]]`.
The usual wikilink syntax without extension refers to notes: `[[wikilink]]` and `[[wikilink.md]]` are equivalent.
The goal of wikilinks is to uniquely identify a file in a repo, no matter in which directory it lives.
Sometimes in a repo you can have files with the same name in different directories.
Foam allows you to identify those files using the minimum effort needed to disambiguate them.
This is achieved by adding as many directories above the file needed to uniquely identify the link, e.g. `[[house/todo]]`.
See below for more details.
## Goals for wikilinks in Foam
Wikilinks in Foam are meant to satisfy the following:
- make it easy for users to identify a resource
- make it interoperable with other similar note taking systems (Obsidian, Dendron, ...)
- be easy to get started with, but satisfy growing needs
## Types of wikilinks supported in Foam
Foam supports two types of keys inside a wikilink: a **path** reference and an **identifier** reference:
- `[[./file]]` and `[[../to/another/file]]` are **path** links to a resource, relative _from the source_
- `[[/path/to/file]]` is a **path** link to a resource, relative _from the repo root_
- `[[file]]` is an **identifier** of a resource (based on the filename)
- `[[path/to/file]]` is an **identifier** of a resource (based on the path), the same is true for `[[to/file]]`
It's important to note that sometimes identifier keys can't uniquely locale a resource.
A more concrete example will help:
```
/
projects/
house/
todo.md
buy-car/
todo.md
cars.md
work/
todo.md
notes.md
```
In the above repo:
- `[[cars]]` is a unique identifier of a resource - it can be used anywhere in the repo
- `[[todo]]` is an non-unique identifier as it can refer to multiple resources
- `[[house/todo]]` is a unique identifier of a resource - it can be used anywhere in the repo
- `[[projects/house/todo]]` is a unique identifier of a resource - it can be used anywhere in the repo
- `[[/projects/house/todo]]` is a path reference to a resource
- `[[./todo]]` is a path reference to a resource (e.g. from `/projects/buy-car/cars.md`)
Basically we could say as a rule:
- if the link starts with `/` or `.` we consider it a **path** reference, in the first case from the repo root, otherwise from the source note
- if a link doesn't start with `/` or `.` it is an **identifier**
- generally speaking we use the shortest identifier available to identify a resource, **but all are valid**
- `[[projects/buy-car/cars]]`, `[[buy-car/cars]]`, `[[cars]]` are all unique identifier to the same resource, and are all valid in a document
- the same can be said for `[[projects/house/todo]]` and `[[house/todo]]` - but not for `[[todo]]`, because it can refer to more than one resource
## Compatibility with other apps
| Scenario | Obsidian | Foam |
| --------------------------- | ------------------------------- | ------------------------------- |
| 1 `[[notes]]` | ✔ unique identifier in repo | ✔ unique identifier in repo |
| 2 `[[/work/notes]]` | ✔ valid path from repo root | ✔ valid path from repo root |
| 3 `[[work/notes]]` | ✔ valid path from repo root | ✔ valid identifier in repo |
| 4 `[[project/house/todo]]` | ✔ valid path from repo root | ✔ valid unique identifier |
| 5 `[[/project/house/todo]]` | ✔ valid path from repo root | ✔ valid path from repo root |
| 6 `[[house/todo]]` | ✔ valid unique identifier | ✔ valid unique identifier |
| 7 `[[todo]]` | ✘ ambiguous identifier | ✘ ambiguous identifier |
| 8 `[[/house/todo]]` | ✘ incorrect path from repo root | ✘ incorrect path from repo root |
## Non-unique identifiers
We can't prevent non-unique identifiers from occurring in Foam (first and foremost because a file could be edited with another editor) but we can flag them.
Therefore Foam follows the following strategy instead:
1. there is a clear resolution mechanism (alphabetic) so that if nothing changes a non-unique identifier will always return the same note. Resolution has to be deterministic
2. a diagnostic entry (warning or error) is showed to the user for non-unique identifiers, so she knows that she's using a "risky" identifier
1. The quick resolution for this item will show the available unique identifiers matching the non-unique one
## Thanks
Thanks to [@memplex](https://github.com/memeplex) for helping with the thinking around this proposal.

View File

@@ -1,6 +1,6 @@
# Publishing Permissions(stub)
**[[todo]] This [[roadmap]] item needs more specification work.**
**[[todo]] This [[roadmap]] item needs more specification work.**
If you're interested in working on it, please start a conversation in [GitHub issues](https://github.com/foambubble/foam/issues).
@@ -10,6 +10,6 @@ If you're interested in working on it, please start a conversation in [GitHub is
- Share specific page (with private hash)
[//begin]: # "Autogenerated link references for markdown compatibility"
[todo]: todo "Todo"
[roadmap]: roadmap "Roadmap"
[//end]: # "Autogenerated link references"
[todo]: todo.md "Todo"
[roadmap]: proposals/roadmap.md "Roadmap"
[//end]: # "Autogenerated link references"

View File

@@ -0,0 +1,25 @@
# Releasing Foam
1. Get to the latest code
- `git checkout master && git fetch && git rebase`
2. Sanity checks
- `yarn reset`
- `yarn test`
3. Update change log
- `./packages/foam-vscode/CHANGELOG.md`
- `git add *`
- `git commit -m"Preparation for next release"`
4. Update version
- `$ yarn version-extension <version>` (where `version` is `patch/minor/major`)
5. Package extension
- `$ yarn package-extension`
6. Publish extension
- `$ yarn publish-extension`
7. Update the release notes in GitHub
- in GitHub, top right, click on "releases"
- select "tags" in top left
- select the tag that was just released, click "edit" and copy release information from changelog
- publish (no need to attach artifacts)
8. Annouce on Discord
Steps 1 to 6 should really be replaced by a GitHub action...

View File

@@ -14,6 +14,6 @@ Features belong on the [[roadmap]].
For more things to do, check backlinks for Pages that annotate [[todo]].
[//begin]: # "Autogenerated link references for markdown compatibility"
[roadmap]: roadmap "Roadmap"
[todo]: todo "Todo"
[roadmap]: proposals/roadmap.md "Roadmap"
[todo]: todo.md "Todo"
[//end]: # "Autogenerated link references"

Some files were not shown because too many files have changed in this diff Show More