Skip to content

Commit

Permalink
page data pour livret
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtyMaury committed Sep 20, 2023
1 parent 2df029e commit 7c352d9
Show file tree
Hide file tree
Showing 19 changed files with 114 additions and 884 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags:
- cloud_devops
complexity: Intermediate
speakers:
- robert_grandl
- valentin_deleplace
slot: day-2-conference-1
room: Belem
abstract: |-
Expand Down
9 changes: 0 additions & 9 deletions data/speakers/robert_grandl.yml

This file was deleted.

12 changes: 12 additions & 0 deletions data/speakers/valentin_deleplace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
key: valentin_deleplace
name: Valentin Deleplace
feature: false
photoUrl: https://cloud.google.com/static/developers/advocates/images/valentin-deleplace/profile-image_2x.jpg
city: Paris, France
company: Google
socials:
linkedin: deleplacevalentin
twitter: val_deleplace
github: Deleplace
bio: Valentin is a developer of cloud backends. He's into performance, algorithms, DB, UX, DX, and Go
145 changes: 0 additions & 145 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,151 +6,6 @@ const FilterWarningsPlugin = require("webpack-filter-warnings-plugin");
* Changes path for files with extensions: /fr/team.fr/ -> /fr/team/
* Duplicates the french pages to create entrypoints without explicit languages: https://github.com/gatsbyjs/themes/issues/124
*/
exports.onCreatePage = ({ page, actions }) => {
const { createPage, deletePage } = actions;

// /en/team.fr/ -> prefix: en; suffix: en
const extensionMatch =
/\/(?:(?<prefix>[a-z]{2})\/)?[^.]*(?:\.(?<suffix>[a-z]{2}))?\//.exec(
page.path
);

if (extensionMatch) {
let pathWithoutSuffix = page.path;
if (
extensionMatch.groups.suffix &&
(extensionMatch.groups.prefix === extensionMatch.groups.suffix ||
(!extensionMatch.groups.prefix &&
extensionMatch.groups.suffix === "fr"))
) {
pathWithoutSuffix = page.path
.replace(`.${extensionMatch.groups.suffix}/`, "/")
.replace("/index/", "/");
createPage({
...page,
path: pathWithoutSuffix,
});
}
if (extensionMatch.groups.suffix) {
deletePage(page);
}
}
};

exports.createPages = async ({ graphql, actions, reporter }) => {
const { createPage } = actions;
// Query for markdown nodes to use in creating pages.

// A ajouter
// openfeedbackId
// cancelled
// youtube
// slides
const { data, errors } = await graphql(
`
{
allSessionsYaml {
edges {
node {
key
slot
speakers
tags
talkType
title
room
language
complexity
abstract
}
}
}
allSpeakersYaml {
edges {
node {
key
name
feature
city
company
companyLogo
photoUrl
bio
socials {
twitter
github
linkedin
instagram
website
}
}
}
}
allBlogsYaml {
edges {
node {
key
title
image
date
content
}
}
}
}
`
);
if (errors) {
reporter.panicOnBuild(`Error while running GraphQL query.`);
return;
}

// Sessions
const sessionPageTemplate = path.resolve(
"src/components/session/sessionPageTemplate.tsx"
);
data.allSessionsYaml.edges.forEach(({ node: session }) => {
const path = "sessions/" + session.key;
createPage({
path,
component: sessionPageTemplate,
context: {
session,
},
});
});

// Speakers
const speakerPageTemplate = path.resolve(
"src/components/speakers/speakerPageTemplate.tsx"
);
data.allSpeakersYaml.edges.forEach(({ node: speaker }) => {
const path = "speakers/" + speaker.key;
createPage({
path,
component: speakerPageTemplate,
context: {
speaker,
},
});
});

// // Blogs
// const blogPageTemplate = path.resolve(
// "src/components/blog/blogPageTemplate.tsx"
// );
// data.allBlogsYaml.edges.forEach(({ node: blog }) => {
// const path = "blog/" + blog.key;
// createPage({
// path,
// component: blogPageTemplate,
// context: {
// blog,
// },
// });
// });
};

exports.onCreateWebpackConfig = ({ actions }) => {
actions.setWebpackConfig({
plugins: [
Expand Down
30 changes: 0 additions & 30 deletions src/pages/404.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions src/pages/blog.tsx

This file was deleted.

121 changes: 0 additions & 121 deletions src/pages/code-of-conduct/index.en.mdx

This file was deleted.

Loading

0 comments on commit 7c352d9

Please sign in to comment.