summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Fred K. Schott <fkschott@gmail.com> 2021-07-13 10:57:40 -0400
committerGravatar Fred K. Schott <fkschott@gmail.com> 2021-07-13 10:57:40 -0400
commit4b1f5c3dc627e62b78a6993f502a35712cb9f400 (patch)
tree0692da531038b8d59b7662feb98c4ca76aed2e8f
parent3f14bed413074aba0ab9199d3a2e24802f51eb72 (diff)
downloadastro-4b1f5c3dc627e62b78a6993f502a35712cb9f400.tar.gz
astro-4b1f5c3dc627e62b78a6993f502a35712cb9f400.tar.zst
astro-4b1f5c3dc627e62b78a6993f502a35712cb9f400.zip
code review comments
-rw-r--r--.changeset/lovely-kids-sniff.md17
-rw-r--r--examples/blog-multiple-authors/src/pages/$author.astro3
-rw-r--r--examples/blog-multiple-authors/src/pages/$posts.astro3
-rw-r--r--examples/blog-multiple-authors/src/pages/about.astro3
-rw-r--r--examples/blog-multiple-authors/src/pages/index.astro3
-rw-r--r--examples/blog/src/pages/index.astro3
-rw-r--r--examples/framework-multiple/src/pages/index.astro3
-rw-r--r--examples/framework-preact/src/pages/index.astro3
-rw-r--r--examples/framework-react/src/pages/index.astro3
-rw-r--r--examples/framework-svelte/src/pages/index.astro3
-rw-r--r--examples/framework-vue/src/pages/index.astro3
-rw-r--r--examples/portfolio/src/pages/$projects.astro3
-rw-r--r--examples/portfolio/src/pages/404.astro3
-rw-r--r--examples/portfolio/src/pages/about.astro3
-rw-r--r--examples/portfolio/src/pages/index.astro3
-rw-r--r--examples/snowpack/src/pages/404.astro3
-rw-r--r--examples/snowpack/src/pages/guides.astro3
-rw-r--r--examples/snowpack/src/pages/index.astro3
-rw-r--r--examples/snowpack/src/pages/news.astro3
-rw-r--r--examples/snowpack/src/pages/plugins.astro3
-rw-r--r--examples/snowpack/src/pages/proof-of-concept-dynamic/[slug].astro.ignore3
-rw-r--r--examples/starter/src/pages/index.astro3
-rw-r--r--examples/with-nanostores/src/pages/index.astro3
-rw-r--r--examples/with-tailwindcss/src/pages/index.astro3
24 files changed, 23 insertions, 63 deletions
diff --git a/.changeset/lovely-kids-sniff.md b/.changeset/lovely-kids-sniff.md
deleted file mode 100644
index 23c585acc..000000000
--- a/.changeset/lovely-kids-sniff.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-'@example/blog': minor
-'@example/blog-multiple-authors': minor
-'@example/docs': minor
-'@example/framework-multiple': minor
-'@example/framework-preact': minor
-'@example/framework-react': minor
-'@example/framework-svelte': minor
-'@example/framework-vue': minor
-'@example/portfolio': minor
-'@example/snowpack': minor
-'@example/with-markdown': minor
-'@example/with-markdown-plugins': minor
-'@example/with-tailwindcss': minor
----
-
-Add lang attribute to html tags
diff --git a/examples/blog-multiple-authors/src/pages/$author.astro b/examples/blog-multiple-authors/src/pages/$author.astro
index bcd9d76af..e0a6a1919 100644
--- a/examples/blog-multiple-authors/src/pages/$author.astro
+++ b/examples/blog-multiple-authors/src/pages/$author.astro
@@ -8,7 +8,6 @@ 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';
@@ -46,7 +45,7 @@ export async function createCollection() {
const author = authorData[collection.params.author];
---
-<html lang={ lang ?? 'en' }>
+<html 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 c535b581d..a31004c05 100644
--- a/examples/blog-multiple-authors/src/pages/$posts.astro
+++ b/examples/blog-multiple-authors/src/pages/$posts.astro
@@ -8,7 +8,6 @@ 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';
@@ -39,7 +38,7 @@ export async function createCollection() {
}
---
-<html lang={ lang ?? 'en' }>
+<html 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 17035a88e..44a9424cf 100644
--- a/examples/blog-multiple-authors/src/pages/about.astro
+++ b/examples/blog-multiple-authors/src/pages/about.astro
@@ -3,9 +3,8 @@ import MainHead from '../components/MainHead.astro';
import Nav from '../components/Nav.astro';
let title = "About";
-let lang = 'en';
---
-<html lang={ lang ?? 'en' }>
+<html 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 400d04292..f8728f542 100644
--- a/examples/blog-multiple-authors/src/pages/index.astro
+++ b/examples/blog-multiple-authors/src/pages/index.astro
@@ -12,7 +12,6 @@ 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');
@@ -22,7 +21,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 lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<title>{title}</title>
<MainHead
diff --git a/examples/blog/src/pages/index.astro b/examples/blog/src/pages/index.astro
index 3c9fdd5a0..017daa54a 100644
--- a/examples/blog/src/pages/index.astro
+++ b/examples/blog/src/pages/index.astro
@@ -11,7 +11,6 @@ import BlogPostPreview from '../components/BlogPostPreview.astro';
let title = 'Example Blog';
let description = 'The perfect starter for your perfect blog.';
let permalink = 'https://example.com/';
-let lang = 'en';
// Data Fetching: List all Markdown posts in the repo.
let allPosts = Astro.fetchContent('./posts/*.md');
@@ -20,7 +19,7 @@ allPosts = allPosts.sort((a, b) => new Date(b.publishDate) - new Date(a.publishD
// Full Astro Component Syntax:
// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md
---
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<BaseHead title={title} description={description} permalink={permalink} />
<link rel="stylesheet" href="/blog.css" />
diff --git a/examples/framework-multiple/src/pages/index.astro b/examples/framework-multiple/src/pages/index.astro
index 0b6a8ad6d..706e4863f 100644
--- a/examples/framework-multiple/src/pages/index.astro
+++ b/examples/framework-multiple/src/pages/index.astro
@@ -6,12 +6,11 @@ import { PreactCounter } from '../components/PreactCounter.tsx';
import VueCounter from '../components/VueCounter.vue';
import SvelteCounter from '../components/SvelteCounter.svelte';
-let lang = 'en';
// Full Astro Component Syntax:
// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md
---
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
diff --git a/examples/framework-preact/src/pages/index.astro b/examples/framework-preact/src/pages/index.astro
index 513c43b43..ed42e72fd 100644
--- a/examples/framework-preact/src/pages/index.astro
+++ b/examples/framework-preact/src/pages/index.astro
@@ -2,12 +2,11 @@
// Component Imports
import Counter from '../components/Counter.jsx'
-let lang = 'en';
// Full Astro Component Syntax:
// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md
---
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<meta charset="utf-8" />
<meta
diff --git a/examples/framework-react/src/pages/index.astro b/examples/framework-react/src/pages/index.astro
index b4eff1231..35270638c 100644
--- a/examples/framework-react/src/pages/index.astro
+++ b/examples/framework-react/src/pages/index.astro
@@ -2,12 +2,11 @@
// Component Imports
import Counter from '../components/Counter.jsx'
-let lang = 'en';
// Full Astro Component Syntax:
// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md
---
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<meta charset="utf-8" />
<meta
diff --git a/examples/framework-svelte/src/pages/index.astro b/examples/framework-svelte/src/pages/index.astro
index 71d42d924..620510bd0 100644
--- a/examples/framework-svelte/src/pages/index.astro
+++ b/examples/framework-svelte/src/pages/index.astro
@@ -2,12 +2,11 @@
// Component Imports
import Counter from '../components/Counter.svelte'
-let lang = 'en';
// Full Astro Component Syntax:
// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md
---
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<meta charset="utf-8" />
<meta
diff --git a/examples/framework-vue/src/pages/index.astro b/examples/framework-vue/src/pages/index.astro
index 4959173d6..0f89f6047 100644
--- a/examples/framework-vue/src/pages/index.astro
+++ b/examples/framework-vue/src/pages/index.astro
@@ -2,12 +2,11 @@
// Component Imports
import Counter from '../components/Counter.vue'
-let lang = 'en';
// Full Astro Component Syntax:
// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md
---
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<meta charset="utf-8" />
<meta
diff --git a/examples/portfolio/src/pages/$projects.astro b/examples/portfolio/src/pages/$projects.astro
index 43b39ca28..60f2ac84f 100644
--- a/examples/portfolio/src/pages/$projects.astro
+++ b/examples/portfolio/src/pages/$projects.astro
@@ -5,7 +5,6 @@ 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() {
@@ -17,7 +16,7 @@ export async function createCollection() {
}
---
-<html lang={ lang ?? 'en' }>
+<html 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 2368b2531..48ec8d310 100644
--- a/examples/portfolio/src/pages/404.astro
+++ b/examples/portfolio/src/pages/404.astro
@@ -3,10 +3,9 @@ import MainHead from '../components/MainHead.astro';
import Footer from '../components/Footer/index.jsx';
import Nav from '../components/Nav/index.jsx';
-let lang = 'en';
---
-<html lang={ lang ?? 'en' }>
+<html 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 50e6dac62..1fb855eb0 100644
--- a/examples/portfolio/src/pages/about.astro
+++ b/examples/portfolio/src/pages/about.astro
@@ -3,10 +3,9 @@ import MainHead from '../components/MainHead.astro';
import Footer from '../components/Footer/index.jsx';
import Nav from '../components/Nav/index.jsx';
-let lang = 'en';
---
-<html lang={ lang ?? 'en' }>
+<html 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 2a2009682..2d0f8a0a1 100644
--- a/examples/portfolio/src/pages/index.astro
+++ b/examples/portfolio/src/pages/index.astro
@@ -9,12 +9,11 @@ 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 lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<MainHead title="Jeanine White: Personal Site" />
<style lang="scss">
diff --git a/examples/snowpack/src/pages/404.astro b/examples/snowpack/src/pages/404.astro
index ec3327ae4..ea70f098f 100644
--- a/examples/snowpack/src/pages/404.astro
+++ b/examples/snowpack/src/pages/404.astro
@@ -4,11 +4,10 @@ import MainLayout from '../components/MainLayout.astro';
let title = 'Not Found';
let description = 'Snowpack is a lightning-fast frontend build tool, designed for the modern web.';
-let lang = 'en';
---
<!doctype html>
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<BaseHead title={title} description={description} permalink="TODO" />
diff --git a/examples/snowpack/src/pages/guides.astro b/examples/snowpack/src/pages/guides.astro
index 93cedddac..ed8a6d7aa 100644
--- a/examples/snowpack/src/pages/guides.astro
+++ b/examples/snowpack/src/pages/guides.astro
@@ -23,7 +23,6 @@ let title = 'Guides';
let description = 'Snowpack\'s usage and integration guides.';
let guides;
let communityGuides;
-let lang = 'en';
guides = paginate({
files: '/posts/guides/*.md',
@@ -41,7 +40,7 @@ let lang = 'en';
---
<!doctype html>
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<BaseHead title={title} description={description} permalink="TODO" />
diff --git a/examples/snowpack/src/pages/index.astro b/examples/snowpack/src/pages/index.astro
index 029692161..80a07a5d2 100644
--- a/examples/snowpack/src/pages/index.astro
+++ b/examples/snowpack/src/pages/index.astro
@@ -7,11 +7,10 @@ import BaseLayout from '../components/BaseLayout.astro';
let title = 'Snowpack';
let description = 'Snowpack is a lightning-fast frontend build tool, designed for the modern web.';
-let lang = 'en';
---
<!doctype html>
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<style lang="scss">
@use '../../public/styles/var' as *;
diff --git a/examples/snowpack/src/pages/news.astro b/examples/snowpack/src/pages/news.astro
index a8b99678e..92ab3c6ef 100644
--- a/examples/snowpack/src/pages/news.astro
+++ b/examples/snowpack/src/pages/news.astro
@@ -14,11 +14,10 @@ import users from '../data/users.json';
const title = 'Community & News';
const description = 'Snowpack community news and companies that use Snowpack.';
-let lang = 'en';
---
<!doctype html>
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<BaseHead title={title} description={description} permalink="TODO" />
diff --git a/examples/snowpack/src/pages/plugins.astro b/examples/snowpack/src/pages/plugins.astro
index 3ff13c115..fca55da2e 100644
--- a/examples/snowpack/src/pages/plugins.astro
+++ b/examples/snowpack/src/pages/plugins.astro
@@ -5,11 +5,10 @@ import MainLayout from '../components/MainLayout.astro';
let title = 'The Snowpack Plugin Catalog';
let description = 'Snowpack plugins allow for configuration-minimal tooling integration.';
-let lang = 'en';
---
<!doctype html>
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<BaseHead title={title} description={description} permalink="TODO" />
diff --git a/examples/snowpack/src/pages/proof-of-concept-dynamic/[slug].astro.ignore b/examples/snowpack/src/pages/proof-of-concept-dynamic/[slug].astro.ignore
index 726f15642..99056f1e9 100644
--- a/examples/snowpack/src/pages/proof-of-concept-dynamic/[slug].astro.ignore
+++ b/examples/snowpack/src/pages/proof-of-concept-dynamic/[slug].astro.ignore
@@ -8,7 +8,6 @@ import BaseLayout from '../components/BaseLayout.astro';
let title = 'Community & News';
let description = 'Snowpack community news and companies that use Snowpack.';
let entry;
-let lang = 'en';
export default async function ({ params }) {
entry = await contentful.getEntry(params.slug);
@@ -16,7 +15,7 @@ export default async function ({ params }) {
}
---
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<BaseHead title={title} description={description} permalink="TODO" />
diff --git a/examples/starter/src/pages/index.astro b/examples/starter/src/pages/index.astro
index f2aab935b..2e5832a3f 100644
--- a/examples/starter/src/pages/index.astro
+++ b/examples/starter/src/pages/index.astro
@@ -9,12 +9,11 @@ import Tour from '../components/Tour.astro';
// It will run during the build, but never in the browser.
// All variables are available to use in the HTML template below.
let title = 'My Astro Site';
-let lang = 'en';
// Full Astro Component Syntax:
// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md
---
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
diff --git a/examples/with-nanostores/src/pages/index.astro b/examples/with-nanostores/src/pages/index.astro
index 8f6153505..a3f0c7c8c 100644
--- a/examples/with-nanostores/src/pages/index.astro
+++ b/examples/with-nanostores/src/pages/index.astro
@@ -5,11 +5,10 @@ import AdminsSvelte from '../components/AdminsSvelte.svelte';
import AdminsVue from '../components/AdminsVue.vue';
import AdminsPreact from '../components/AdminsPreact.jsx';
-let lang = 'en';
// Full Astro Component Syntax:
// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md
---
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
diff --git a/examples/with-tailwindcss/src/pages/index.astro b/examples/with-tailwindcss/src/pages/index.astro
index ede61ab82..09891eed3 100644
--- a/examples/with-tailwindcss/src/pages/index.astro
+++ b/examples/with-tailwindcss/src/pages/index.astro
@@ -2,11 +2,10 @@
// Component Imports
import Button from '../components/Button.astro';
-let lang = 'en';
// Full Astro Component Syntax:
// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md
---
-<html lang={ lang ?? 'en' }>
+<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Astro + TailwindCSS</title>