diff options
Diffstat (limited to 'examples/blog-multiple-authors/src')
5 files changed, 9 insertions, 5 deletions
diff --git a/examples/blog-multiple-authors/src/layouts/post.astro b/examples/blog-multiple-authors/src/layouts/post.astro index c8f394892..b34275d84 100644 --- a/examples/blog-multiple-authors/src/layouts/post.astro +++ b/examples/blog-multiple-authors/src/layouts/post.astro @@ -6,7 +6,7 @@ import authorData from '../data/authors.json'; const { content } = Astro.props; --- -<html> +<html lang={ content.lang ?? 'en' }> <head> <title>{content.title}</title> <MainHead title={content.title} description={content.description} image={content.image} canonicalURL={Astro.request.canonicalURL} /> diff --git a/examples/blog-multiple-authors/src/pages/$author.astro b/examples/blog-multiple-authors/src/pages/$author.astro index ff80344e4..bcd9d76af 100644 --- a/examples/blog-multiple-authors/src/pages/$author.astro +++ b/examples/blog-multiple-authors/src/pages/$author.astro @@ -8,6 +8,7 @@ import Pagination from '../components/Pagination.astro'; let title = 'Don’s Blog'; let description = 'An example blog on Astro'; let canonicalURL = Astro.request.canonicalURL; +let lang = 'en'; // collection import authorData from '../data/authors.json'; @@ -45,7 +46,7 @@ export async function createCollection() { const author = authorData[collection.params.author]; --- -<html> +<html lang={ lang ?? 'en' }> <head> <title>{title}</title> <MainHead diff --git a/examples/blog-multiple-authors/src/pages/$posts.astro b/examples/blog-multiple-authors/src/pages/$posts.astro index 0975e8007..c535b581d 100644 --- a/examples/blog-multiple-authors/src/pages/$posts.astro +++ b/examples/blog-multiple-authors/src/pages/$posts.astro @@ -8,6 +8,7 @@ import Pagination from '../components/Pagination.astro'; let title = 'Don’s Blog'; let description = 'An example blog on Astro'; let canonicalURL = Astro.request.canonicalURL; +let lang = 'en'; // collection import authorData from '../data/authors.json'; @@ -38,7 +39,7 @@ export async function createCollection() { } --- -<html> +<html lang={ lang ?? 'en' }> <head> <title>{title}</title> <MainHead diff --git a/examples/blog-multiple-authors/src/pages/about.astro b/examples/blog-multiple-authors/src/pages/about.astro index d7a219057..17035a88e 100644 --- a/examples/blog-multiple-authors/src/pages/about.astro +++ b/examples/blog-multiple-authors/src/pages/about.astro @@ -3,8 +3,9 @@ import MainHead from '../components/MainHead.astro'; import Nav from '../components/Nav.astro'; let title = "About"; +let lang = 'en'; --- -<html> +<html lang={ lang ?? 'en' }> <head> <MainHead title={title} diff --git a/examples/blog-multiple-authors/src/pages/index.astro b/examples/blog-multiple-authors/src/pages/index.astro index 0b1c95df4..400d04292 100644 --- a/examples/blog-multiple-authors/src/pages/index.astro +++ b/examples/blog-multiple-authors/src/pages/index.astro @@ -12,6 +12,7 @@ import authorData from '../data/authors.json'; // All variables are available to use in the HTML template below. let title = 'Don’s Blog'; let description = 'An example blog on Astro'; +let lang = 'en'; // Data Fetching: List all Markdown posts in the repo. let allPosts = Astro.fetchContent('./post/*.md'); @@ -21,7 +22,7 @@ let firstPage = allPosts.slice(0, 2); // Full Astro Component Syntax: // https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md --- -<html> +<html lang={ lang ?? 'en' }> <head> <title>{title}</title> <MainHead |