Skip to content

Commit 181c6dc

Browse files
authored
Merge pull request #556 from shibomb/fix/fix-duplicate-page-slug-for-i18n
fix duplicate page slug for i18n
2 parents 2960712 + 6eba80e commit 181c6dc

33 files changed

+8
-33
lines changed

src/components/GridItem/Tutorial.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
import Image from "@components/Image/index.astro";
33
import type { CollectionEntry } from "astro:content";
4+
import { removeLocalePrefix } from "@i18n/utils";
45
56
interface Props {
67
item: CollectionEntry<"tutorials">;
@@ -10,7 +11,7 @@ interface Props {
1011
const { item, lazyLoad } = Astro.props;
1112
---
1213

13-
<a href={`/tutorials/${item.slug}/`} class="group hover:no-underline">
14+
<a href={`/tutorials/${removeLocalePrefix(item.slug).slice(1)}/`} class="group hover:no-underline">
1415
{
1516
item.data.featuredImageAlt && item.data.featuredImage && (
1617
<Image

src/content/pages/en/education-resources.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
slug: education-resources
32
title: Education Resources
43
---
54

src/content/pages/en/libraries.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
slug: libraries
32
title: Libraries
43
---
54

src/content/pages/en/reference.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
slug: reference
32
title: Reference
43
---
54

src/content/tutorials/en/animating-with-media-objects.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
slug: animating-with-media-objects
32
title: "Animating with Media Objects"
43
description: Learn how to load images and GIFs to your sketches by creating an interactive garden!
54
category: introduction

src/content/tutorials/en/color-gradients.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
slug: color-gradients
32
title: "Color Gradients"
43
description: Use radial gradients, linear gradients, and blend modes to create lens flare stickers & colorful filters on top of a webcam selfie.
54
category: drawing

src/content/tutorials/en/conditionals-and-interactivity.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
slug: conditionals-and-interactivity
32
title: "Conditionals and Interactivity"
43
description: A tutorial on how to use conditional statements and make interactive sketches.
54
category: introduction

src/content/tutorials/en/coordinates-and-transformations.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
slug: coordinates-and-transformations
32
title: "Coordinates and Transformations"
43
description: An overview of the different ways you can position objects in WebGL mode.
54
category: webgl

src/content/tutorials/en/creating-styling-html.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
slug: creating-styling-html
32
title: "Creating and Styling HTML"
43
description: Dive into the art of creative coding and learn to build and beautify HTML with p5.js.
54
category: web-design

src/content/tutorials/en/custom-geometry.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
slug: custom-geometry
32
title: "Creating Custom Geometry in WebGL"
43
description: A guide to the different ways you can create your own 3D shapes.
54
category: webgl

0 commit comments

Comments
 (0)