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

quotes inside image include title breaks html generation in Jekyll #32

Closed
elotroalex opened this issue Jul 3, 2019 · 3 comments
Closed
Assignees

Comments

@elotroalex
Copy link
Contributor

The issue seems to be that the alt value gets populated with this value, and a quotation mark inside the alt value will close it prematurely. Jekyll seems to pick up on this problem and pre-emptively and uselessly converts the angle brackets into hex values. Here's an example of the generated html:

<a href="https://archive.org/details/tableaudesfinanc00slsn" title="Figure 1. "Tableau des Finances et du Commerce de la partie Françoise de St. Domingue," 1792 (detail). Copy in the John Carter Brown Library, Brown University." target="_blank">
    
        <img src="/sxarchipelagos/images/issue03/nesbitt-1.jpg" alt="Figure 1. "Tableau des Finances et du Commerce de la partie Françoise de St. Domingue," 1792 (detail). Copy in the John Carter Brown Library, Brown University."/>
    
    </a>
@elotroalex
Copy link
Contributor Author

elotroalex commented Jul 3, 2019

In honor of the persistent criminality of quotation marks here's a list of uses of quotation marks. We can transfer the list to a wiki page later, once this issue is out. That wiki page could be documentation on markup standards that work with our system:

  • In YAML on the header: Solution is to use block scalars using >. The block itself should use spaces not tabs, and begin two spaces from the key indent.
  • In the image includes: use "
  • In titles: Should work out of the box.
  • In config.yml: Avoided

@Denubis
Copy link
Collaborator

Denubis commented Jul 4, 2019

{% include image.html
img="issue03/nesbitt-1.jpg"
title='Figure 1. "Tableau des Finances et du Commerce de la partie Françoise de St. Domingue," 1792 (detail). Copy in the John Carter Brown Library, Brown University.'
caption='Figure 1. "Tableau des Finances et du Commerce de la partie Françoise de St. Domingue," 1792 (detail). Copy in the John Carter Brown Library, Brown University.'
url="https://archive.org/details/tableaudesfinanc00slsn" %}

produces:
Screenshot from 2019-07-04 22-35-50
in pdf

Screenshot from 2019-07-04 22-36-18
in jekyll

Internal quotes in subject matter should therefore be used as ", and should have single quotes as the string demarcation. (Double quotes normally for string demarcation though)

@elotroalex
Copy link
Contributor Author

closing and referencing from production notes elsewhere

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

No branches or pull requests

2 participants