Skip to content

Commit

Permalink
fix(tutorial/4): Make frontmatter consistant between codeblocks (with…
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundmiller authored Nov 17, 2022
1 parent 58ffe6a commit 985e501
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pages/en/tutorial/4-layouts/1.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ You still have some Astro components repeatedly rendered on every page. Let's re

```astro title="src/layouts/BaseLayout.astro"
---
const pageTitle = "Home Page";
import Header from '../components/Header.astro';
import Footer from '../components/Footer.astro';
import '../styles/global.css';
const pageTitle = "Home Page";
---
<html lang="en">
<head>
Expand Down Expand Up @@ -70,10 +70,10 @@ You still have some Astro components repeatedly rendered on every page. Let's re
```astro title="src/layouts/BaseLayout.astro" ins={18}
---
const pageTitle = "Home Page";
import Header from '../components/Header.astro';
import Footer from '../components/Footer.astro';
import '../styles/global.css';
const pageTitle = "Home Page";
---
<html lang="en">
<head>
Expand Down Expand Up @@ -113,10 +113,11 @@ You still have some Astro components repeatedly rendered on every page. Let's re
2. Change the script of your `BaseLayout.astro` layout component to receive a page title via `Astro.props` instead of defining it as a constant.
```astro title="src/layouts/BaseLayout.astro" del={4} ins={5}
```astro title="src/layouts/BaseLayout.astro" del={5} ins={6}
---
import Navigation from '../components/Navigation.astro';
import Header from '../components/Header.astro';
import Footer from '../components/Footer.astro';
import '../styles/global.css';
const pageTitle = "Home Page";
const { pageTitle } = Astro.props;
---
Expand Down

0 comments on commit 985e501

Please sign in to comment.