BCLibraries / burns-exhibits

Hugo site for Burns Library exhibits
0 stars 1 forks source link

Add catalog links #12

Open monahakk opened 5 years ago

monahakk commented 5 years ago

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 commented 5 years ago

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

Cons

monahakk commented 5 years ago

Looking at this for the long term, I think I'd rather just use HTML, unless you think the potential of being able to rescue the URLs is worth it.

-Kathleen

Kathleen Monahan (she/her/hers) Reference, Instruction & Digital Services Librarian John J. Burns Library, Boston College

kathleen.monahan.2@bc.edu 617-552-8389

On Mon, Apr 29, 2019 at 3:10 PM Benjamin Florin notifications@github.com wrote:

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

book title

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BCLibraries/burns-exhibits/issues/12#issuecomment-487705935, or mute the thread https://github.com/notifications/unsubscribe-auth/AJK3QXJYX5KOY4HJJPX7ZNTPS5BZJANCNFSM4HIPOXFA .

Otterfan commented 5 years ago

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

Otterfan commented 5 years ago

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)"
%}}