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

Wikilinks #553

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

Wikilinks #553

wants to merge 14 commits into from

Conversation

zampino
Copy link
Collaborator

@zampino zampino commented Aug 29, 2023

Adds wikilinks syntax. In the general context of a Clerk notebook's prose, such links will lead to the notebook associated to the (var's) namespace.

  • [[some-ns]]
  • [[some/qualified-var]]

We also support internal links via a notebook's path, in this case the title of the notebook will be displayed.

  • [[path-to-notebook]]

The same applies to regular links [Some Label](var-or-ns-or-path-to-notebook).

In the context of the doc browser, internal links behave as described in cljdoc. In particular [[some-var]] in the current namespace will scroll to the correct height in the page.

Resuscitates #451.

@zampino zampino force-pushed the doc-browser--wikilinks branch from 524721e to 26d4caa Compare August 29, 2023 14:17
Base automatically changed from doc-browser to main August 30, 2023 08:36
zampino added 10 commits August 30, 2023 11:07
author Andrea Amantini <[email protected]> 1680188333 +0200
committer Andrea Amantini <[email protected]> 1693237293 +0200

Add internal-link tokenizer

Make basic example functional

Allow internal links to namespaces

Make internal link scroll to var

Put the notebook title as link content

Make linter happy

Refactor

Fix hash fragment in links to var

Omit reader quote-var dispatch in link text

Kondo

Include notebook presentation in doc-url rebinding scope

Simplify

Explain

Coherent keys

Handle fragments from vars

Naming

Reduce noise
@zampino zampino force-pushed the doc-browser--wikilinks branch from 4448306 to 589e007 Compare August 30, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant