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

Look for imagesdir attribute on node before looking on document #3660

Open
ggrossetie opened this issue May 17, 2020 · 1 comment · May be fixed by #3661
Open

Look for imagesdir attribute on node before looking on document #3660

ggrossetie opened this issue May 17, 2020 · 1 comment · May be fixed by #3661
Milestone

Comments

@ggrossetie
Copy link
Member

ggrossetie commented May 17, 2020

An asset can be:

  • icon (inline)
  • image (inline and block)
  • audio
  • video

When resolving an asset path from the target (using the method AbstractNode#image_uri, AbstractNode#media_uri or AbstractNode#icon_uri) we should first look for the asset directory attribute on the node and then look on the document (ie. current behavior).

@ggrossetie ggrossetie changed the title When we resolve the image path from the target we first need to look for imagesdir on the node First use the attribute imagesdir on the node to resolve the image path from the target May 17, 2020
@ggrossetie ggrossetie changed the title First use the attribute imagesdir on the node to resolve the image path from the target Use the asset directory attribute on the node (if present) to resolve the asset path from the target May 17, 2020
ggrossetie added a commit to ggrossetie/asciidoctor that referenced this issue May 17, 2020
…the node

If the asset directory attribute (by default, `imagesdir` or `iconsdir`) is defined on the node, we should use it.
If not, then we should use the value defined on the `Document`.
ggrossetie added a commit to ggrossetie/asciidoctor that referenced this issue May 17, 2020
…de to resolve the asset path

If the asset directory attribute (by default, `imagesdir` or `iconsdir`) is defined on the node, we should use it.
If not, then we should use the value defined on the `Document`.
ggrossetie added a commit to ggrossetie/asciidoctor that referenced this issue May 17, 2020
…de to resolve the asset path

If the asset directory attribute (by default, `imagesdir` or `iconsdir`) is defined on the node, we should use it.
If not, then we should use the value defined on the `Document`.
ggrossetie added a commit to ggrossetie/asciidoctor that referenced this issue May 17, 2020
…de to resolve the asset path

If the asset directory attribute (by default, `imagesdir` or `iconsdir`) is defined on the node, we should use it.
If not, then we should use the value defined on the `Document`.
ggrossetie added a commit to ggrossetie/asciidoctor that referenced this issue May 17, 2020
…de to resolve the asset path

If the asset directory attribute (by default, `imagesdir` or `iconsdir`) is defined on the node, we should use it.
If not, then we should use the value defined on the `Document`.
@mojavelinux mojavelinux changed the title Use the asset directory attribute on the node (if present) to resolve the asset path from the target Look for imagesdir attribute for image on node before looking on document May 17, 2020
@mojavelinux mojavelinux changed the title Look for imagesdir attribute for image on node before looking on document Look for imagesdir attribute on node before looking on document May 17, 2020
@mojavelinux mojavelinux added this to the v2.x milestone May 17, 2020
@mojavelinux mojavelinux modified the milestones: v2.x, v2.1.x Aug 22, 2021
@mojavelinux
Copy link
Member

It stands to reason that the imagesdir attribute could be set in the AsciiDoc source as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants