Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[For merging on 30.09] landing page is canonical #513
[For merging on 30.09] landing page is canonical #513
Changes from 5 commits
67a9f9e
28346fc
5d0eb30
7f3d87a
2aa1744
f7113d7
f97cf29
5ec0aa1
6577a9c
f486b2c
fb0f84b
75d51d2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bib path is now
${ANTH_ID}.bib
, e.g.,https://aclweb.org/anthology/P19-1002.bib
, instead of the nested version.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're no longer using
$bibfile
, but the link is still within an if clause that checks for$bibfile
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine though, right? If the bibfile exists, we generate the appropriate link to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't change this because I'm not sure how to fix it. If the bibfile is present, we generate the canonical link to it, which is handled by a redirect internally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, the question is whether we still want a check for the existence of the file in the Hugo template.
If we do, then this current solution is suboptimal IMO since it requires us manually remembering and updating the actual local path to the file (in the
$bibfile := ...
line), in case it ever changes.If we do not, we should just throw out the surrounding lines altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to the canonical page (
https://aclweb.org/anthology/P19-1002/
) instead of the nested version. This will get rid of the double search results.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same concern as above: URL can refer to external content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
url
now points to the page's Anthology URL;pdf
points to the PDF (which can be internal or external).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The downside of how this is now handled is that it completely breaks local browsing of the site, since links always point to the live anthology.
I see two options here:
Making the behaviour dependent on Hugo's "environment" variable, using
.RelPermalink
when in development mode and$paper.url
otherwise. I don't really like this, as diverging behaviour has the potential to hide bugs.Generating the flat structure directly with Hugo, as discussed in Should the canonical URL be the landing page? #480, instead of relying on redirects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the canonical URL prefix instead of the deeply nested prefix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same concern as with
$bibfile
above.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So do you suggest that we generate
bib
,endf
, etc links in the YAML, and only use those if present?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I ended up doing for clarity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice, but has the same issue with local browsing–the links will always point to the live server.