Skip to content

Commit

Permalink
chore(content): remove hbs from layout metadata (#6436)
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustinMauroy authored Mar 5, 2024
1 parent 5380385 commit 0e15186
Show file tree
Hide file tree
Showing 1,250 changed files with 1,266 additions and 1,266 deletions.
4 changes: 2 additions & 2 deletions COLLABORATOR_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ At the top of the markdown file, within the Markdown Frontmatter, set a page the
```markdown
---
title: Title of the Page
layout: layout-name.hbs
layout: layout-name
---

[Content of the Page]
Expand Down Expand Up @@ -389,7 +389,7 @@ They are responsible for adding additional styling and structure surrounding the
Layouts are defined within the `layouts` folder.
They are React Components that receive the `children` prop, which is the transformed MDX content of the Markdown file.

Each Page layout is configured within their Markdown's Frontmatter as `layout: name-of-layout.hbs`.
Each Page layout is configured within their Markdown's Frontmatter as `layout: name-of-layout`.

### How we style the Website?

Expand Down
16 changes: 8 additions & 8 deletions components/withLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import SearchLayout from '@/layouts/Search';
import type { Layouts } from '@/types';

const layouts = {
'about.hbs': AboutLayout,
'home.hbs': HomeLayout,
'learn.hbs': LearnLayout,
'page.hbs': DefaultLayout,
'blog-post.hbs': PostLayout,
'blog-category.hbs': BlogLayout,
'search.hbs': SearchLayout,
'download.hbs': DownloadLayout,
about: AboutLayout,
home: HomeLayout,
learn: LearnLayout,
page: DefaultLayout,
'blog-post': PostLayout,
'blog-category': BlogLayout,
search: SearchLayout,
download: DownloadLayout,
} satisfies Record<Layouts, FC>;

type WithLayouProps<L = Layouts> = PropsWithChildren<{ layout: L }>;
Expand Down
4 changes: 2 additions & 2 deletions next.dynamic.constants.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const IGNORED_ROUTES = [
*/
export const DYNAMIC_ROUTES = new Map([
// Provides Routes for all Blog Categories
...provideBlogCategories().map(c => [`blog/${c}`, 'blog-category.hbs']),
...provideBlogCategories().map(c => [`blog/${c}`, 'blog-category']),
// Provides Routes for all Blog Categories w/ Pagination
...provideBlogCategories()
// retrieves the amount of pages for each blog category
Expand All @@ -38,7 +38,7 @@ export const DYNAMIC_ROUTES = new Map([
// each page for a category (i.e. blog/all/page/1)
.map(([c, t]) => [...Array(t).keys()].map(p => `blog/${c}/page/${p + 1}`))
// creates a tuple of each pathname and layout for the route
.map(paths => paths.map(path => [path, 'blog-category.hbs']))
.map(paths => paths.map(path => [path, 'blog-category']))
// flattens the array since we have a .map inside another .map
.flat(),
]);
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/about/get-involved/collab-summit.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Collab Summit
layout: about.hbs
layout: about
---

# Collaborator Summit
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/about/get-involved/contribute.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Contributing
layout: about.hbs
layout: about
---

# Contributing
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/about/get-involved/events.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Upcoming Events
layout: about.hbs
layout: about
---

## Upcoming Events
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/about/get-involved/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Get involved
layout: about.hbs
layout: about
---

# Get Involved
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/about/governance.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Project Governance
layout: about.hbs
layout: about
---

# Project Governance
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/about/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: About Node.js®
layout: about.hbs
layout: about
---

<div className="my-4 flex items-center justify-center">
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/about/previous-releases.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Previous Releases
layout: about.hbs
layout: about
---

# Previous Releases
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/about/security-reporting.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Security Reporting
layout: about.hbs
layout: about
---

# Security Reporting
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/download/current.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/download/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/download/package-manager/all.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: docs.hbs
layout: docs
title: Installing Node.js via package manager
---

Expand Down
2 changes: 1 addition & 1 deletion pages/ar/download/package-manager/current.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/download/package-manager/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/download/prebuilt-binaries/current.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/download/prebuilt-binaries/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/download/source-code/current.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/download/source-code/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Run JavaScript Everywhere
layout: home.hbs
layout: home
---

<section>
Expand Down
2 changes: 1 addition & 1 deletion pages/ar/search.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: search.hbs
layout: search
title: Search Results
---

Expand Down
2 changes: 1 addition & 1 deletion pages/de/about/get-involved/collab-summit.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Collab Summit
layout: about.hbs
layout: about
---

# Collaborator Summit
Expand Down
2 changes: 1 addition & 1 deletion pages/de/about/get-involved/contribute.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Contributing
layout: about.hbs
layout: about
---

# Contributing
Expand Down
2 changes: 1 addition & 1 deletion pages/de/about/get-involved/events.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Upcoming Events
layout: about.hbs
layout: about
---

## Upcoming Events
Expand Down
2 changes: 1 addition & 1 deletion pages/de/about/get-involved/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Get involved
layout: about.hbs
layout: about
---

# Get Involved
Expand Down
2 changes: 1 addition & 1 deletion pages/de/about/governance.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Project Governance
layout: about.hbs
layout: about
---

# Project Governance
Expand Down
2 changes: 1 addition & 1 deletion pages/de/about/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: About Node.js®
layout: about.hbs
layout: about
---

<div className="my-4 flex items-center justify-center">
Expand Down
2 changes: 1 addition & 1 deletion pages/de/about/previous-releases.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Previous Releases
layout: about.hbs
layout: about
---

# Previous Releases
Expand Down
2 changes: 1 addition & 1 deletion pages/de/about/security-reporting.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Security Reporting
layout: about.hbs
layout: about
---

# Security Reporting
Expand Down
2 changes: 1 addition & 1 deletion pages/de/download/current.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/de/download/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/de/download/package-manager/all.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: docs.hbs
layout: docs
title: Installing Node.js via package manager
---

Expand Down
2 changes: 1 addition & 1 deletion pages/de/download/package-manager/current.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/de/download/package-manager/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/de/download/prebuilt-binaries/current.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/de/download/prebuilt-binaries/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/de/download/source-code/current.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/de/download/source-code/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: download.hbs
layout: download
title: Download Node.js®
subtitle: Download Node.js the way you want.
---
Expand Down
2 changes: 1 addition & 1 deletion pages/de/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Run JavaScript Everywhere
layout: home.hbs
layout: home
---

<section>
Expand Down
2 changes: 1 addition & 1 deletion pages/de/search.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
layout: search.hbs
layout: search
title: Search Results
---

Expand Down
2 changes: 1 addition & 1 deletion pages/en/about/get-involved/collab-summit.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Collab Summit
layout: about.hbs
layout: about
---

# Collaborator Summit
Expand Down
2 changes: 1 addition & 1 deletion pages/en/about/get-involved/contribute.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Contributing
layout: about.hbs
layout: about
---

# Contributing
Expand Down
2 changes: 1 addition & 1 deletion pages/en/about/get-involved/events.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Upcoming Events
layout: about.hbs
layout: about
---

## Upcoming Events
Expand Down
2 changes: 1 addition & 1 deletion pages/en/about/get-involved/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Get involved
layout: about.hbs
layout: about
---

# Get Involved
Expand Down
2 changes: 1 addition & 1 deletion pages/en/about/governance.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Project Governance
layout: about.hbs
layout: about
---

# Project Governance
Expand Down
2 changes: 1 addition & 1 deletion pages/en/about/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: About Node.js®
layout: about.hbs
layout: about
---

<div className="my-4 flex items-center justify-center">
Expand Down
2 changes: 1 addition & 1 deletion pages/en/about/previous-releases.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Previous Releases
layout: about.hbs
layout: about
---

# Previous Releases
Expand Down
Loading

0 comments on commit 0e15186

Please sign in to comment.