diff options
author | 2021-07-12 23:46:28 -0400 | |
---|---|---|
committer | 2021-07-13 00:49:13 -0400 | |
commit | 3f14bed413074aba0ab9199d3a2e24802f51eb72 (patch) | |
tree | 5460d384a66f5c428c8617eddb511e6f55adfb9e /examples/portfolio/src | |
parent | 1b13f5c158b5fbe157406308205c0939b415e1d7 (diff) | |
download | astro-3f14bed413074aba0ab9199d3a2e24802f51eb72.tar.gz astro-3f14bed413074aba0ab9199d3a2e24802f51eb72.tar.zst astro-3f14bed413074aba0ab9199d3a2e24802f51eb72.zip |
Add lang attribute to html tags
Diffstat (limited to 'examples/portfolio/src')
-rw-r--r-- | examples/portfolio/src/layouts/project.astro | 2 | ||||
-rw-r--r-- | examples/portfolio/src/pages/$projects.astro | 3 | ||||
-rw-r--r-- | examples/portfolio/src/pages/404.astro | 4 | ||||
-rw-r--r-- | examples/portfolio/src/pages/about.astro | 4 | ||||
-rw-r--r-- | examples/portfolio/src/pages/index.astro | 3 |
5 files changed, 11 insertions, 5 deletions
diff --git a/examples/portfolio/src/layouts/project.astro b/examples/portfolio/src/layouts/project.astro index 4ebfed8e1..3ef6d1b88 100644 --- a/examples/portfolio/src/layouts/project.astro +++ b/examples/portfolio/src/layouts/project.astro @@ -6,7 +6,7 @@ import Nav from '../components/Nav/index.jsx'; const { content } = Astro.props; --- -<html> +<html lang={ content.lang ?? 'en' }> <head> <MainHead title={content.title} /> <style lang="scss"> diff --git a/examples/portfolio/src/pages/$projects.astro b/examples/portfolio/src/pages/$projects.astro index 9a3407b83..43b39ca28 100644 --- a/examples/portfolio/src/pages/$projects.astro +++ b/examples/portfolio/src/pages/$projects.astro @@ -5,6 +5,7 @@ import Nav from '../components/Nav/index.jsx'; import PortfolioPreview from '../components/PortfolioPreview/index.jsx'; let { collection } = Astro.props; +let lang = 'en'; export async function createCollection() { return { async data() { @@ -16,7 +17,7 @@ export async function createCollection() { } --- -<html> +<html lang={ lang ?? 'en' }> <head> <MainHead title="All Projects | Jeanine White" /> <style lang="scss"> diff --git a/examples/portfolio/src/pages/404.astro b/examples/portfolio/src/pages/404.astro index 6929c61e9..2368b2531 100644 --- a/examples/portfolio/src/pages/404.astro +++ b/examples/portfolio/src/pages/404.astro @@ -2,9 +2,11 @@ import MainHead from '../components/MainHead.astro'; import Footer from '../components/Footer/index.jsx'; import Nav from '../components/Nav/index.jsx'; + +let lang = 'en'; --- -<html> +<html lang={ lang ?? 'en' }> <head> <MainHead title="Not Found" /> </head> diff --git a/examples/portfolio/src/pages/about.astro b/examples/portfolio/src/pages/about.astro index 4ae7c3f08..50e6dac62 100644 --- a/examples/portfolio/src/pages/about.astro +++ b/examples/portfolio/src/pages/about.astro @@ -2,9 +2,11 @@ import MainHead from '../components/MainHead.astro'; import Footer from '../components/Footer/index.jsx'; import Nav from '../components/Nav/index.jsx'; + +let lang = 'en'; --- -<html> +<html lang={ lang ?? 'en' }> <head> <MainHead title="About | Jeanine White" /> <style lang="scss"> diff --git a/examples/portfolio/src/pages/index.astro b/examples/portfolio/src/pages/index.astro index 4638bb3e9..2a2009682 100644 --- a/examples/portfolio/src/pages/index.astro +++ b/examples/portfolio/src/pages/index.astro @@ -9,11 +9,12 @@ import PorfolioPreview from '../components/PortfolioPreview/index.jsx'; // Data Fetching: List all Markdown posts in the repo. const projects = Astro.fetchContent('./project/**/*.md'); const featuredProject = projects[0]; +let lang = 'en'; // Full Astro Component Syntax: // https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md --- -<html> +<html lang={ lang ?? 'en' }> <head> <MainHead title="Jeanine White: Personal Site" /> <style lang="scss"> |