Tools like Tickets, Wikis, Discussions, etc. should include a canonical link. Also on sections with pagination include page=x in the root url and rel="next"rel="next" tags
minor: ForgeTracker/forgetracker/templates/tracker/milestone.html has import 'allura:templates/jinja_master/lib.html twice
when on a page=0 url, then I don't see any rel="next" tag. Remember page=0 means first page in allura! 😁
when on a page=1 url then the <link rel="prev" href="/p/test/tickets/milestone/1.0/"/> doesn't have the fully-qualified URL with domain
also when on a ticket search then this rel="prev" tag loses the ?q=... part of its URL
the def querystring helper is a little complicated, can we have a docstring to explain what it does? Like "make a new URL based on the current request and new params" if that is a correct explanation 😄 Maybe even a unit test too? (you can make a fake request with Request.blank
I think there's a mismatch between passing count into lib.pagination_meta_tags( and that macro taking the parameter as last_page. The count of items is not equal to the last page number. Need to divide by the limit size I think to convert count into last_page.
probably should include these tags on the main ticket list and the blog main view too.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh, that is correct there is a miscalculation on the current page and last page. I fixed it.
- Also added a test for querystring helper and a docstring
- Fixed full qualified URL for links
- Added the pagination and canonical url to Blog index,search page and Tickets index page
- Fixed duplicated import
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
On pages like discussion search, the q parameter is not being included in the canonical tag. I think it should be kept. And on ticket search there can be filter and sort params too.
Are there any other pages with "important" url parameters that should be kept? I can't think of any others right now.
For the canonical link I added the helper h.querystring to generate the url and include the url params except limit, could this be the right approach?.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yea I think that is a good approach so we keep any other parameters. Its the safest for now so we don't drop a parameter by mistake. It does mean if there is a junk parameter like ?asf=asf somehow it'll still be in the canonical. If that turns out to be an issue, we can revisit then.
One last issue I found, if you are on page=1, then the rel=prev tag has page=0 in the URL but it be better to not to say page=0 and just leave that part off. Also the pagination links do the same thing, in page_list.html with the paginator library, is it possible for them to omit when page=0?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ForgeTracker/forgetracker/templates/tracker/milestone.html
hasimport 'allura:templates/jinja_master/lib.html
twicepage=0
url, then I don't see anyrel="next"
tag. Remember page=0 means first page in allura! 😁page=1
url then the<link rel="prev" href="/p/test/tickets/milestone/1.0/"/>
doesn't have the fully-qualified URL with domainrel="prev"
tag loses the?q=...
part of its URLdef querystring
helper is a little complicated, can we have a docstring to explain what it does? Like "make a new URL based on the current request and new params" if that is a correct explanation 😄 Maybe even a unit test too? (you can make a fake request withRequest.blank
count
intolib.pagination_meta_tags(
and that macro taking the parameter aslast_page
. The count of items is not equal to the last page number. Need to divide by thelimit
size I think to convertcount
intolast_page
.Oh, that is correct there is a miscalculation on the current page and last page. I fixed it.
- Also added a test for querystring helper and a docstring
- Fixed full qualified URL for links
- Added the pagination and canonical url to Blog index,search page and Tickets index page
- Fixed duplicated import
On pages like discussion search, the
q
parameter is not being included in the canonical tag. I think it should be kept. And on ticket search there can befilter
andsort
params too.Are there any other pages with "important" url parameters that should be kept? I can't think of any others right now.
Getting some test failures:
h.querystring
to generate the url and include the url params exceptlimit
, could this be the right approach?.Yea I think that is a good approach so we keep any other parameters. Its the safest for now so we don't drop a parameter by mistake. It does mean if there is a junk parameter like
?asf=asf
somehow it'll still be in the canonical. If that turns out to be an issue, we can revisit then.One last issue I found, if you are on
page=1
, then therel=prev
tag haspage=0
in the URL but it be better to not to saypage=0
and just leave that part off. Also the pagination links do the same thing, inpage_list.html
with thepaginator
library, is it possible for them to omit whenpage=0
?Removed page value from url string for
canonical
and also forlink rel="prev"
meta tag