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

Page attachments/resources: convert url_* options to 2D array named links #765

Open
1 of 6 tasks
gcushen opened this issue Oct 28, 2018 · 2 comments
Open
1 of 6 tasks

Comments

@gcushen
Copy link
Collaborator

gcushen commented Oct 28, 2018

Link buttons can be added to pages for citing, preprints, PDFs, etc.

Let's make the way to add link buttons to a page more flexible, simpler, and unified under a links array.

Proposed changes:

  • Rename url_custom to links
  • Add remaining url_ types to links array
  • Convert button generation logic to a single automated loop over any links instances appearing in a page's front matter
  • Upgrade archetypes
  • Dev. bash/python script to upgrade user's existing content front matter
  • Consider renaming external_link

Proposed links structure:

  • type, e.g. slides, custom, etc. (required)
  • icon (optional)
  • icon_pack (optional)
  • name (optional) - can be used for custom buttons or to easily override the relevant i18n value
  • url (required)
  • weight (or simply base on the order in which they are defined in)

Also consider #1010 - could automatically detect PDF versions of a publications and link to them, e.g. v1.pdf displays as a v2 PDF download link.

v4.1 Breaking changes

Renamed url_custom to links in front matter of content (if used).

v5.X Breaking changes

TBC

@gcushen gcushen modified the milestones: v3.2, v3.3 Nov 2, 2018
@gcushen gcushen modified the milestones: v4, v4.1 Feb 7, 2019
@gcushen gcushen changed the title Page buttons: convert url_* options to 2D array named [[button]] Page buttons: convert url_* options to 2D array named [[links]] Feb 8, 2019
gcushen added a commit that referenced this issue Feb 13, 2019
BREAKING CHANGE:
Rename `url_custom` to `links` if using it in the front matter of any
content file.

See #765
@gcushen gcushen modified the milestones: v4.1, v4.2 Feb 27, 2019
@gcushen gcushen modified the milestones: v4.2, v4.4 Mar 17, 2019
@gcushen gcushen modified the milestones: v4.5, v4.6 Jul 22, 2019
@gcushen gcushen modified the milestones: v4.7, v4.6 Sep 11, 2019
@gcushen gcushen modified the milestones: v4.6, v4.7 Nov 9, 2019
@gcushen gcushen modified the milestones: v4.7, v4.8 Dec 24, 2019
@gcushen gcushen modified the milestones: v4.9, v4.11 Apr 5, 2020
@gcushen gcushen mentioned this issue Dec 22, 2020
2 tasks
@HughP
Copy link

HughP commented Dec 23, 2020

just by way of reference here is what my current list of "working options" exist within my list of custom links. I've moved most items out of the default links... one down side to this is that using the custom links makes automating schema.org metadata about the files difficult. https://gist.github.com/HughP/7c701444a64c0c68d61a7c9596d7da2e

@soto97
Copy link

soto97 commented Feb 15, 2021

Right now, with a recently installed Hugo/Wowchemy site (installed a few days ago) the url_preprint still works. I would like to ask that is remain.

Like was mentioned in another issue (see #1010 (comment) and #1010 (comment)) , there are many of us who would want to associate a preprint pdf with the citation for the refereed version of the paper. The custom in my field is to cite the refereed version with a link to arxiv (or similar) but not to have a second, redundant arxiv entry. This is usually only needed when publishing in a closed access journal (typically an Elsevier journal since they sadly still dominate publishing).

For now, I get a nice Preprint button with my citations. I hope I will be able to continue to do this with future updates.

Thanks!

@gcushen gcushen changed the title Page buttons: convert url_* options to 2D array named [[links]] Page attachments/resources: convert url_* options to 2D array named links May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants