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

standardize resource_link shortcode's output #1376

Open
HussainTaj-arbisoft opened this issue Mar 27, 2024 · 0 comments
Open

standardize resource_link shortcode's output #1376

HussainTaj-arbisoft opened this issue Mar 27, 2024 · 0 comments

Comments

@HussainTaj-arbisoft
Copy link
Contributor

Description/Context

At the time of this writing, our resource_link shortcode can produce two types of output.

  • HTML for external-resources
  • Markdown for other types of links

Studio uses this shortcode with {{% tags i.e {{% resource_link ... %}}. {{% syntax processes markdown content while the alternative {{< syntax does not.

The shortcode should return one kind of output so that the use of the shortcode follows a consistent syntax. Mixing the output types has the potential to cause unexpected rendering problems.

For information on the issues we have faced, you may read #1371 (comment). And for more details about the issue itself, you may read this excellent explanation by @gumaerc.

Plan/Design

The approach we follow relies on the future of External Resources. If their UI flow changes, we might not need to change resource_link. We can use the shortcode external_resource_link instead. However, if the UI flow remains the same, we will need to update the resource_link shortcode to return only HTML and update all of its usage.

(Originally proposed in #1371 (comment))

The latter will require the following steps:

  1. Update resource_link to return only HTML.
  2. Update Studio's CKEditor to support {{< resource_link ... >}} syntax.
  3. Update the usage inside existing content and publish the updates.
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