diff --git a/README.md b/README.md
index 7cfc801..0427ffc 100644
--- a/README.md
+++ b/README.md
@@ -106,6 +106,10 @@ already implemented:
`render: false` to your [build
options](https://gohugo.io/content-management/build-options/#readout) to avoid
rendering a blank post.
+- Skip link: a "skip to main content" link that is temporarily invisible, but
+ can be focused by people who need a keyboard to navigate the web (see [PR
+ #5](https://github.com/clente/hugo-bearcub/pull/5) by
+ [@2kool4idkwhat](https://github.com/2kool4idkwhat) for more information).
- Single-use CSS (EXPERIMENTAL): you can add some styles to a single page by
writing the CSS you need in `assets/{custom_css}.css` and then including
`style: "{custom_css}.css"` in the [front
@@ -158,7 +162,7 @@ enableRobotsTXT = true
LanguageCode = "en-US"
contentDir = "content"
[languages.en.params]
- blogPath = "/blog" # Path to your blog section (used by RSS)
+ blogPath = "blog" # Path to your blog section (used by RSS)
madeWith = "Made with [Bear Cub](https://github.com/clente/hugo-bearcub)"
[languages.pt]
title = "Bear Cub"
@@ -166,7 +170,7 @@ enableRobotsTXT = true
LanguageCode = "pt-BR"
contentDir = "content.pt"
[languages.pt.params]
- blogPath = "/pt/blog" # Path to your blog section (used by RSS)
+ blogPath = "blog" # Path to your blog section (used by RSS)
madeWith = "Feito com [Bear Cub](https://github.com/clente/hugo-bearcub)"
[params]
diff --git a/assets/herman.css b/assets/herman.css
index a61d6c9..cd84aec 100644
--- a/assets/herman.css
+++ b/assets/herman.css
@@ -176,3 +176,17 @@ td {
gap: calc(var(--spacing) / 2);
}
}
+
+/* "Skip to main content" link */
+.skip-link {
+ position: absolute;
+ top: 5;
+ transform: translateY(-600%);
+ transition: transform 0.5s;
+ background-color: #181a20;
+ padding: 6px;
+}
+
+.skip-link:focus {
+ transform: translateY(0%);
+}
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index cecd754..3b68b53 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -33,7 +33,7 @@ enableRobotsTXT = true
LanguageCode = "en-US"
contentDir = "content"
[languages.en.params]
- blogPath = "/blog" # Path to your blog section (used by RSS)
+ blogPath = "blog" # Path to your blog section (used by RSS)
madeWith = "Made with [Bear Cub](https://github.com/clente/hugo-bearcub)"
[languages.pt]
title = "Bear Cub"
@@ -41,7 +41,7 @@ enableRobotsTXT = true
LanguageCode = "pt-BR"
contentDir = "content.pt"
[languages.pt.params]
- blogPath = "/pt/blog" # Path to your blog section (used by RSS)
+ blogPath = "blog" # Path to your blog section (used by RSS)
madeWith = "Feito com [Bear Cub](https://github.com/clente/hugo-bearcub)"
[params]
diff --git a/i18n/en.toml b/i18n/en.toml
index 1a89360..b7738dd 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -5,4 +5,7 @@
other = "No posts yet"
[email-subject]
- other = "Reply to "
\ No newline at end of file
+ other = "Reply to "
+
+[skip-link]
+ other = "Skip to main content"
\ No newline at end of file
diff --git a/i18n/pt.toml b/i18n/pt.toml
index a139b0f..33fc65f 100644
--- a/i18n/pt.toml
+++ b/i18n/pt.toml
@@ -5,4 +5,7 @@
other = "Nenhum post ainda"
[email-subject]
- other = "Resposta a "
\ No newline at end of file
+ other = "Resposta a "
+
+[skip-link]
+ other = "Pular para conteúdo principal"
\ No newline at end of file
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 0b0cdff..bddfe68 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -36,7 +36,7 @@
{{- partial "header.html" . -}}
-
+
{{- block "main" . }}{{- end }}