Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Wiki Links #92

Open
pajoma opened this issue Aug 9, 2021 · 2 comments
Open

Better Wiki Links #92

pajoma opened this issue Aug 9, 2021 · 2 comments
Assignees
Milestone

Comments

@pajoma
Copy link
Owner

pajoma commented Aug 9, 2021

Test to support simple wiki links, e.g. [[a-link-is-here]] or [[A Link Is here]] (with snake case normalization)

Required features:

@pajoma pajoma self-assigned this Aug 9, 2021
@pajoma
Copy link
Owner Author

pajoma commented Aug 18, 2021

Problem here: we lose markdown compatibility.

Current syntax is:

- a file [link](../../notes/some-note.md)

Proposed syntax is (for the same file)

- a file link [[../../notes/some-note.md]]

and if we are able to guarantee uniquess of filenames in all scopes it could be

- a file link [[some-note]]

Uniquess is an issue, though. Journal entries might just be named after day in month (e.g. 12.md in /2021/08), which means a lot of 12.md in the workspace.

Alternative solution

A code action is provided (as Refactor), which detects the QuickLink-Syntax and converts it to a proper link.

  1. User enters: a file link to [[workshop notes]]
  2. Code Action triggered: Create note and transform to link
  3. [[workshop notes]] is transformed to [workshop-notes](../notes/202108-workshop-notes.md). The file name follows the pattern in the configuration
  4. A new file is created with the title # Workshop Notes

Open Questions:

How to deal with scopes?
[[workshop notes]] : The new file is created in default path for notes
[[workshop notes #projA]] : The new file is created in scope path for notes

@pajoma
Copy link
Owner Author

pajoma commented Aug 18, 2021

The text within the brackets [[]] is resolved like the text in the magic input. The following should be possible

  • [[+1]] links to the entry of next day
  • [[08-22]] links to the entry of of the August 22nd of current year
  • [[yesterday]] links to the entry of previous day
  • [[tom]] links to the entry of next day
  • [[some text]] links to a note titled "some text"
  • [[some text #projA]] links to a note titled "some text" in scope ProjA

@pajoma pajoma added this to the 0.12 milestone Aug 18, 2021
@pajoma pajoma modified the milestones: 0.12, 2.0 Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant