Skip to content

Commit

Permalink
Merge pull request #366 from omardeangelis/staging
Browse files Browse the repository at this point in the history
Release New Home Page & Massive Redirect
  • Loading branch information
omardeangelis authored Jan 6, 2024
2 parents 03bc7ae + 19b83c3 commit f4b17c0
Show file tree
Hide file tree
Showing 65 changed files with 2,496 additions and 325 deletions.
42 changes: 21 additions & 21 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,27 @@ const config: GatsbyConfig = {
resolve: `gatsby-plugin-sitemap`,
options: {
excludes: [
`/progetti/javascript/2`,
`/progetti/javascript/3`,
`/progetti/javascript/4`,
`/progetti/javascript/5`,
`/progetti/javascript/6`,
`/progetti/javascript/7`,
`/progetti/javascript/8`,
`/progetti/react/2`,
`/progetti/react/3`,
`/progetti/react/4`,
`/progetti/react/5`,
`/progetti/react/6`,
`/progetti/react/7`,
`/progetti/react/8`,
`/progetti/videomaker/2`,
`/progetti/videomaker/3`,
`/progetti/videomaker/4`,
`/progetti/videomaker/5`,
`/progetti/videomaker/6`,
`/progetti/videomaker/7`,
`/progetti/videomaker/8`,
`/academy/progetti/javascript/2`,
`/academy/progetti/javascript/3`,
`/academy/progetti/javascript/4`,
`/academy/progetti/javascript/5`,
`/academy/progetti/javascript/6`,
`/academy/progetti/javascript/7`,
`/academy/progetti/javascript/8`,
`/academy/progetti/react/2`,
`/academy/progetti/react/3`,
`/academy/progetti/react/4`,
`/academy/progetti/react/5`,
`/academy/progetti/react/6`,
`/academy/progetti/react/7`,
`/academy/progetti/react/8`,
`/academy/progetti/videomaker/2`,
`/academy/progetti/videomaker/3`,
`/academy/progetti/videomaker/4`,
`/academy/progetti/videomaker/5`,
`/academy/progetti/videomaker/6`,
`/academy/progetti/videomaker/7`,
`/academy/progetti/videomaker/8`,
],
},
},
Expand Down
15 changes: 10 additions & 5 deletions gatsby-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const createPages = async ({ graphql, actions }) => {
alias,
} = category
createPage({
path: `/corsi/${slug.toLowerCase()}/`,
path: `/academy/corsi/${slug.toLowerCase()}/`,
component: path.resolve(`./src/template/Category.tsx`),
context: {
slug,
Expand All @@ -123,7 +123,12 @@ export const createPages = async ({ graphql, actions }) => {
})

createPage({
path: `/progetti/`,
path: `/academy/`,
component: path.resolve(`./src/template/Academy.tsx`),
})

createPage({
path: `/academy/progetti/`,
component: path.resolve(`./src/template/ProjectsHome.tsx`),
})

Expand All @@ -141,7 +146,7 @@ export const createPages = async ({ graphql, actions }) => {
Array.from({ length: pages }, (_, index) => {
const start = numOfElement * index
createPage({
path: `/progetti/${category.slug.toLowerCase()}${
path: `/academy/progetti/${category.slug.toLowerCase()}${
index === 0 ? `/` : `/${index + 1}/`
}`,
component: path.resolve(`./src/template/ProjectsCategory.tsx`),
Expand Down Expand Up @@ -175,7 +180,7 @@ export const createPages = async ({ graphql, actions }) => {
project.ordine === maxProjectsOrders ? 1 : project.ordine + 1
if (project?.corsi?.[0]?.id)
createPage({
path: `/progetti/${slug}/${project.slug}/`,
path: `/academy/progetti/${slug}/${project.slug}/`,
component: path.resolve(`./src/template/ProjectArticle.tsx`),
context: {
id: project.id,
Expand All @@ -191,7 +196,7 @@ export const createPages = async ({ graphql, actions }) => {
const courseId = guida.corsi_correlati[0].idCorso
if (guida.is_Visible || !isProduction)
createPage({
path: `/guide/${guida.slug}/`,
path: `/academy/guide/${guida.slug}/`,
component: path.resolve(`./src/template/Guide.tsx`),
context: {
courseId: Number(courseId || 0),
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@reach/router": "^1.3.4",
"@reduxjs/toolkit": "^1.8.5",
"@sendgrid/mail": "^7.7.0",
"@vanilla-extract/css": "^1.13.0",
"@vanilla-extract/css": "^1.14.0",
"@vanilla-extract/webpack-plugin": "^2.3.1",
"clsx": "^2.0.0",
"dayjs": "^1.11.0",
Expand All @@ -62,7 +62,7 @@
"gatsby-transformer-sharp": "^5.12.3",
"googleapis": "105",
"lodash": "^4.17.21",
"old-ui": "^0.4.2",
"old-ui": "^0.5.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-helmet": "^6.1.0",
Expand Down
Loading

0 comments on commit f4b17c0

Please sign in to comment.