diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/blog-multiple-authors/src/layouts/post.astro | 2 | ||||
-rw-r--r-- | examples/blog/src/layouts/BlogPost.astro | 2 | ||||
-rw-r--r-- | examples/docs/src/layouts/Main.astro | 4 | ||||
-rw-r--r-- | examples/portfolio/src/layouts/project.astro | 2 | ||||
-rw-r--r-- | examples/snowpack/src/layouts/content-with-cover.astro | 2 | ||||
-rw-r--r-- | examples/snowpack/src/layouts/content.astro | 2 | ||||
-rw-r--r-- | examples/snowpack/src/layouts/post.astro | 2 | ||||
-rw-r--r-- | examples/with-markdown-plugins/src/layouts/main.astro | 2 | ||||
-rw-r--r-- | examples/with-markdown/src/layouts/main.astro | 2 |
9 files changed, 10 insertions, 10 deletions
diff --git a/examples/blog-multiple-authors/src/layouts/post.astro b/examples/blog-multiple-authors/src/layouts/post.astro index b34275d84..ed68459ee 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 lang={ content.lang ?? 'en' }> +<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/src/layouts/BlogPost.astro b/examples/blog/src/layouts/BlogPost.astro index 1b02d7aad..b27effe54 100644 --- a/examples/blog/src/layouts/BlogPost.astro +++ b/examples/blog/src/layouts/BlogPost.astro @@ -7,7 +7,7 @@ import BlogPost from '../components/BlogPost.astro'; const {content} = Astro.props; const {title, description, publishDate, author, heroImage, permalink} = content; --- -<html lang={ content.lang ?? 'en' }> +<html lang={ content.lang || 'en' }> <head> <BaseHead title={title} description={description} permalink={permalink} /> <link rel="stylesheet" href="/blog.css" /> diff --git a/examples/docs/src/layouts/Main.astro b/examples/docs/src/layouts/Main.astro index f358f8045..47b09a18f 100644 --- a/examples/docs/src/layouts/Main.astro +++ b/examples/docs/src/layouts/Main.astro @@ -10,7 +10,7 @@ import DocSidebar from '../components/DocSidebar.tsx'; // It will run during the build, but never in the browser. // All variables are available to use in the HTML template below. const { content } = Astro.props; -const headers = content?.astro?.headers; +const headers = content.astro.headers; const currentPage = Astro.request.url.pathname; const currentFile = currentPage === '/' ? 'src/pages/index.md' : `src/pages${currentPage.replace(/\/$/, "")}.md`; const githubEditUrl = `https://github.com/USER/REPO/blob/main/${currentFile}` @@ -18,7 +18,7 @@ const githubEditUrl = `https://github.com/USER/REPO/blob/main/${currentFile}` // Full Astro Component Syntax: // https://docs.astro.build/core-concepts/astro-components/ --- -<html lang={ content.lang ?? 'en' }> +<html lang={ content.lang || 'en' }> <head> <title>{content.title}</title> diff --git a/examples/portfolio/src/layouts/project.astro b/examples/portfolio/src/layouts/project.astro index 3ef6d1b88..8e649ee1f 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 lang={ content.lang ?? 'en' }> +<html lang={ content.lang || 'en' }> <head> <MainHead title={content.title} /> <style lang="scss"> diff --git a/examples/snowpack/src/layouts/content-with-cover.astro b/examples/snowpack/src/layouts/content-with-cover.astro index ccc1f671b..92b02a4cc 100644 --- a/examples/snowpack/src/layouts/content-with-cover.astro +++ b/examples/snowpack/src/layouts/content-with-cover.astro @@ -8,7 +8,7 @@ const { content } = Astro.props; --- <!doctype html> -<html lang={ content.lang ?? 'en' }> +<html lang={ content.lang || 'en' }> <head> <style> diff --git a/examples/snowpack/src/layouts/content.astro b/examples/snowpack/src/layouts/content.astro index a69f78f17..4c442c92e 100644 --- a/examples/snowpack/src/layouts/content.astro +++ b/examples/snowpack/src/layouts/content.astro @@ -8,7 +8,7 @@ const { content } = Astro.props; --- <!doctype html> -<html lang={ content.lang ?? 'en' }> +<html lang={ content.lang || 'en' }> <head> <BaseHead title={content.title} description={content.description} permalink="TODO" /> diff --git a/examples/snowpack/src/layouts/post.astro b/examples/snowpack/src/layouts/post.astro index 0662b3f1b..bcdd697e6 100644 --- a/examples/snowpack/src/layouts/post.astro +++ b/examples/snowpack/src/layouts/post.astro @@ -7,7 +7,7 @@ const { content } = Astro.props; --- <!doctype html> -<html lang={ content.lang ?? 'en' }> +<html lang={ content.lang || 'en' }> <head> <style lang="scss"> diff --git a/examples/with-markdown-plugins/src/layouts/main.astro b/examples/with-markdown-plugins/src/layouts/main.astro index 46427fa8f..a55693970 100644 --- a/examples/with-markdown-plugins/src/layouts/main.astro +++ b/examples/with-markdown-plugins/src/layouts/main.astro @@ -2,7 +2,7 @@ const { content } = Astro.props; --- -<html lang={ content.lang ?? 'en' }> +<html lang={ content.lang || 'en' }> <head> <meta charset="utf-8" /> <title>{content.title}</title> diff --git a/examples/with-markdown/src/layouts/main.astro b/examples/with-markdown/src/layouts/main.astro index 431c0f28e..b413aa826 100644 --- a/examples/with-markdown/src/layouts/main.astro +++ b/examples/with-markdown/src/layouts/main.astro @@ -2,7 +2,7 @@ const { content } = Astro.props; --- -<html lang={ content.lang ?? 'en' }> +<html lang={ content.lang || 'en' }> <head> <meta charset="utf-8"> <title>{content.title}</title> |