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

Add catalog links #12

Open
monahakk opened this issue Apr 25, 2019 · 4 comments
Open

Add catalog links #12

monahakk opened this issue Apr 25, 2019 · 4 comments
Assignees

Comments

@monahakk
Copy link
Contributor

Is your feature request related to a problem? Please describe.
We want to link to the catalog records as part of citations for images. Ideally, we'd like these links to open in a new tab, but we can't figure out how to do that in markdown.

Describe the solution you'd like
Is it possible to make links open in new tabs? If so, how?

@Otterfan
Copy link
Member

You can put HTML in a markdown file, so something like this would work:

<a href="https://bc-primo.hosted.exlibrisgroup.com/primo-explore/fulldisplay?docid=ALMA-BC21421261320001021&context=L&vid=bclib_new" target="_blank">book title</a>

We could also make a shortcode for links to the catalog, like:

{{% catalog-link docid="ALMA-BC21421261320001021" %}}book title{{% /catalog-link %}}

Pros

  • It's a little shorter
  • If Alma URLs ever change (or we stop using Alma) we might not have to rewrite all the URLs by hand

Cons

  • Yet another shortcode to document and remember

@monahakk
Copy link
Contributor Author

monahakk commented Apr 30, 2019 via email

@Otterfan Otterfan added the wontfix This will not be worked on label Apr 30, 2019
@Otterfan
Copy link
Member

I'll close this as "won't fix", and we'll revisit it if we have to.

@Otterfan Otterfan added this to the 0.1 milestone Apr 30, 2019
@Otterfan Otterfan removed the wontfix This will not be worked on label Apr 30, 2019
@Otterfan Otterfan reopened this Apr 30, 2019
@Otterfan Otterfan modified the milestones: 0.1, 0.2 Apr 30, 2019
@Otterfan Otterfan changed the title Open links in new tabs Add catalog links May 14, 2019
@Otterfan
Copy link
Member

This might be a little tough to do because of a "quotes in quotes" problem.

We could add a catalog-link shortcode, e.g.:

{{% catalog-link text="*Otters*" docid="ALMA-BC21421261320001021" %}}

however most links are already inside description attributes of figure and largefigure shortcodes. These attributes need to be quoted already, and the quotes from the catalog-link attributes interfere with the quotes from the description attribute, e.g.:

{{% figure src="../13a_BeingSocial_GreeneTelegram.jpg"
            headline="Telegram"
            description="Box 59, Folder 8, {{% catalog-link text="Graham Geene Papers" docid="ALMA-BC21351254200001021" %}} (MS1995-003)"
%}}

@Otterfan Otterfan modified the milestones: 0.2, 0.3 May 14, 2019
@Otterfan Otterfan removed this from the 0.3 milestone Jul 15, 2019
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