Accessibility and SEO improvements#540
Conversation
|
This is great, thanks! I'll give it a proper look later. |
| {{ end -}} | ||
|
|
||
| {{ if and hugo.IsProduction (ne $outputFormat "print") -}} | ||
| {{ if and (eq (getenv "HUGO_ENV") "production") (ne $outputFormat "print") -}} |
There was a problem hiding this comment.
@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.
Honestly I am surprised that I changed this line, you have right @chalin it was accidental. I appreciate your vigilance 🤠
| {{ if hugo.IsProduction }} | ||
| {{ if eq (getenv "HUGO_ENV") "production" }} |
There was a problem hiding this comment.
| 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.
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.
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.
| <link rel="stylesheet" href="{{ "/css/prism.css" | relURL }}"/> | ||
| {{ end }} | ||
| <!-- stylesheet for tabbed pane --> | ||
| <link rel="stylesheet" href="{{ "/css/shortcodes.css" | relURL }}"/> |
|
@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-labelfor links “read more” and “next” and previous” article in blogrel="noopener")font-display: swap;)