-
Notifications
You must be signed in to change notification settings - Fork 911
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
Accessibility and SEO improvements #540
Conversation
This is great, thanks! I'll give it a proper look later. |
{{ if and hugo.IsProduction (ne $outputFormat "print") -}} | ||
{{ if and (eq (getenv "HUGO_ENV") "production") (ne $outputFormat "print") -}} |
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.
@jcabak - why were the changes introduced by #413 reverted here?
@LisaFC - maybe this is the case of #611?
IMHO we should be using hugo.IsProduction
, not checking environment variable values -- in particular since a production build can be requested using the -e flag command line flag.
/cc @nate-double-u
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.
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.
Honestly I am surprised that I changed this line, you have right @chalin it was accidental. I appreciate your vigilance 🤠
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.
{{ if hugo.IsProduction }} | ||
{{ if eq (getenv "HUGO_ENV") "production" }} |
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.
src="https://unpkg.com/lunr@2.3.8/lunr.min.js" | ||
integrity="sha384-vRQ9bDyE0Wnu+lMfm57BlYLO0/XauFuKpVsZPs7KEDwYKktWi5+Kz3MP8++DFlRY" |
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.
Hi again @jcabak. Why was lunr's version retrograded?
Could it be that, aside from the addition of <meta name="description" ...>
, every other change in this file is because you were working from an old version of the file (including the removal of the shortcodes.css
link below)?
For some context, see https://github.com/google/docsy/pull/540/files#r685339766.
@@ -1,7 +1,7 @@ | |||
<ul class="list-unstyled d-flex justify-content-between align-items-center mb-0 pt-5 d-print-none"> |
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.
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.
Sorry @chalin, I don't know why I made mistakes, especially with removal stylesheet for tabbed pane and d-print-none
. It shouldn't be like that.
crossorigin="anonymous"></script> | ||
{{end}} | ||
{{ if .Site.Params.prism_syntax_highlighting }} | ||
<!-- stylesheet for Prism --> | ||
<link rel="stylesheet" href="{{ "/css/prism.css" | relURL }}"/> | ||
{{ end }} | ||
<!-- stylesheet for tabbed pane --> | ||
<link rel="stylesheet" href="{{ "/css/shortcodes.css" | relURL }}"/> |
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.
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.
Investigating further, it seems that this was by mistake, but I'd appreciate a confirmation @jcabak.
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've created #694 to track this issue.
@jcabak - any updates? |
No worries. As I mentioned to @LisaFC elsewhere, me might need to discuss & revisit the PR submission and review process to avoid such unintended consequences (e.g., by using squash-merges and requiring that PRs be submitted against the most recent HEAD). Thanks for confirming! Now we can move forward with fixes. |
yes! I'm working on setting up some visual regression testing against docsy-example (with Percy: emckean/docsy-example#2), so that we can see more easily when something breaks. But setting some PR rules as @chalin suggested is a great idea! I have some time blocked for this tomorrow, let me see if I can push this to the top of the list ... |
aria-label
for links “read more” and “next” and previous” article in blogrel="noopener"
)font-display: swap;
)