Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
website(docs): Add default layout property (#3705)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian committed Nov 13, 2022
1 parent b232fe3 commit d2d0b77
Show file tree
Hide file tree
Showing 78 changed files with 17 additions and 86 deletions.
9 changes: 8 additions & 1 deletion website/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ function inlineIntegration(): AstroIntegration {
};
}

function remarkDefaultLayoutPlugin() {
return function (tree, file) {
const {frontmatter} = file.data.astro;
frontmatter.layout = frontmatter.layout ?? "/Layout.astro";
};
}

// https://astro.build/config
export default defineConfig({
site: "https://rome.tools",
Expand All @@ -163,7 +170,7 @@ export default defineConfig({

markdown: {
syntaxHighlight: "prism",
remarkPlugins: [remarkToc],
remarkPlugins: [remarkToc, remarkDefaultLayoutPlugin],
rehypePlugins: [
rehypeSlug,
[
Expand Down
4 changes: 2 additions & 2 deletions website/src/components/NavigationSidebar.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import ExternalLinks from "./ExternalLinks.astro";
import ActiveLink from "./ActiveLink.astro";
import navigation from "../navigation.json";
import navigation from "/navigation.json";
import {buildGetPages, buildTOC} from "../navigation-utils";
import {buildGetPages, buildTOC} from "/navigation-utils";
const {props} = Astro;
const {frontmatter = {}} = props;
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/cli.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: ../Layout.astro
title: CLI
emoji: ⌨️
category: reference
Expand Down
3 changes: 1 addition & 2 deletions website/src/pages/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ title: Configuration
emoji: ⚙️
category: reference
description: How to customize and configure Rome with rome.json.
layout: ../Layout.astro
---

import LintGroups from "../components/reference/Groups.astro";
import LintGroups from "/components/reference/Groups.astro";

{/** Make sure to update the redirect in `static/_redirects` when changing the configuration title --> **/}

Expand Down
3 changes: 1 addition & 2 deletions website/src/pages/credits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ title: Credits
emoji: 📝
description: Previous contributors and acknowledgments for projects that inspire us.
category: internals
layout: ../Layout.astro
---

import Contributors from "../components/Contributors.astro";
import Contributors from "/components/Contributors.astro";

# Credits

Expand Down
3 changes: 1 addition & 2 deletions website/src/pages/formatter/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ title: Formatter
emoji: 🖌️
category: tools
description: How to use the Rome formatter.
layout: ../../Layout.astro
---

import PackageManagerRomeCommand from "../../components/PackageManagerRomeCommand.astro";
import PackageManagerRomeCommand from "/components/PackageManagerRomeCommand.astro";

# Formatter

Expand Down
1 change: 0 additions & 1 deletion website/src/pages/guides/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
layout: /Layout.astro
title: Getting Started
category: guides
emoji: 🎉
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/internals/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Architecture
emoji: 🏛️
category: internals
description: How Rome works.
layout: ../../Layout.astro
---

# Architecture (in progress)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/internals/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
title: Internals
layout: ../../Layout.astro
---
1 change: 0 additions & 1 deletion website/src/pages/internals/philosophy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: Philosophy
emoji: 🧐
category: internals
description: How we think about building Rome.
layout: ../../Layout.astro
---

# Philosophy
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rules
layout: ../../../Layout.astro
emoji: 📏
description: List of available lint rules.
category: reference
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noArguments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noArguments
layout: ../../../Layout.astro
---

# noArguments (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noArrayIndexKey.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noArrayIndexKey
layout: ../../../Layout.astro
---

# noArrayIndexKey (since v0.10.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noAsyncPromiseExecutor.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noAsyncPromiseExecutor
layout: ../../../Layout.astro
---

# noAsyncPromiseExecutor (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noAutofocus.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noAutofocus
layout: ../../../Layout.astro
---

# noAutofocus (since v10.0.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noBannedTypes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noBannedTypes
layout: ../../../Layout.astro
---

# noBannedTypes (since v10.0.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noCatchAssign.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noCatchAssign
layout: ../../../Layout.astro
---

# noCatchAssign (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noChildrenProp.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noChildrenProp
layout: ../../../Layout.astro
---

# noChildrenProp (since v0.10.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noCommentText.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noCommentText
layout: ../../../Layout.astro
---

# noCommentText (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noCompareNegZero.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noCompareNegZero
layout: ../../../Layout.astro
---

# noCompareNegZero (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noConstAssign.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noConstAssign
layout: ../../../Layout.astro
---

# noConstAssign (since v10.0.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noDangerouslySetInnerHtml.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noDangerouslySetInnerHtml
layout: ../../../Layout.astro
---

# noDangerouslySetInnerHtml (since v0.10.0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noDangerouslySetInnerHtmlWithChildren
layout: ../../../Layout.astro
---

# noDangerouslySetInnerHtmlWithChildren (since v0.10.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noDebugger.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noDebugger
layout: ../../../Layout.astro
---

# noDebugger (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noDelete.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noDelete
layout: ../../../Layout.astro
---

# noDelete (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noDoubleEquals.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noDoubleEquals
layout: ../../../Layout.astro
---

# noDoubleEquals (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noDupeArgs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noDupeArgs
layout: ../../../Layout.astro
---

# noDupeArgs (since v0.9.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noEmptyPattern.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noEmptyPattern
layout: ../../../Layout.astro
---

# noEmptyPattern (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noExplicitAny.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noExplicitAny
layout: ../../../Layout.astro
---

# noExplicitAny (since v10.0.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noExtraBooleanCast.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noExtraBooleanCast
layout: ../../../Layout.astro
---

# noExtraBooleanCast (since v0.9.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noFunctionAssign.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noFunctionAssign
layout: ../../../Layout.astro
---

# noFunctionAssign (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noImplicitBoolean.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noImplicitBoolean
layout: ../../../Layout.astro
---

# noImplicitBoolean (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noImportAssign.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noImportAssign
layout: ../../../Layout.astro
---

# noImportAssign (since v0.9.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noInvalidConstructorSuper.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noInvalidConstructorSuper
layout: ../../../Layout.astro
---

# noInvalidConstructorSuper (since v10.0.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noLabelVar.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noLabelVar
layout: ../../../Layout.astro
---

# noLabelVar (since v0.7.0)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noMultipleSpacesInRegularExpressionLiterals
layout: ../../../Layout.astro
---

# noMultipleSpacesInRegularExpressionLiterals (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noNegationElse.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noNegationElse
layout: ../../../Layout.astro
---

# noNegationElse (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noNewSymbol.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noNewSymbol
layout: ../../../Layout.astro
---

# noNewSymbol (since v0.10.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noPositiveTabindex.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noPositiveTabindex
layout: ../../../Layout.astro
---

# noPositiveTabindex (since v10.0.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noRenderReturnValue.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noRenderReturnValue
layout: ../../../Layout.astro
---

# noRenderReturnValue (since v0.10.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noRestrictedGlobals.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noRestrictedGlobals
layout: ../../../Layout.astro
---

# noRestrictedGlobals (since v0.10.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noShadowRestrictedNames.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noShadowRestrictedNames
layout: ../../../Layout.astro
---

# noShadowRestrictedNames (since v0.9.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noShoutyConstants.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noShoutyConstants
layout: ../../../Layout.astro
---

# noShoutyConstants (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noSparseArray.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noSparseArray
layout: ../../../Layout.astro
---

# noSparseArray (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noUndeclaredVariables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noUndeclaredVariables
layout: ../../../Layout.astro
---

# noUndeclaredVariables (since v0.10.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noUnnecessaryContinue.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noUnnecessaryContinue
layout: ../../../Layout.astro
---

# noUnnecessaryContinue (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noUnreachable.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noUnreachable
layout: ../../../Layout.astro
---

# noUnreachable (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noUnsafeNegation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noUnsafeNegation
layout: ../../../Layout.astro
---

# noUnsafeNegation (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noUnusedTemplateLiteral.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noUnusedTemplateLiteral
layout: ../../../Layout.astro
---

# noUnusedTemplateLiteral (since v0.7.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noUnusedVariables.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noUnusedVariables
layout: ../../../Layout.astro
---

# noUnusedVariables (since v0.9.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noUselessFragments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noUselessFragments
layout: ../../../Layout.astro
---

# noUselessFragments (since v0.10.0)
Expand Down
1 change: 0 additions & 1 deletion website/src/pages/lint/rules/noVoidElementsWithChildren.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Lint Rule noVoidElementsWithChildren
layout: ../../../Layout.astro
---

# noVoidElementsWithChildren (since v0.10.0)
Expand Down
Loading

0 comments on commit d2d0b77

Please sign in to comment.