riptano / docs-ui

The UI and theme for DataStax Docs.
https://riptano.github.io/docs-ui/
Mozilla Public License 2.0
2 stars 0 forks source link

Add inline image support to `svg` macro; attempt feature parity with built-in `image:` and `image::` macros #143

Open eric-schneider opened 4 months ago

eric-schneider commented 4 months ago

Note: The goal of this ticket is to allow the svg macro to be used for inline images. This is not to be confused with the opts=inline SVG attribute, which the svg macro already uses by default.

The svg macro syntax currently supports inline usage (svg:) and block usage (svg::). However, it appears that the macro only truly supports block images. This limits the macro's versatility and causes confusion for writers when the inline usage produces unexpected results.

Inline image support

There are cases where we'd like to be able to use the macro for inline images. For example, to achieve a table that looks like the following:

image

You would expect the syntax to look like this:

|===
|Embedding provider |External |Astra-hosted |Docs

|svg:ROOT:ui/icons/microsoft-azure-openai.svg[] Azure OpenAI <-- Macro inline with text
|[.material-icons]#check#
|
|xref:integrations:embedding-providers/azure-openai.adoc[Get started]
|===

However, because the macro generates a block image, the inline text gets bumped down into a new paragraph below the icon:

image

Feature parity with built-in image:: and image: macros

It would be ideal if the svg: and svg:: macro usages mirrored their image: and image:: counterparts in terms of their supported attributes and values.

eric-schneider commented 5 hours ago

This issue is resolved by https://github.com/riptano/datastax-docs-site/pull/227 and https://github.com/riptano/docs-ui/pull/171