jupyter-book / mystmd

Command line tools for working with MyST Markdown.
https://mystmd.org/guide
MIT License
219 stars 64 forks source link

🧟‍♀️ Revive link-block directive to create linkBlock node #1518

Closed fwkoch closed 2 months ago

fwkoch commented 2 months ago

The link-block directive used to exist, see this commit: https://github.com/jupyter-book/mystmd/commit/920c087ccf092bbf57c65833e139e34ee913e63d but somewhere in the monorepo refactor I believe it was lost.

There is still lingering support for linkBlock nodes in mystmd, e.g. https://github.com/jupyter-book/mystmd/blob/main/packages/myst-cli/src/process/mdast.ts#L83, and in myst-theme, https://github.com/jupyter-book/myst-theme/blob/main/packages/myst-to-react/src/links/index.tsx#L108

This PR revives the link-block directive to create linkBlock nodes. The url is required as directive arg, and title option and description in the body are optional.

image

changeset-bot[bot] commented 2 months ago

🦋 Changeset detected

Latest commit: 7b86dd04b29a6b766d335a3a848ac2e43d1fe4fe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages | Name | Type | | --------------- | ----- | | myst-directives | Patch | | myst-transforms | Patch | | myst-parser | Patch | | myst-roles | Patch | | myst-to-html | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

fwkoch commented 2 months ago

After chatting a bit with @rowanc1 - linkBlock was intentionally removed in favor of better cards. The remaining references to linkBlock in the code are deprecated and should not be re-expanded!