mirror of
https://github.com/tcsenpai/obsidiangarden_netlify.git
synced 2025-06-06 20:55:21 +00:00
Adds user selected language in <html lang=""> (#208)
This commit uses the SITE_MAIN_LANGUAGE set in the .env for all lang attributes in html elements. This improves accessibility.
This commit is contained in:
parent
c44066a556
commit
9d74cb1997
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="{{ meta.mainLanguage }}">
|
||||||
<head>
|
<head>
|
||||||
<title>Nothing here</title>
|
<title>Nothing here</title>
|
||||||
<link href="/styles/digital-garden-base.css" rel="stylesheet">
|
<link href="/styles/digital-garden-base.css" rel="stylesheet">
|
||||||
|
@ -48,7 +48,7 @@ module.exports = async (data) => {
|
|||||||
bodyClasses.push("backlinks-note-icon");
|
bodyClasses.push("backlinks-note-icon");
|
||||||
noteIconsSettings.backlinks = true;
|
noteIconsSettings.backlinks = true;
|
||||||
}
|
}
|
||||||
if(styleSettingsCss){
|
if (styleSettingsCss) {
|
||||||
bodyClasses.push("css-settings-manager");
|
bodyClasses.push("css-settings-manager");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,6 +66,7 @@ module.exports = async (data) => {
|
|||||||
timestampSettings,
|
timestampSettings,
|
||||||
baseTheme: process.env.BASE_THEME || "dark",
|
baseTheme: process.env.BASE_THEME || "dark",
|
||||||
siteName: process.env.SITE_NAME_HEADER || "Digital Garden",
|
siteName: process.env.SITE_NAME_HEADER || "Digital Garden",
|
||||||
|
mainLanguage: process.env.SITE_MAIN_LANGUAGE || "en",
|
||||||
siteBaseUrl: baseUrl,
|
siteBaseUrl: baseUrl,
|
||||||
styleSettingsCss,
|
styleSettingsCss,
|
||||||
buildDate: new Date(),
|
buildDate: new Date(),
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="{{ meta.mainLanguage }}">
|
||||||
<head>
|
<head>
|
||||||
<title>{% if title %}{{ title }}{% else %}{{ page.fileSlug }}{% endif %}</title>
|
<title>{% if title %}{{ title }}{% else %}{{ page.fileSlug }}{% endif %}</title>
|
||||||
{%include "components/pageheader.njk"%}
|
{%include "components/pageheader.njk"%}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
permalink: "notes/{{ page.fileSlug | slugify }}/"
|
permalink: "notes/{{ page.fileSlug | slugify }}/"
|
||||||
---
|
---
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="{{ meta.mainLanguage }}">
|
||||||
<head>
|
<head>
|
||||||
<title>{% if title %}{{ title }}{% else %}{{ page.fileSlug }}{% endif %}</title>
|
<title>{% if title %}{{ title }}{% else %}{{ page.fileSlug }}{% endif %}</title>
|
||||||
{%include "components/pageheader.njk"%}
|
{%include "components/pageheader.njk"%}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user