-
Notifications
You must be signed in to change notification settings - Fork 966
Accessibility and SEO improvements #540
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,19 +7,20 @@ | |
| <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}"> | ||
| {{ end -}} | ||
|
|
||
| {{ if and hugo.IsProduction (ne $outputFormat "print") -}} | ||
| {{ if and (eq (getenv "HUGO_ENV") "production") (ne $outputFormat "print") -}} | ||
| <META NAME="ROBOTS" CONTENT="INDEX, FOLLOW"> | ||
| {{ else -}} | ||
| <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> | ||
| {{ end -}} | ||
|
|
||
| {{ partialCached "favicons.html" . }} | ||
| <title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title> | ||
| <meta name="description" content="{{ .Site.Params.Description }}"> | ||
| {{- template "_internal/opengraph.html" . -}} | ||
| {{- template "_internal/google_news.html" . -}} | ||
| {{- template "_internal/schema.html" . -}} | ||
| {{- template "_internal/twitter_cards.html" . -}} | ||
| {{ if hugo.IsProduction }} | ||
| {{ if eq (getenv "HUGO_ENV") "production" }} | ||
|
Comment on lines
-22
to
+23
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| {{ template "_internal/google_analytics_async.html" . }} | ||
| {{ end }} | ||
| {{ partialCached "head-css.html" . "asdf" }} | ||
|
|
@@ -29,14 +30,12 @@ | |
| crossorigin="anonymous"></script> | ||
| {{ if .Site.Params.offlineSearch }} | ||
| <script | ||
| src="https://unpkg.com/lunr@2.3.9/lunr.min.js" | ||
| integrity="sha384-203J0SNzyqHby3iU6hzvzltrWi/M41wOP5Gu+BiJMz5nwKykbkUx8Kp7iti0Lpli" | ||
| src="https://unpkg.com/lunr@2.3.8/lunr.min.js" | ||
| integrity="sha384-vRQ9bDyE0Wnu+lMfm57BlYLO0/XauFuKpVsZPs7KEDwYKktWi5+Kz3MP8++DFlRY" | ||
|
Comment on lines
+33
to
+34
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 For some context, see https://github.com/google/docsy/pull/540/files#r685339766. |
||
| 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 }}"/> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've created #694 to track this issue. |
||
| {{ partial "hooks/head-end.html" . }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| <ul class="list-unstyled d-flex justify-content-between align-items-center mb-0 pt-5 d-print-none"> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| <ul class="list-unstyled d-flex justify-content-between align-items-center mb-0 pt-5"> | ||
| <li> | ||
| <a {{if .PrevInSection}}href="{{.PrevInSection.RelPermalink}}"{{end}} class="btn btn-primary {{if not .PrevInSection}} disabled{{end}}"><span class="mr-1">←</span> {{ T "ui_pager_prev" }}</a> | ||
| <a {{if .PrevInSection}}href="{{.PrevInSection.RelPermalink}}"aria-label="{{ T "ui_pager_prev" }} - {{.PrevInSection.Title}}"{{end}} class="btn btn-primary {{if not .PrevInSection}} disabled{{end}}"><span class="mr-1">←</span> {{ T "ui_pager_prev" }}</a> | ||
| </li> | ||
| <a {{if .NextInSection}}href="{{.NextInSection.RelPermalink}}"{{end}} class="btn btn-primary {{if not .NextInSection}} disabled{{end}}">{{ T "ui_pager_next" }} <span class="ml-1">→</span></a> | ||
| <a {{if .NextInSection}}href="{{.NextInSection.RelPermalink}}"aria-label="{{ T "ui_pager_next" }} - {{.NextInSection.Title}}"{{end}} class="btn btn-primary {{if not .NextInSection}} disabled{{end}}">{{ T "ui_pager_next" }} <span class="ml-1">→</span></a> | ||
| </li> | ||
| </ul> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| {{ with .Parent }} | ||
| {{ $id := $.Get "id" | default (printf "td-block-%d" ( add .Ordinal 1 )) }} | ||
| {{ $color := $.Get "color" | default "blue" }} | ||
| <a class="btn btn-link text-{{ $color }}" href="#{{ $id }}"><i class="fa fa-chevron-circle-down" style="font-size: 400%"></i></a> | ||
| <a class="btn btn-link text-{{ $color }}" href="#{{ $id }}" aria-label="{{ T "ui_read_more"}}"><i class="fa fa-chevron-circle-down" style="font-size: 400%"></i></a> | ||
| {{ else }} | ||
| {{ errorf "The link-down shortcode is supposed to be nested inside a shortcode"}} | ||
| {{ end }} |
Uh oh!
There was an error while loading. Please reload this page.
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.
I'm assuming that this (retrograde) change was accidental, but I could be wrong -- and thanks for clarifying the situation @jcabak when you have a minute. Let's carry the discussion over to #652.
Uh oh!
There was an error while loading. Please reload this page.
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 🤠
Uh oh!
There was an error while loading. Please reload this page.
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.
Thanks for promptly confirming @jcabak. FYI, #653 reintroduces use of
hugo.IsProduction.